I have gotten a deadlock when spawning threads in Ruby 1.9.3. (This has only happened once that i am aware.)
The create_work_queue method that caused the deadlock simply creates a WorkQueue then starts up the threads and makes them do a little work upon initialization. The implementation of the code that caused the deadlock and the backtrace are below:
fatal:deadlock detected
/usr/local/rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/monitor.rb:185:in `lock'
/usr/local/rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/monitor.rb:185:in `mon_enter'
/usr/local/rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/monitor.rb:209:in `mon_synchronize'
/home/bkr/.bundle/4218576002/614614351/ruby/1.9.1/gems/work_queue-2.5.2/lib/work_queue.rb:197:in `spawn_thread'
/home/bkr/.bundle/4218576002/614614351/ruby/1.9.1/gems/work_queue-2.5.2/lib/work_queue.rb:190:in `enqueue'
/home/bkr/.bundle/4218576002/614614351/ruby/1.9.1/gems/work_queue-2.5.2/lib/work_queue.rb:106:in `enqueue_b'
/home/bkr/.bundle/4218576002/614614351/ruby/1.9.1/gems/parallizer-0.2.2/lib/parallizer.rb:60:in `block in create_work_queue'
...