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
Describe the bug
As initially reported in adlai#5, SBCL occasionally reports deadlock caused by the thread pool.
To Reproduce
Steps to reproduce the behavior:
Run multiple parallel threads that constantly produce new tasks, similarly to scalpl's actors.
Wait for RNGesus to schedule the deadlock cycle.
Receive Condition of type SB-THREAD:THREAD-DEADLOCK
Report this fact, and possibly additional findings, in this Issue; or invoke the ABORT restart and enjoy the hardworking actors.lisp rescheduling of the tasks.
Expected behavior
Ideally, either there should not be any deadlock; alternatively, tasks could be restartable automatically.
System (all systems where this has been observed):
Hardware: X86-64 AMD EPYC 7543 32-Core Processor
OS: Arch Linux, Debian
Compiler: SBCL
Version: multiple; most recently, 2.2.9.debian
Test Suite
Regrettably, the test suite does not detect this deadlock. I'm considering whether it is worth including a sufficiently vigorous test case that the deadlock occurs with high probability.
The text was updated successfully, but these errors were encountered:
I strongly suspect this is an SBCL bug, rather than a ChanL bug; specifically, although the thread pool uses two locks, they are always taken in the same order -- by threads running the same code! -- and thus deadlock should not be possible. Some complication from the inner lock's release and reacquisition being triggered by a condition variable is probably at fault for the appearant and unintended deadlocks.
I wrote above "apparant and unintended", to slightly shift blame away from SBCL's deadlock detector. Deadlocks definitely do occur.
EDIT: see the printed representation of the deadlock cycle, in the bug report; owner=0 suggests to me that, by the time the cycle is printed, there is not a deadlock anymore, and thus the actual deadlock is caused by some race condition between the condition variables and mutexes provided by SBCL.
Describe the bug
As initially reported in adlai#5, SBCL occasionally reports deadlock caused by the thread pool.
To Reproduce
Steps to reproduce the behavior:
Condition of type SB-THREAD:THREAD-DEADLOCK
ABORT
restart and enjoy the hardworking actors.lisp rescheduling of the tasks.Expected behavior
Ideally, either there should not be any deadlock; alternatively, tasks could be restartable automatically.
Screenshots or Error Logs
Source locations for frames 12, 9, and 6:
System (all systems where this has been observed):
Test Suite
Regrettably, the test suite does not detect this deadlock. I'm considering whether it is worth including a sufficiently vigorous test case that the deadlock occurs with high probability.
The text was updated successfully, but these errors were encountered: