Bug #3100
closedLockup in child after fork
Description
=begin
I was using PTY.spawn and found a bug. I'm attaching a small testcase that at least on 2 my machines gives quite probable ruby process lockup in child.
I'm also attaching gdb backtrace of locked up child. It can be seen that we're stuck in NTPL's low-level lock that protects timer thread condition variable. So it looks like I'm doing fork at 'right' time, when this condition is being signaled in parent.
P.S. I'm categorizing it as core even though I can reproduce this only via PTY.spawn, 'cause pty.c looks very much innocent.
=end
Files
Updated by naruse (Yui NARUSE) over 14 years ago
=begin
Try ruby_1_8 branch and see the thread [ruby-core:28151].
=end
Updated by alk (Aliaksey Kandratsenka) over 14 years ago
=begin
ruby_1_8_7@27173 and ruby_1_8@27224 still hang.
with 1.8.7 branch the backtrace is a bit different
(gdb) bt
#0 0xffffe430 in __kernel_vsyscall ()
#1 0xf76d3b69 in __lll_lock_wait () at ../nptl/sysdeps/unix/sysv/linux/i386/i686/../i486/lowlevellock.S:142
#2 0xf76d16f6 in pthread_cond_signal@@GLIBC_2.3.2 ()
at ../nptl/sysdeps/unix/sysv/linux/i386/i686/../i486/pthread_cond_signal.S:174
#3 0xf7728e6d in rb_thread_stop_timer () at eval.c:12357
#4 0xf75b38b6 in __libc_fork () at ../nptl/sysdeps/unix/sysv/linux/i386/../fork.c:170
#5 0xf76d66f4 in __fork () at ../nptl/sysdeps/unix/sysv/linux/pt-fork.c:26
#6 0xf76f84d9 in establishShell (argc=1, argv=0xff9c80e0, self=4149235120) at pty.c:226
=end
Updated by kosaki (Motohiro KOSAKI) over 14 years ago
=begin
Unfortunatelly, I don't reproduce this problem on current ruby_1_8 branch. ruby_1_8_7 branch result is expected, you saw #2739 issue.
=end
Updated by alk (Aliaksey Kandratsenka) over 14 years ago
=begin
Pass --enable-pthread to ./configure. That's part of ruby configuration in Debian/Ubuntu.
Latest as of Sat May 8 14:39:23 UTC 2010 ruby_1_8 still hangs.
=end
Updated by vo.x (Vit Ondruch) about 13 years ago
- File strace.log strace.log added
May I ask what is the state of this issue? The reproducer was recently mentioned as an issue in upcoming RHEL 6.2 [1] and it lockups on my Fedora with ruby 1.8.7 (2011-06-30 patchlevel 352) [x86_64-linux]. I am
Updated by vo.x (Vit Ondruch) almost 13 years ago
Please can somebody take a look into this issue? Ruby 1.8.7-p352 are unfortunately still affected by this bug.
Updated by jeremyevans0 (Jeremy Evans) about 5 years ago
- Description updated (diff)
- Status changed from Open to Closed