Lock4 Deadlock

Issue #43 resolved
David Thomas created an issue

thread 0 starts 'photonLoop' thread 0 acquire 'lock4' thread 0 'ray 1' misses in 'findSurface' (and hence never frees 'lock4') thread 0 returns thread 1 starts 'photonLoop' thread 1 is blocked by 'lock4'

This deadlock bug obfuscates that photons are missing the detector. In our case, it took us a long time to figure out there was an issue with the catalog (ra, dec) because we had to resolve this issue first. It also seems dangerous to rely on 'ray 1' making it to the logic that frees 'lock4' - there are a few ways it can miss.

The fix is probably to have a local boolean variable that confirms that the thread has freed 'lock4' before returning.

Comments (2)

  1. John Peterson

    fixed in v4.0.2. Also reentered the OPD calculation when the pointing is not at ra, dec = 0,0.

  2. Log in to comment