From: Vincent Isambart Date: 2007-07-02T04:12:30+09:00 Subject: Re: Apple reportedly to ship with ruby 1.8.6-p36 unless informed what to patch Hi, > For the moment I have been unable to reproduce the problem on my > environment (Leopard, ruby-1.8.6-p36 with --enable-pthread). James > graciously sent me some (private) code that triggers the bug on his > environment, but it doesn't happen on mine. > > On Tiger with p36, we can reproduce the problem very easily with > --enable-pthread, but without --enable-pthread the bug seems to have > disappeared. The problem can be easily reproduced under Tiger with a one-liner: % ruby -ve 'require "timeout" ; Timeout.timeout(5) { puts `df -h` }' ruby 1.8.6 (2007-06-07 patchlevel 36) [i686-darwin8.10.1] /usr/local/lib/ruby/1.8/timeout.rb:54: execution expired (Timeout::Error) from /usr/local/lib/ruby/1.8/timeout.rb:56:in `timeout' from -e:1 % ruby -ve 'require "timeout" ; Timeout.timeout(5) { puts `df -h` }' ruby 1.8.6 (2007-06-18 patchlevel 39) [i686-darwin8.10.1] /usr/local/lib/ruby/1.8/timeout.rb:54: execution expired (Timeout::Error) from /usr/local/lib/ruby/1.8/timeout.rb:56:in `timeout' from -e:1 1.8.6-p0, the 1.8 branch (currently numbered 1.8.6-p5000) and 1.9 all work fine (by that I mean the result of the df is displayed). And the problem only occurs when Ruby is compiled with pthread support (--enable-pthread). Laurent couldn't reproduce the problem under Leopard. Cheers, Vincent Isambart