Bug #4827

meke test-all TESTS="-j2 test/ruby/test_fiber.rb" on Mac crash sometimes

Added by Motohiro KOSAKI almost 3 years ago. Updated almost 3 years ago.

[ruby-core:36735]
Status:Closed
Priority:Normal
Assignee:Tomoyuki Chikanaga
Category:core
Target version:1.9.3
ruby -v:ruby 1.9.3dev (2011-06-04 trunk 31919) [x86_64-darwin10.7.4] Backport:

Description

TestFiber#testterm = 0.00 s = .
TestFiber#test
throw = 0.00 s = .
TestFiber#testtls = 0.00 s = .
/Users/kosaki/ruby/lib/test/unit/parallel.rb:133: [BUG] Segmentation fault
ruby 1.9.3dev (2011-06-04 trunk 31919) [x86
64-darwin10.7.4]

-- Control frame information -----------------------------------------------
c:0007 p:---- s:0024 b:0024 l:000023 d:000023 CFUNC :_dump
c:0006 p:---- s:0022 b:0022 l:000021 d:000021 CFUNC :dump
c:0005 p:0071 s:0018 b:0016 l:000012 d:000015 BLOCK /Users/kosaki/ruby/lib/test/unit/parallel.rb:133
c:0004 p:0450 s:0013 b:0013 l:000012 d:000012 METHOD /Users/kosaki/ruby/lib/test/unit/parallel.rb:139
c:0003 p:0054 s:0006 b:0006 l:002188 d:000288 EVAL /Users/kosaki/ruby/lib/test/unit/parallel.rb:145
c:0002 p:---- s:0004 b:0004 l:000003 d:000003 FINISH
c:0001 p:0000 s:0002 b:0002 l:002188 d:002188 TOP

-- Ruby level backtrace information ----------------------------------------
/Users/kosaki/ruby/lib/test/unit/parallel.rb:145:in <main>'
/Users/kosaki/ruby/lib/test/unit/parallel.rb:139:in
run'
/Users/kosaki/ruby/lib/test/unit/parallel.rb:133:in rescue in run'
/Users/kosaki/ruby/lib/test/unit/parallel.rb:133:in
dump'
/Users/kosaki/ruby/lib/test/unit/parallel.rb:133:in `_dump'

-- See Crash Report log file under ~/Library/Logs/CrashReporter or ---------
-- /Library/Logs/CrashReporter, for the more detail of ---------------------
-- C level backtrace information -------------------------------------------

-- Other runtime information -----------------------------------------------

  • Loaded script: /Users/kosaki/ruby/lib/test/unit/parallel.rb

  • Loaded features:

    0 enumerator.so
    1 /Users/kosaki/ruby/.ext/x8664-darwin10.7.4/enc/encdb.bundle
    2 /Users/kosaki/ruby/.ext/x86
    64-darwin10.7.4/enc/trans/transdb.bundle
    3 /Users/kosaki/ruby/lib/rubygems/defaults.rb
    4 /Users/kosaki/ruby/lib/tsort.rb
    5 /Users/kosaki/ruby/lib/rubygems/deprecate.rb
    6 /Users/kosaki/ruby/lib/rubygems/dependencylist.rb
    7 /Users/kosaki/ruby/lib/rubygems/path
    support.rb
    8 /Users/kosaki/ruby/rbconfig.rb
    9 /Users/kosaki/ruby/lib/rubygems/exceptions.rb
    10 /Users/kosaki/ruby/lib/rubygems/customrequire.rb
    11 /Users/kosaki/ruby/lib/rubygems/version.rb
    12 /Users/kosaki/ruby/lib/rubygems/requirement.rb
    13 /Users/kosaki/ruby/lib/rubygems/platform.rb
    14 /Users/kosaki/ruby/lib/rubygems/specification.rb
    15 /Users/kosaki/ruby/lib/rubygems.rb
    16 /Users/kosaki/ruby/lib/optparse.rb
    17 /Users/kosaki/ruby/lib/minitest/unit.rb
    18 /Users/kosaki/ruby/lib/prettyprint.rb
    19 /Users/kosaki/ruby/lib/pp.rb
    20 /Users/kosaki/ruby/lib/test/unit/assertions.rb
    21 /Users/kosaki/ruby/lib/test/unit/testcase.rb
    22 /Users/kosaki/ruby/lib/test/unit.rb
    23 /Users/kosaki/ruby/.ext/x86
    64-darwin10.7.4/fiber.bundle
    24 /Users/kosaki/ruby/.ext/x8664-darwin10.7.4/continuation.bundle
    25 /Users/kosaki/ruby/lib/open3.rb
    26 /Users/kosaki/ruby/lib/timeout.rb
    27 /Users/kosaki/ruby/test/ruby/envutil.rb
    28 /Users/kosaki/ruby/test/ruby/test
    fiber.rb

[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

/Users/kosaki/ruby/lib/test/unit.rb:255:in write': closed stream (IOError)
from /Users/kosaki/ruby/lib/test/unit.rb:255:in
puts'
from /Users/kosaki/ruby/lib/test/unit.rb:255:in puts'
from /Users/kosaki/ruby/lib/test/unit.rb:498:in
block (2 levels) in runparallel'
from /Users/kosaki/ruby/lib/timeout.rb:67:in timeout'
from /Users/kosaki/ruby/lib/timeout.rb:98:in
timeout'
from /Users/kosaki/ruby/lib/test/unit.rb:497:in block in _run_parallel'
from /Users/kosaki/ruby/lib/test/unit.rb:495:in
each'
from /Users/kosaki/ruby/lib/test/unit.rb:495:in ensure in _run_parallel'
from /Users/kosaki/ruby/lib/test/unit.rb:552:in
runparallel'
from /Users/kosaki/ruby/lib/test/unit.rb:561:in _run_suites'
from /Users/kosaki/ruby/lib/minitest/unit.rb:746:in
runanything'
from /Users/kosaki/ruby/lib/minitest/unit.rb:909:in run_tests'
from /Users/kosaki/ruby/lib/minitest/unit.rb:896:in
block in run'
from /Users/kosaki/ruby/lib/minitest/unit.rb:895:in each'
from /Users/kosaki/ruby/lib/minitest/unit.rb:895:in
run'
from /Users/kosaki/ruby/lib/minitest/unit.rb:884:in run'
from /Users/kosaki/ruby/lib/test/unit.rb:21:in
run'
from /Users/kosaki/ruby/lib/test/unit.rb:609:in run'
from /Users/kosaki/ruby/lib/test/unit.rb:613:in
run'
from ./test/runner.rb:13:in `'
make: *** [yes-test-all] Error 1
[1] 8492 exit 2 make test-all OPTS="-v" TESTS="-v -q -j2 test/ruby/test_fiber.rb"

Process: ruby-193 [8494]
Path: /Users/kosaki/ruby/ruby-193
Identifier: ruby-193
Version: ??? (???)
Code Type: X86-64 (Native)
Parent Process: ruby-193 [8493]

Date/Time: 2011-06-05 05:07:41.668 +0900
OS Version: Mac OS X 10.6.7 (10J4138)
Report Version: 6

Exception Type: EXCBADACCESS (SIGABRT)
Exception Codes: KERNINVALIDADDRESS at 0x000000000000000d
Crashed Thread: 0 Dispatch queue: com.apple.main-thread

Application Specific Information:
abort() called

Thread 0 Crashed: Dispatch queue: com.apple.main-thread
0 libSystem.B.dylib 0x00007fff885225d6 _kill + 10
1 libSystem.B.dylib 0x00007fff885c2cde abort + 83
2 ruby-193 0x000000010003853e rb
bugerrno + 0
3 ruby-193 0x00000001000fc652 signal
exec + 0
4 libSystem.B.dylib 0x00007fff8853466a sigtramp + 26
5 ruby-193 0x000000010014c275 classname + 49
6 ruby-193 0x000000010014c406 rb
classpath + 21
7 ruby-193 0x000000010014c8f0 rb
classname + 29
8 ruby-193 0x000000010014c907 rb
class2name + 21
9 ruby-193 0x000000010014c959 rbobjclassname + 29
10 ruby-193 0x000000010008d58e rbanytos + 21
11 ruby-193 0x00000001000399ff name
errmesgtostr + 268
12 ruby-193 0x00000001001756e7 call
cfunc + 337
13 ruby-193 0x0000000100178b6f vmcall0 + 685
14 ruby-193 0x0000000100179fad rb
call0 + 171
15 ruby-193 0x0000000100179f00 rbcall + 59
16 ruby-193 0x000000010017a1cd rb
funcall + 534
17 ruby-193 0x00000001000739a0 wobject + 1018
18 ruby-193 0x000000010007325c w
objeach + 139
19 ruby-193 0x000000010014e777 obj
ivari + 195
20 ruby-193 0x0000000100056986 foreach
safei + 62
21 ruby-193 0x000000010010822c st
foreach + 136
22 ruby-193 0x00000001000569e6 stforeachsafe + 67
23 ruby-193 0x000000010014e80a objivareach + 130
24 ruby-193 0x000000010014e851 rbivarforeach + 69
25 ruby-193 0x00000001000735a4 wobjivar + 218
26 ruby-193 0x0000000100074776 w
object + 4560
27 ruby-193 0x0000000100074b60 marshaldump + 608
28 ruby-193 0x00000001001756b0 call
cfunc + 282
29 ruby-193 0x0000000100175517 vmcallcfunc + 284
30 ruby-193 0x00000001001746e0 vmcallmethod + 373
31 ruby-193 0x000000010016f242 vmexeccore + 11449
32 ruby-193 0x000000010017f01a vmexec + 147
33 ruby-193 0x000000010017f9ed rb
iseqevalmain + 45
34 ruby-193 0x000000010003d3a7 rubyexecinternal + 193
35 ruby-193 0x000000010003d4cb rubyexecnode + 30
36 ruby-193 0x000000010003d49e rubyrunnode + 56
37 ruby-193 0x0000000100000daf main + 79 (main.c:40)
38 ruby-193 0x0000000100000d58 start + 52

Thread 1:
0 libSystem.B.dylib 0x00007fff8850ef8a _semwaitsignal + 10
1 libSystem.B.dylib 0x00007fff88512da1 pthreadcondwait + 1286
2 ruby-193 0x0000000100182c8f native
condwait + 29
3 ruby-193 0x000000010018294a gvl
acquire + 90
4 ruby-193 0x0000000100185214 blockingregionend + 33
5 ruby-193 0x0000000100185477 rbthreadioblockingregion + 207
6 ruby-193 0x000000010005d2c1 rbreadinternal + 60
7 ruby-193 0x000000010005e97d iofillbuf + 177
8 ruby-193 0x0000000100060cf4 rb
iogetlinefast + 498
9 ruby-193 0x0000000100061175 rbiogetline1 + 372
10 ruby-193 0x0000000100061afb rb
iogetline + 63
11 ruby-193 0x0000000100061b48 rb
iogetsm + 35
12 ruby-193 0x00000001001756b0 callcfunc + 282
13 ruby-193 0x0000000100175517 vm
callcfunc + 284
14 ruby-193 0x00000001001746e0 vm
callmethod + 373
15 ruby-193 0x000000010016f242 vm
execcore + 11449
16 ruby-193 0x000000010017f01a vm
exec + 147
17 ruby-193 0x000000010017db32 invokeblockfromc + 584
18 ruby-193 0x000000010017dcb8 rb
vminvokeproc + 253
19 ruby-193 0x0000000100183f61 threadstartfunc2 + 512
20 ruby-193 0x000000010018309d thread
startfunc1 + 51
21 libSystem.B.dylib 0x00007fff8850d4f6 pthreadstart + 331
22 libSystem.B.dylib 0x00007fff8850d3a9 thread_start + 13

Thread 2:
0 libSystem.B.dylib 0x00007fff8850ef8a _semwaitsignal + 10
1 libSystem.B.dylib 0x00007fff88512da1 pthreadcondwait + 1286
2 ruby-193 0x0000000100182cce native
condtimedwait + 37
3 ruby-193 0x000000010018367d thread
timer + 121
4 libSystem.B.dylib 0x00007fff8850d4f6 pthreadstart + 331
5 libSystem.B.dylib 0x00007fff8850d3a9 thread_start + 13

Thread 0 crashed with X86 Thread State (64-bit):
rax: 0x0000000000000000 rbx: 0x0000000000000085 rcx: 0x000000010035c948 rdx: 0x0000000000000000
rdi: 0x000000000000212e rsi: 0x0000000000000006 rbp: 0x000000010035c960 rsp: 0x000000010035c948
r8: 0x00007fff70f2da40 r9: 0x0000000000000000 r10: 0x00007fff8851e616 r11: 0xffffff80002e4730
r12: 0x0000000000000000 r13: 0x0000000000000000 r14: 0x00000001011338a8 r15: 0x00000001005ffe48
rip: 0x00007fff885225d6 rfl: 0x0000000000000202 cr2: 0x000000010035afd8

Binary Images:
0x100000000 - 0x100225ff7 +ruby-193 ??? (???) /Users/kosaki/ruby/ruby-193
0x100362000 - 0x100363fff +encdb.bundle ??? (???) /Users/kosaki/ruby/.ext/x8664-darwin10.7.4/enc/encdb.bundle
0x100366000 - 0x100367fff +transdb.bundle ??? (???) /Users/kosaki/ruby/.ext/x86
64-darwin10.7.4/enc/trans/transdb.bundle
0x10036b000 - 0x10036bfff +fiber.bundle ??? (???) /Users/kosaki/ruby/.ext/x8664-darwin10.7.4/fiber.bundle
0x10036e000 - 0x10036efff +continuation.bundle ??? (???) /Users/kosaki/ruby/.ext/x86
64-darwin10.7.4/continuation.bundle
0x7fff5fc00000 - 0x7fff5fc3bdef dyld 132.1 (???) /usr/lib/dyld
0x7fff805a7000 - 0x7fff8065dfff libobjc.A.dylib 227.0.0 (compatibility 1.0.0) /usr/lib/libobjc.A.dylib
0x7fff862ec000 - 0x7fff862f0ff7 libmathCommon.A.dylib 315.0.0 (compatibility 1.0.0) /usr/lib/system/libmathCommon.A.dylib
0x7fff86677000 - 0x7fff866f4fef libstdc++.6.dylib 7.9.0 (compatibility 7.0.0) /usr/lib/libstdc++.6.dylib
0x7fff884d3000 - 0x7fff88694fff libSystem.B.dylib 125.2.10 (compatibility 1.0.0) /usr/lib/libSystem.B.dylib
0x7fff88789000 - 0x7fff887d5fff libauto.dylib ??? (???) /usr/lib/libauto.dylib
0x7fffffe00000 - 0x7fffffe01fff libSystem.B.dylib ??? (???) /usr/lib/libSystem.B.dylib

History

#1 Updated by Motohiro KOSAKI almost 3 years ago

crash in rbmethodentrygetwithout_cache() is more frequently happen.


Process: ruby-193 [8880]
Path: /Users/kosaki/ruby/ruby-193
Identifier: ruby-193
Version: ??? (???)
Code Type: X86-64 (Native)
Parent Process: ruby-193 [8878]

Date/Time: 2011-06-05 13:36:15.717 +0900
OS Version: Mac OS X 10.6.7 (10J4138)
Report Version: 6

Exception Type: EXCBADACCESS (SIGABRT)
Exception Codes: KERNINVALIDADDRESS at 0x0000000000887338
Crashed Thread: 0 Dispatch queue: com.apple.main-thread

Application Specific Information:
abort() called

Thread 0 Crashed: Dispatch queue: com.apple.main-thread
0 libSystem.B.dylib 0x00007fff885225d6 _kill + 10
1 libSystem.B.dylib 0x00007fff885c2cde abort + 83
2 ruby-193 0x000000010003853e rb
bugerrno + 0
3 ruby-193 0x00000001000fc652 signal
exec + 0
4 libSystem.B.dylib 0x00007fff8853466a sigtramp + 26
5 ruby-193 0x00000001001065d4 st
lookup + 174
6 ruby-193 0x0000000100176f74 searchmethod + 86
7 ruby-193 0x0000000100176fa3 rb
methodentrygetwithoutcache + 29
8 ruby-193 0x00000001001770da rbmethodentry + 122
9 ruby-193 0x0000000100174538 vmmethodsearch + 101
10 ruby-193 0x00000001001730e0 vmexeccore + 27479
11 ruby-193 0x000000010017f01a vmexec + 147
12 ruby-193 0x000000010017db32 invoke
blockfromc + 584
13 ruby-193 0x000000010017dbb9 vmyield + 76
14 ruby-193 0x000000010017a468 rb
yield0 + 37
15 ruby-193 0x000000010017a439 rb
yield + 57
16 ruby-193 0x000000010000d620 rbarycollect + 203
17 ruby-193 0x00000001001756c8 callcfunc + 306
18 ruby-193 0x0000000100175517 vm
callcfunc + 284
19 ruby-193 0x00000001001746e0 vm
callmethod + 373
20 ruby-193 0x000000010016f242 vm
execcore + 11449
21 ruby-193 0x000000010017f01a vm
exec + 147
22 ruby-193 0x000000010017f9ed rbiseqevalmain + 45
23 ruby-193 0x000000010003d3a7 ruby
execinternal + 193
24 ruby-193 0x000000010003d4cb ruby
execnode + 30
25 ruby-193 0x000000010003d49e ruby
run_node + 56
26 ruby-193 0x0000000100000daf main + 79 (main.c:40)
27 ruby-193 0x0000000100000d58 start + 52

Thread 1:
0 libSystem.B.dylib 0x00007fff8850ef8a _semwaitsignal + 10
1 libSystem.B.dylib 0x00007fff88512da1 pthreadcondwait + 1286
2 ruby-193 0x0000000100182cce native
condtimedwait + 37
3 ruby-193 0x000000010018367d thread
timer + 121
4 libSystem.B.dylib 0x00007fff8850d4f6 pthreadstart + 331
5 libSystem.B.dylib 0x00007fff8850d3a9 thread_start + 13

Thread 0 crashed with X86 Thread State (64-bit):
rax: 0x0000000000000000 rbx: 0x000000000000031d rcx: 0x000000010035c948 rdx: 0x0000000000000000
rdi: 0x00000000000022b0 rsi: 0x0000000000000006 rbp: 0x000000010035c960 rsp: 0x000000010035c948
r8: 0x00007fff70f2da40 r9: 0x0000000000000000 r10: 0x00007fff8851e616 r11: 0xffffff80002e4730
r12: 0x0000000000000000 r13: 0x0000000000000000 r14: 0x0000000102092420 r15: 0x00000001005ffc90
rip: 0x00007fff885225d6 rfl: 0x0000000000000202 cr2: 0x000000010035afd8

Binary Images:
0x100000000 - 0x100225ff7 +ruby-193 ??? (???) /Users/kosaki/ruby/ruby-193
0x100362000 - 0x100363fff +encdb.bundle ??? (???) /Users/kosaki/ruby/.ext/x8664-darwin10.7.4/enc/encdb.bundle
0x100366000 - 0x100367fff +transdb.bundle ??? (???) /Users/kosaki/ruby/.ext/x86
64-darwin10.7.4/enc/trans/transdb.bundle
0x10036b000 - 0x10036bfff +fiber.bundle ??? (???) /Users/kosaki/ruby/.ext/x8664-darwin10.7.4/fiber.bundle
0x10036e000 - 0x10036efff +continuation.bundle ??? (???) /Users/kosaki/ruby/.ext/x86
64-darwin10.7.4/continuation.bundle
0x7fff5fc00000 - 0x7fff5fc3bdef dyld 132.1 (???) /usr/lib/dyld
0x7fff805a7000 - 0x7fff8065dfff libobjc.A.dylib 227.0.0 (compatibility 1.0.0) /usr/lib/libobjc.A.dylib
0x7fff862ec000 - 0x7fff862f0ff7 libmathCommon.A.dylib 315.0.0 (compatibility 1.0.0) /usr/lib/system/libmathCommon.A.dylib
0x7fff86677000 - 0x7fff866f4fef libstdc++.6.dylib 7.9.0 (compatibility 7.0.0) /usr/lib/libstdc++.6.dylib
0x7fff884d3000 - 0x7fff88694fff libSystem.B.dylib 125.2.10 (compatibility 1.0.0) /usr/lib/libSystem.B.dylib
0x7fff88789000 - 0x7fff887d5fff libauto.dylib ??? (???) /usr/lib/libauto.dylib
0x7fffffe00000 - 0x7fffffe01fff libSystem.B.dylib ??? (???) /usr/lib/libSystem.B.dylib

#2 Updated by Tomoyuki Chikanaga almost 3 years ago

Hi,

I've created small script which can reproduce "crash in rbmethodentrygetwithout_cache()".

script:
GC.stress = true
a = [0].map {|i| Fiber.new{Fiber.yield}.resume }
p a # => [BUG] Segmentation fault

result:
ruby 1.9.3dev (2011-06-06 trunk 31944) [x86_64-darwin10.7.0]

-- Control frame information -----------------------------------------------
c:0004 p:---- s:0011 b:0011 l:000010 d:000010 CFUNC :p
c:0003 p:0043 s:0007 b:0007 l:002178 d:002570 EVAL fiber_segv.rb:3
c:0002 p:---- s:0004 b:0004 l:000003 d:000003 FINISH
c:0001 p:0000 s:0002 b:0002 l:002178 d:002178 TOP

-- Ruby level backtrace information ----------------------------------------
fiber_segv.rb:3:in <main>'
fiber_segv.rb:3:in
p'

-- See Crash Report log file under ~/Library/Logs/CrashReporter or ---------
-- /Library/Logs/CrashReporter, for the more detail of ---------------------
-- C level backtrace information -------------------------------------------

-- Other runtime information -----------------------------------------------

  • Loaded script: fiber_segv.rb

  • Loaded features:

    0 enumerator.so

[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

CrashReporter:
Process: miniruby [80373]
Path: /Users/nagachika/opt/ruby-trunk/src/build_O0/miniruby
Identifier: miniruby
Version: ??? (???)
Code Type: X86-64 (Native)
Parent Process: zsh [255]

Date/Time: 2011-06-07 00:24:44.220 +0900
OS Version: Mac OS X 10.6.7 (10J869)
Report Version: 6

Exception Type: EXCBADACCESS (SIGABRT)
Exception Codes: KERNINVALIDADDRESS at 0x0000000000000010
Crashed Thread: 0 Dispatch queue: com.apple.main-thread

Application Specific Information:
abort() called

Thread 0 Crashed: Dispatch queue: com.apple.main-thread
0 libSystem.B.dylib 0x00007fff87ae65d6 _kill + 10
1 libSystem.B.dylib 0x00007fff87b86cd6 abort + 83
2 miniruby 0x0000000100038306 rb
bugerrno + 0 (error.c:278)
3 miniruby 0x00000001000fc5de signal
exec + 0 (signal.c:628)
4 libSystem.B.dylib 0x00007fff87af866a sigtramp + 26
5 miniruby 0x00000001001064ca st
lookup + 24 (st.c:330)
6 miniruby 0x0000000100176ef8 searchmethod + 86 (vmmethod.c:399)
7 miniruby 0x0000000100176f27 rbmethodentrygetwithoutcache + 29 (vmmethod.c:418)
8 miniruby 0x000000010017705e rbmethodentry + 122 (vmmethod.c:449)
9 miniruby 0x000000010017965b rb
searchmethodentry + 459 (vmeval.c:375)
10 miniruby 0x0000000100179eb2 rb
call0 + 44 (vmeval.c:227)
11 miniruby 0x0000000100179e84 rb
call + 59 (vmeval.c:439)
12 miniruby 0x000000010017a151 rb
funcall + 534 (vmeval.c:639)
13 miniruby 0x000000010008d415 rb
inspect + 43 (object.c:367)
14 miniruby 0x00000001000692a7 rbp + 22 (io.c:6233)
15 miniruby 0x000000010006943e rb
fp + 57 (io.c:6269)
16 miniruby 0x0000000100175634 call
cfunc + 282 (vminsnhelper.c:317)
17 miniruby 0x000000010017549b vm
callcfunc + 284 (vminsnhelper.c:404)
18 miniruby 0x0000000100174664 vmcallmethod + 371 (vminsnhelper.c:526)
19 miniruby 0x000000010016f1ce vm
execcore + 11449 (insns.def:1012)
20 miniruby 0x000000010017ef9e vm
exec + 147 (vm.c:1163)
21 miniruby 0x000000010017f971 rbiseqevalmain + 45 (vm.c:1404)
22 miniruby 0x000000010003d16f ruby
execinternal + 193 (eval.c:213)
23 miniruby 0x000000010003d293 ruby
execnode + 30 (eval.c:261)
24 miniruby 0x000000010003d266 ruby
run_node + 56 (eval.c:253)
25 miniruby 0x0000000100000def main + 79 (main.c:40)
26 miniruby 0x0000000100000d98 start + 52

Thread 1:
0 libSystem.B.dylib 0x00007fff87ad2f8a _semwaitsignal + 10
1 libSystem.B.dylib 0x00007fff87ad6da1 pthreadcondwait + 1286
2 miniruby 0x0000000100182c52 native
condtimedwait + 37 (threadpthread.c:304)
3 miniruby 0x0000000100183601 threadtimer + 121 (threadpthread.c:1008)
4 libSystem.B.dylib 0x00007fff87ad14f6 pthreadstart + 331
5 libSystem.B.dylib 0x00007fff87ad13a9 thread_start + 13

Thread 0 crashed with X86 Thread State (64-bit):
rax: 0x0000000000000000 rbx: 0x0000000000000003 rcx: 0x000000010035da88 rdx: 0x0000000000000000
rdi: 0x00000000000139f5 rsi: 0x0000000000000006 rbp: 0x000000010035daa0 rsp: 0x000000010035da88
r8: 0x00007fff70e53a40 r9: 0x0000000000000000 r10: 0x00007fff87ae2616 r11: 0x0000000000000206
r12: 0x0000000000000000 r13: 0x0000000000000000 r14: 0x000000010060ed88 r15: 0x00000001005ffef8
rip: 0x00007fff87ae65d6 rfl: 0x0000000000000206 cr2: 0x00007fff70e4b120

Binary Images:
0x100000000 - 0x100225fef +miniruby ??? (???) /Users/nagachika/opt/ruby-trunk/src/build_O0/miniruby
0x7fff5fc00000 - 0x7fff5fc3bdef dyld 132.1 (???) /usr/lib/dyld
0x7fff8042a000 - 0x7fff80476fff libauto.dylib ??? (???) /usr/lib/libauto.dylib
0x7fff8405b000 - 0x7fff84111fff libobjc.A.dylib 227.0.0 (compatibility 1.0.0) /usr/lib/libobjc.A.dylib
0x7fff85f75000 - 0x7fff85f79ff7 libmathCommon.A.dylib 315.0.0 (compatibility 1.0.0) /usr/lib/system/libmathCommon.A.dylib
0x7fff86a1a000 - 0x7fff86a97fef libstdc++.6.dylib 7.9.0 (compatibility 7.0.0) /usr/lib/libstdc++.6.dylib
0x7fff87a97000 - 0x7fff87c58fff libSystem.B.dylib 125.2.10 (compatibility 1.0.0) /usr/lib/libSystem.B.dylib
0x7fffffe00000 - 0x7fffffe01fff libSystem.B.dylib ??? (???) /usr/lib/libSystem.B.dylib

#3 Updated by Tomoyuki Chikanaga almost 3 years ago

Hi,

I think the following tiny patch will fix this problem.
Please check it out.

diff --git a/cont.c b/cont.c
index 72e1117..770cfeb 100644
--- a/cont.c
+++ b/cont.c
@@ -1148,8 +1148,8 @@ rootfiberalloc(rbthreadt *th)
#ifdef WIN32
fib->fib
handle = ConvertThreadToFiber(0);
#endif
- fib->status = RUNNING;
#endif
+ fib->status = RUNNING;
fib->prevfiber = fib->nextfiber = fib;

 return fib;

#4 Updated by Shota Fukumori almost 3 years ago

nagachika's patch works great. Thanks!

This patch should be committed.

#5 Updated by Tomoyuki Chikanaga almost 3 years ago

  • Status changed from Open to Closed
  • Assignee set to Tomoyuki Chikanaga

Thank you for your checking.
I committed it at r31954.

Also available in: Atom PDF