-
Notifications
You must be signed in to change notification settings - Fork 56
Description
I have observed a deadlock bug involving FFTW v1.2.4. I am using the same codebase as I did in #161. It appears that the bug is affected by the number of threads I give Julia (still setting FFTW to 1 thread, though). With 4 threads, the deadlock bug occurs and the program will freeze. With 16 threads, the bug does not occur (it could be that the likelihood is simply much smaller and so does not occur during the ~6 minute runtime). Furthermore, in my debugging, I found that I could add enough debugging print statements that slow down the program enough that the deadlock bug does not occur.
I am confident that the bug was introduced in v1.2.4 because I cannot reproduce the problem with v1.2.2 nor v1.2.3. I can reproduce the problem with Julia v1.4 and v1.5. I can reproduce this problem on multiple machines reliably.
Looking at the changes introduced in v1.2.4, could it be that this loop is waiting indefinitely? v1.2.3...v1.2.4
Edit: It may also be worth noting that when the deadlock occurs, all threads appear to be busy. The CPU usage on the machine jumps to exactly the correct percentage for the number of threads I give Julia (e.g., on an 8 thread machine with 4 Julia threads, the CPU usage jumps to 50% and stays there indefinitely).