Bug #15383
closedReproducible crash: crash.rb:6: [BUG] unexpected THREAD_KILLED
Description
Hi,
I'm reporting a reliable crash of the ruby interpreter on contested mutexeses that are accessed in child processes.
I currently think that this happens as the child processes main thread, may be waiting for a parent process sibling thread that was holding the mutex at the time of the fork. After the fork is done, all sibling threads are dead, and the mutex detects the attempt to wait for a dead thread, bailing out.
This is simular, but not identical to the case here: https://bugs.ruby-lang.org/issues/14578
Here is a gist with some more test results on various platforms: https://gist.github.com/mbj/e6795ee5e0583c5541ee250e9942279a
I'm fine to get my hands dirty, but would need some pointers if my above conclusion points to the right direction.
Best,
Markus
Files