Article Discourse developers badly need to read (but will not)
-
A stack trace for each thread.
-
If the scheduler sees that every thread is waiting on a synchronization primitive, it crashes with a stack trace.
Will it crash if you have 5 threads and only 4 are deadlocked? (Like, maybe your UI thread is fine, but your data processors are all fucked.)
-
Nope. The most common case of "it doesn't crash when everything but one thread is deadlocked" is when you have a thread accepting connections on a socket and then the threads it starts for the connections immediately deadlock but it can still make threads.
-
That sounds like a pretty nasty state to not be able to detect. Not that it's any worse than previous C-likes.
-
I mean, if your program locks up, you can send SIGQUIT to it and it'll crash with a stack trace for each thread. On Linux, that's Ctrl+\