You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm experiencing process hangs when running a simple scenario that involves thread synchronization using conditional variables. The scenario establishes a cycle of threads each one waiting on the conditional variable of the next thread in the cycle. When a thread wakes up as a result of a change in the next thread's counter, it increments this counter, set its own counter to this value, and sends a notification about this change to the waiting thread. The process is kick-started by the main thread setting the counter of the first thread in the cycle. Every now and then the first thread in the cycle will report its counter's value and this is expected to continue to infinity. However, after some time in the process, reporting freezes.
Similar hangs have been observed in other multi-threaded settings, but this test case is particularly attractive due to its simplicity. To reproduce, decompress and run the script cond.jl.gz, authored by Todd Veldhuizen, and wait until no progress is observed in the terminal's output. This has been seen to be reproducible within 20-30 minutes' time.
julia-1.8-mac64 -t auto -e 'include("cond.jl"); test()'
Alternatively, and even more preferably, run it within lldb, and wait until lldb stops the process due to an invalid memory access. This also gives an indication of what is causing these hangs (race condition?, alignment issue?).
Sorry I forgot to follow up here. I checked again today using the official julia-1.9.1-macaarch64 release, and I couldn't reproduce the hanging behavior. Feel free to close this. It'd be great if anyone had any insights into what could have changed in Julia to shield it from this hang.
I'm experiencing process hangs when running a simple scenario that involves thread synchronization using conditional variables. The scenario establishes a cycle of threads each one waiting on the conditional variable of the next thread in the cycle. When a thread wakes up as a result of a change in the next thread's counter, it increments this counter, set its own counter to this value, and sends a notification about this change to the waiting thread. The process is kick-started by the main thread setting the counter of the first thread in the cycle. Every now and then the first thread in the cycle will report its counter's value and this is expected to continue to infinity. However, after some time in the process, reporting freezes.
Similar hangs have been observed in other multi-threaded settings, but this test case is particularly attractive due to its simplicity. To reproduce, decompress and run the script cond.jl.gz, authored by Todd Veldhuizen, and wait until no progress is observed in the terminal's output. This has been seen to be reproducible within 20-30 minutes' time.
Alternatively, and even more preferably, run it within lldb, and wait until lldb stops the process due to an invalid memory access. This also gives an indication of what is causing these hangs (race condition?, alignment issue?).
Version info:
Hints:
The text was updated successfully, but these errors were encountered: