Bug #2564: [patch] re-initialize timer_thread_{lock,cond} after fork
http://redmine.ruby-lang.org/issues/show/2564

Author: Aliaksey Kandratsenka
Status: Open, Priority: Normal
ruby -v: ruby 1.9.1p243 (2009-07-16 revision 24175) [x86_64-linux]

After fork ruby clears timer_thread_id and then creates new timer thread in new process. But because new process inherits memory of old process it may see locked timer_thread_lock and well as invalid state of timer_thread_cond.

This patch simply initializes both this variables before their first use.

This bug causes lockup of Rails apps under phusion passenger on ruby 1.9.1.


----------------------------------------
http://redmine.ruby-lang.org