Bug #8348

ruby hangs randomly in daemonized processes on Debian GNU/kFreeBSD

Added by Joel Lopes Da Silva 12 months ago. Updated 9 months ago.

[ruby-core:54708]
Status:Open
Priority:Normal
Assignee:-
Category:-
Target version:-
ruby -v:ruby 2.0.0p0 (2013-02-24 revision 39474) [x86_64-kfreebsd9.0-gnu] Backport:1.9.3: UNKNOWN, 2.0.0: UNKNOWN

Description

=begin
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 https://get.rvm.io | 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-p0missingdeclarationsGNUkFreeBSD.diff}))
(5) Run: (({ruby testrubydaemonizedprocesshang_kfreebsd.rb}))

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

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

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

History

#1 Updated by Hleb Valoshka 11 months 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 Updated by Hleb Valoshka 9 months 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 Updated by Hleb Valoshka 9 months ago

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

Also available in: Atom PDF