Bug #8348

ruby hangs randomly in daemonized processes on Debian GNU/kFreeBSD

Added by JoeKun (Joel Lopes Da Silva) almost 4 years ago. Updated over 2 years ago.

Target version:
ruby -v:
ruby 2.0.0p0 (2013-02-24 revision 39474) [x86_64-kfreebsd9.0-gnu]


Ruby scripts that use Process.daemon seem to hang randomly on Debian GNU/kFreeBSD.

Steps to reproduce:

(1) Install Debian GNU/kFreeBSD Wheezy
(2) Install rvm: (({curl -L | bash -s stable}))
(3) Install any dependencies recommended by rvm
(4) Install ruby 2.0: (({rvm install 2.0.0 --patch /path/to/ruby-2.0.0-p0_missing_declarations_GNU_kFreeBSD.diff}))
(5) Run: (({ruby test_ruby_daemonized_process_hang_kfreebsd.rb}))

The script never actually finishes, and hangs soon after using Process.daemon.

test_ruby_daemonized_process_hang_kfreebsd.rb View - Test file revealing hangs in ruby scripts using Process.daemon on Debian GNU/kFreeBSD. (356 Bytes) JoeKun (Joel Lopes Da Silva), 04/30/2013 04:06 PM

ruby-2.0.0-p0_missing_declarations_GNU_kFreeBSD.diff View (2.99 KB) JoeKun (Joel Lopes Da Silva), 04/30/2013 04:06 PM


#1 [ruby-core:55144] Updated by 375gnu (Hleb Valoshka) almost 4 years ago

Did you run this test on some kind of SMP box? Ruby on Debian GNU/kFreeBSD has problems with fork in SMP environment. It was discussed a bit in debian-bsd maillist but there is still no solution.

#2 [ruby-core:56328] Updated by 375gnu (Hleb Valoshka) over 3 years ago

JoeKun, can you retest it with the latest Sid (eglibc >= 2.17-91)? It has new implementation of libpthreads, which has fixed bug with ruby's fork().

#3 [ruby-core:56351] Updated by 375gnu (Hleb Valoshka) over 3 years ago

I've run test myself for 67 times and none of them finished unsuccessfully.

#4 [ruby-core:65500] Updated by JoeKun (Joel Lopes Da Silva) over 2 years ago

I can't reproduce this bug with ruby 2.1.3 anymore. Feel free to close it.

#5 [ruby-core:65501] Updated by hsbt (Hiroshi SHIBATA) over 2 years ago

  • Status changed from Open to Rejected

Also available in: Atom PDF