From: Tanaka Akira Date: 2009-11-25T16:57:29+09:00 Subject: [ruby-core:26904] Re: [Bug #1525](Closed) Deadlock in Ruby 1.9's VM caused by ConditionVariable.wait and fork? In article <4B07C4C5.8060102@plan99.net>, Hongli Lai writes: >> % ./ruby -e 'fork { puts }' >> -e:1: [BUG] native_mutex_unlock return non-zero: 1 >> ruby 1.9.2dev (2009-11-19 trunk 25848) [x86_64-freebsd6.4] > > This is what I get on FreeBSD 7.1-RELEASE: FreeBSD 8.0-RELEASE behaves similar to FreeBSD 6.4. % uname -mrsv FreeBSD 8.0-RELEASE FreeBSD 8.0-RELEASE #0: Sat Nov 21 15:48:17 UTC 2009 root@almeida.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC i386 % ./ruby -e 'fork { puts }' -e:1: [BUG] pthread_mutex_unlock: Operation not permitted (EPERM) ruby 1.9.2dev (2009-11-25 trunk 25911) [i386-freebsd8.0] -- control frame ---------- c:0009 p:---- s:0020 b:0020 l:000019 d:000019 CFUNC :write c:0008 p:---- s:0018 b:0018 l:000017 d:000017 CFUNC :puts c:0007 p:---- s:0016 b:0016 l:000015 d:000015 CFUNC :puts c:0006 p:0009 s:0013 b:0013 l:0010a4 d:000012 BLOCK -e:1 c:0005 p:---- s:0011 b:0011 l:000010 d:000010 FINISH c:0004 p:---- s:0009 b:0009 l:000008 d:000008 CFUNC :fork c:0003 p:0009 s:0006 b:0006 l:0010a4 d:000004 EVAL -e:1 c:0002 p:---- s:0004 b:0004 l:000003 d:000003 FINISH c:0001 p:0000 s:0002 b:0002 l:0010a4 d:0010a4 TOP --------------------------- -e:1:in `
' -e:1:in `fork' -e:1:in `block in
' -e:1:in `puts' -e:1:in `puts' -e:1:in `write' [NOTE] You may have encountered a bug in the Ruby interpreter or extension libraries. Bug reports are welcome. For details: http://www.ruby-lang.org/bugreport.html -- Tanaka Akira