From: Eric Wong Date: 2009-07-28T04:28:40+09:00 Subject: [ruby-core:24578] [Bug #1525] Deadlock in Ruby 1.9's VM caused by ConditionVariable.wait and fork? Issue #1525 has been updated by Eric Wong. Looking at trunk, there doesn't seem to be any accounting of mutexes to pass to handlers for pthread_atfork; so the child process will just inherit the mutexes in an unknown state. It should be possible to fix the problem by keeping track of all mutexes as they're created/initialized and registering pthread_atfork handlers to ensure all mutexes are unlocked when the child starts running. I'm pretty sure forking in the presence of threads in the parent will always require a GVL, but I don't think it's too big of an issue otherwise. ---------------------------------------- http://redmine.ruby-lang.org/issues/show/1525 ---------------------------------------- http://redmine.ruby-lang.org