From: Daniel Azuma Date: 2009-08-26T01:53:22+09:00 Subject: [ruby-core:25121] [Bug #1993] IO.select fails when called in multiple threads on 1.8.7p174 Issue #1993 has been updated by Daniel Azuma. One other note-- this CAN be difficult to reproduce, because you have to catch both threads with an IO#select scheduled at the same time. I find the repro code above pretty consistent on my setup, which is Ruby 1.8.7p174, Mac OS 10.5.8, on a MacBook Pro, 2.5 GHz core 2 duo. But as with most threading-related issues, YMMV. Some related links that have been pointed out to me in since last night: * This report is probably a duplicate of http://redmine.ruby-lang.org/issues/show/1484 * It looks like this is getting seen by Capistrano users. See the Capistrano bug report at https://capistrano.lighthouseapp.com/projects/8716/tickets/79-capistrano-hangs-on-shell-command-for-many-computers-on-ruby-186-p368 for some extended discussion. * I blogged about this at http://www.daniel-azuma.com/blog/view/z2ysbx0e4c3it9/ruby_1_8_7_io_select_threading_bug with a few details on the pure Ruby workaround that I'm using for now. Essentially, use a mutex to prevent multiple threads from attempting to call IO#select at the same time. ---------------------------------------- http://redmine.ruby-lang.org/issues/show/1993 ---------------------------------------- http://redmine.ruby-lang.org