Comment 14 for bug 520715

Revision history for this message
Lucas Nussbaum (lucas) wrote : Re: [Bug 520715] Re: building ruby1.8 with pthread support causes puppet hangs

On 16/02/10 at 23:10 -0000, Nigel Kersten wrote:
> So this isn't a Puppet bug at all.
>
> It looks to be a bug in the Ruby Timeout module that seems to be
> triggered when most of your cores are busy.

Hi,

Just to clarify: how do you know it is the same problem?

> I can reliably reproduce it by firing up openssl speed (n-1) times where
> n is the number of cores and then using the Timeout module.
>
> #!/usr/bin/ruby1.8
> #
>
> %x{/usr/bin/touch /tmp/7777}
> puts "executed without timeout ok"
>
> puts "executing with timeout"
>
> require 'timeout'
>
> status = Timeout::timeout(5) {
> %x{/usr/bin/touch /tmp/7777}
> }
>
> puts "executed with timeout ok"
>
>
> which will produce something like:
>
> root@testhost:~# ps auxww|grep [o]penssl
> root 22337 99.6 0.0 14616 2028 pts/6 R 15:04 2:52 openssl speed
> root 22338 99.9 0.0 14616 2028 pts/6 R 15:04 2:49 openssl speed
> root 22339 100 0.0 14616 2024 pts/6 R 15:04 2:49 openssl speed
>
> root@testhost:~# ~/tickle_ruby.rb
> executed without timeout ok
> executing with timeout
> /usr/lib/ruby/1.8/timeout.rb:60: execution expired (Timeout::Error)
> from /root/tickle_ruby.rb:11
>
> root@testhost:~# killall openssl
> [1] Terminated openssl speed &>/dev/null
> [2]- Terminated openssl speed &>/dev/null
> [3]+ Terminated openssl speed &>/dev/null
>
> root@testhost:~# ~/tickle_ruby.rb
> executed without timeout ok
> executing with timeout
> executed with timeout ok

I could not reproduce this problem on Debian (same Ruby version as on
Ubuntu). Could it be that the libc is at fault, instead of Ruby
itself?
--
| Lucas Nussbaum
| <email address hidden> http://www.lucas-nussbaum.net/ |
| jabber: <email address hidden> GPG: 1024D/023B3F4F |