Forum: Ruby-core [Bug #2739] ruby 1.8.7 built with pthreads hangs under some circumstances

Posted by Lucas Nussbaum (Guest)
on 2010-03-09 09:31
(Received via mailing list)
Issue #2739 has been updated by Lucas Nussbaum.


No, I don't see any improvement with 24402.

I'm using that test case:
<-------
#!/usr/bin/ruby1.8

system("/usr/bin/touch /tmp/7777")
puts "executed without timeout ok"
require 'timeout'
status = Timeout::timeout(1) {
system("/usr/bin/touch /tmp/7777")
}
puts "executed with timeout ok\n"
--------------->
And that test runner, that I execute with ruby 1.9.1 to avoid conflicts:
<-------------
errs = 0
1.upto(100).each do |i|
  system("ruby1.8 t.rb")
  if $?.termsig == 2
    errs += 1
  end
end
puts errs
--------------->

Compiling various revisions from the 1_8 branch, I get the following 
results:
rev 23262: 100 successes

rev 23268: blocks, not killable with killall ruby1.9 (needs -9) (0 
successes)

rev 24394: 29 successes, 71 failures
doesn't block anymore, but raises an exception:
/usr/lib/ruby/1.8/timeout.rb:60: execution expired (Timeout::Error)
  from ../t.rb:6

rev 24402: 24 successes, 76 failures
(same behaviour as r24394)

rev 26851: 24 successes, 76 failures
(same behaviour as r24394)
----------------------------------------
http://redmine.ruby-lang.org/issues/show/2739
Please log in before posting. Registration is free and takes only a minute.
Existing account (Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
No account? Register here.