Project

General

Profile

Bug #2529

Segmentation Fault is occasionally occurred in rake with cucumber and rspec

Added by mrkn (Kenta Murata) almost 10 years ago. Updated over 8 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Target version:
ruby -v:
ruby 1.9.2dev (2009-12-24 trunk 26158) [x86_64-darwin10.2.0]
Backport:
[ruby-core:27320]

Description

=begin
ruby is occasionally aborted due to SIGSEGV by the following Rakefile.

$ cat Rakefile
require 'rubygems'
require 'spec/rake/spectask'
require 'cucumber'
require 'cucumber/rake/task'

$ rake -T
(in /Users/muraken/garage/rakefile_test)
/opt/ruby/trunk/lib/ruby/gems/1.9.1/gems/polyglot-0.2.9/lib/polyglot.rb:70: [BUG] Segmentation fault
ruby 1.9.2dev (2009-12-24 trunk 26158) [x86_64-darwin10.2.0]

-- control frame ----------
c:0045 p:---- s:0160 b:0160 l:000159 d:000159 CFUNC :require
c:0044 p:0015 s:0156 b:0156 l:000155 d:000155 METHOD /opt/ruby/trunk/lib/ruby/gems/1.9.1/gems/polyglot-0.2.9/lib/polyglot.rb:70
c:0043 p:0185 s:0149 b:0149 l:000148 d:000148 TOP /opt/ruby/trunk/lib/ruby/gems/1.9.1/gems/rubygems-update-1.3.5/lib/rubygems.rb:1113
c:0042 p:---- s:0146 b:0146 l:000145 d:000145 FINISH
c:0041 p:---- s:0144 b:0144 l:000143 d:000143 CFUNC :require
c:0040 p:0015 s:0140 b:0140 l:000139 d:000139 METHOD /opt/ruby/trunk/lib/ruby/gems/1.9.1/gems/polyglot-0.2.9/lib/polyglot.rb:70
c:0039 p:0093 s:0133 b:0133 l:000132 d:000132 METHOD internal:gem_prelude:161
c:0038 p:0017 s:0130 b:0130 l:000129 d:000129 METHOD internal:gem_prelude:281
c:0037 p:---- s:0126 b:0126 l:000125 d:000125 FINISH
c:0036 p:0043 s:0124 b:0123 l:000122 d:000122 METHOD internal:gem_prelude:189
c:0035 p:0021 s:0114 b:0114 l:000113 d:000113 METHOD internal:gem_prelude:16
c:0034 p:0015 s:0109 b:0109 l:000108 d:000108 METHOD /opt/ruby/trunk/lib/ruby/gems/1.9.1/gems/cucumber-0.5.3/lib/cucumber/formatter/ansicolor.rb:102
c:0033 p:0180 s:0105 b:0105 l:000ce8 d:000ce8 CLASS /opt/ruby/trunk/lib/ruby/gems/1.9.1/gems/cucumber-0.5.3/lib/cucumber/formatter/ansicolor.rb:138
c:0032 p:0011 s:0103 b:0103 l:000102 d:000102 CLASS /opt/ruby/trunk/lib/ruby/gems/1.9.1/gems/cucumber-0.5.3/lib/cucumber/formatter/ansicolor.rb:60
c:0031 p:0011 s:0101 b:0101 l:000100 d:000100 CLASS /opt/ruby/trunk/lib/ruby/gems/1.9.1/gems/cucumber-0.5.3/lib/cucumber/formatter/ansicolor.rb:24
c:0030 p:0145 s:0099 b:0099 l:000098 d:000098 TOP /opt/ruby/trunk/lib/ruby/gems/1.9.1/gems/cucumber-0.5.3/lib/cucumber/formatter/ansicolor.rb:23
c:0029 p:---- s:0097 b:0097 l:000096 d:000096 FINISH
c:0028 p:---- s:0095 b:0095 l:000094 d:000094 CFUNC :require
c:0027 p:0015 s:0091 b:0091 l:000090 d:000090 METHOD /opt/ruby/trunk/lib/ruby/gems/1.9.1/gems/polyglot-0.2.9/lib/polyglot.rb:70
c:0026 p:0023 s:0084 b:0084 l:000083 d:000083 TOP /opt/ruby/trunk/lib/ruby/gems/1.9.1/gems/cucumber-0.5.3/lib/cucumber/cli/options.rb:2
c:0025 p:---- s:0082 b:0082 l:000081 d:000081 FINISH
c:0024 p:---- s:0080 b:0080 l:000079 d:000079 CFUNC :require
c:0023 p:0015 s:0076 b:0076 l:000075 d:000075 METHOD /opt/ruby/trunk/lib/ruby/gems/1.9.1/gems/polyglot-0.2.9/lib/polyglot.rb:70
c:0022 p:0023 s:0069 b:0069 l:000068 d:000068 TOP /opt/ruby/trunk/lib/ruby/gems/1.9.1/gems/cucumber-0.5.3/lib/cucumber/cli/configuration.rb:2
c:0021 p:---- s:0067 b:0067 l:000066 d:000066 FINISH
c:0020 p:---- s:0065 b:0065 l:000064 d:000064 CFUNC :require
c:0019 p:0015 s:0061 b:0061 l:000060 d:000060 METHOD /opt/ruby/trunk/lib/ruby/gems/1.9.1/gems/polyglot-0.2.9/lib/polyglot.rb:70
c:0018 p:0095 s:0054 b:0054 l:000053 d:000053 TOP /opt/ruby/trunk/lib/ruby/gems/1.9.1/gems/cucumber-0.5.3/lib/cucumber/cli/main.rb:8
c:0017 p:---- s:0052 b:0052 l:000051 d:000051 FINISH
c:0016 p:---- s:0050 b:0050 l:000049 d:000049 CFUNC :require
c:0015 p:0015 s:0046 b:0046 l:000045 d:000045 METHOD /opt/ruby/trunk/lib/ruby/gems/1.9.1/gems/polyglot-0.2.9/lib/polyglot.rb:70
c:0014 p:0148 s:0039 b:0039 l:000038 d:000038 TOP /opt/ruby/trunk/lib/ruby/gems/1.9.1/gems/cucumber-0.5.3/lib/cucumber.rb:8
c:0013 p:---- s:0037 b:0037 l:000036 d:000036 FINISH
c:0012 p:---- s:0035 b:0035 l:000034 d:000034 CFUNC :(null)
c:0011 p:0035 s:0031 b:0031 l:000030 d:000030 TOP /Users/muraken/garage/rakefile_test/Rakefile:3
c:0010 p:---- s:0029 b:0029 l:000028 d:000028 FINISH
c:0009 p:---- s:0027 b:0027 l:000026 d:000026 CFUNC :load
c:0008 p:0334 s:0023 b:0023 l:000022 d:000022 METHOD /opt/ruby/trunk/lib/ruby/1.9.1/rake.rb:2373
c:0007 p:0009 s:0018 b:0018 l:000011 d:000017 BLOCK /opt/ruby/trunk/lib/ruby/1.9.1/rake.rb:2007
c:0006 p:0009 s:0016 b:0016 l:000015 d:000015 METHOD /opt/ruby/trunk/lib/ruby/1.9.1/rake.rb:2058
c:0005 p:0011 s:0012 b:0012 l:000011 d:000011 METHOD /opt/ruby/trunk/lib/ruby/1.9.1/rake.rb:2006
c:0004 p:0021 s:0009 b:0009 l:000008 d:000008 METHOD /opt/ruby/trunk/lib/ruby/1.9.1/rake.rb:1991
c:0003 p:0036 s:0006 b:0006 l:0023e8 d:001cd8 EVAL /Users/muraken/bin/rake:31
c:0002 p:---- s:0004 b:0004 l:000003 d:000003 FINISH
c:0001 p:0000 s:0002 b:0002 l:0023e8 d:0023e8 TOP


/Users/muraken/bin/rake:31:in <main>'
/opt/ruby/trunk/lib/ruby/1.9.1/rake.rb:1991:in
run'
/opt/ruby/trunk/lib/ruby/1.9.1/rake.rb:2006:in load_rakefile'
/opt/ruby/trunk/lib/ruby/1.9.1/rake.rb:2058:in
standard_exception_handling'
/opt/ruby/trunk/lib/ruby/1.9.1/rake.rb:2007:in block in load_rakefile'
/opt/ruby/trunk/lib/ruby/1.9.1/rake.rb:2373:in
raw_load_rakefile'
/opt/ruby/trunk/lib/ruby/1.9.1/rake.rb:2373:in load'
/Users/muraken/garage/rakefile_test/Rakefile:3:in
'

$ gdb --args /opt/ruby/trunk/bin/ruby /opt/ruby/trunk/bin/rake -T
GNU gdb 6.3.50-20050815 (Apple version gdb-1346) (Fri Sep 18 20:40:51 UTC 2009)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "x86_64-apple-darwin"...Reading symbols for shared libraries ... done

(gdb) r
Starting program: /opt/ruby/trunk/bin/ruby /opt/ruby/trunk/bin/rake -T
Reading symbols for shared libraries + done
Reading symbols for shared libraries + done
Reading symbols for shared libraries + done
(in /Users/muraken/garage/rakefile_test)
Reading symbols for shared libraries + done
Reading symbols for shared libraries + done
Reading symbols for shared libraries + done

Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_INVALID_ADDRESS at address: 0x0000000000000008
0x000000010015ab54 in vm_backtrace_each (th=, lev=, iter=0x1001587d0 , arg=0x7fff5fbf9c68) at ../vm.c:751
751 if ((*iter)(arg, file, line_no, rb_id2str(cfp->me->def->original_id))) break;
(gdb) where
#0 0x000000010015ab54 in vm_backtrace_each (th=, lev=, iter=0x1001587d0 , arg=0x7fff5fbf9c68) at ../vm.c:751#1 0x000000010015b349 in vm_backtrace inlined at /Users/muraken/src/ruby-trunk.svn/vm.c:781
#2 0x000000010015b349 in rb_make_backtrace () at ../vm.c:1573#3 0x000000010003b445 in rb_longjmp (tag=6, mesg=4311864400) at ../eval.c:379
#4 0x000000010003b834 in rb_exc_raise (mesg=) at ../eval.c:444
#5 0x0000000100036669 in rb_raise (exc=4303971960, fmt=) at ../error.c:1172
#6 0x000000010003e2e0 in rb_require_safe (fname=4311869160, safe=0) at ../load.c:532
#7 0x000000010015be0d in vm_call_cfunc (th=0x1003016b0, reg_cfp=0x1004ff0e0, num=1, recv=4303980600, blockptr=0x0, flag=, me=0x101ad21c0) at vm_insnhelper.c:390
#8 0x000000010015c7d2 in vm_call_method (th=0x1003016b0, cfp=0x1004ff0e0, num=1, blockptr=0x0, flag=14, id=, me=0x101ad21c0, recv=4303980600) at vm_insnhelper.c:515
#9 0x000000010015f703 in vm_exec_core (th=0x1003016b0, initial=) at insns.def:999#10 0x0000000100166eb3 in vm_exec (th=0x1003016b0) at ../vm.c:1119
#11 0x0000000100167322 in rb_iseq_eval (iseqval=4304544400) at ../vm.c:1329
#12 0x000000010003ce78 in rb_load_internal (fname=4305598560, wrap=) at ../load.c:293
#13 0x000000010003e12c in rb_require_safe (fname=4305603280, safe=0) at ../load.c:582
#14 0x000000010015be0d in vm_call_cfunc (th=0x1003016b0, reg_cfp=0x1004ff240, num=1, recv=4303780520, blockptr=0x0, flag=, me=0x101ad21c0) at vm_insnhelper.c:390
#15 0x000000010015c7d2 in vm_call_method (th=0x1003016b0, cfp=0x1004ff240, num=1, blockptr=0x0, flag=14, id=, me=0x101ad21c0, recv=4303780520) at vm_insnhelper.c:515
#16 0x000000010015f703 in vm_exec_core (th=0x1003016b0, initial=) at insns.def:999#17 0x0000000100166eb3 in vm_exec (th=0x1003016b0) at ../vm.c:1119
#18 0x000000010016941a in vm_call0 (th=0x1003016b0, recv=4303893760, id=, argc=1, argv=0x7fff5fbfafd0, me=0x100394a30) at vm_eval.c:66
#19 0x000000010016d190 in rb_funcall (recv=4303893760, mid=, n=1) at vm_eval.c:234
#20 0x000000010013ba98 in rb_const_get_0 (klass=4303893760, id=660750, exclude=1, recurse=1) at ../variable.c:1360
#21 0x0000000100160d33 in vm_exec_core (th=0x1003016b0, initial=) at vm_insnhelper.c:1196
#22 0x0000000100166eb3 in vm_exec (th=0x1003016b0) at ../vm.c:1119#23 0x0000000100167322 in rb_iseq_eval (iseqval=4312755640) at ../vm.c:1329
#24 0x000000010003ce78 in rb_load_internal (fname=4312857400, wrap=) at ../load.c:293#25 0x000000010003e12c in rb_require_safe (fname=4312860920, safe=0) at ../load.c:582
#26 0x000000010015be0d in vm_call_cfunc (th=0x1003016b0, reg_cfp=0x1004ff6b8, num=1, recv=4303980600, blockptr=0x0, flag=, me=0x101ad21c0) at vm_insnhelper.c:390
#27 0x000000010015c7d2 in vm_call_method (th=0x1003016b0, cfp=0x1004ff6b8, num=1, blockptr=0x0, flag=14, id=, me=0x101ad21c0, recv=4303980600) at vm_insnhelper.c:515
#28 0x000000010015f703 in vm_exec_core (th=0x1003016b0, initial=) at insns.def:999
#29 0x0000000100166eb3 in vm_exec (th=0x1003016b0) at ../vm.c:1119
#30 0x0000000100167322 in rb_iseq_eval (iseqval=4313246760) at ../vm.c:1329
#31 0x000000010003ce78 in rb_load_internal (fname=4313577400, wrap=) at ../load.c:293
#32 0x000000010003e12c in rb_require_safe (fname=4313581000, safe=0) at ../load.c:582
#33 0x000000010015be0d in vm_call_cfunc (th=0x1003016b0, reg_cfp=0x1004ff818, num=1, recv=4303980600, blockptr=0x0, flag=, me=0x101ad21c0) at vm_insnhelper.c:390
#34 0x000000010015c7d2 in vm_call_method (th=0x1003016b0, cfp=0x1004ff818, num=1, blockptr=0x0, flag=14, id=, me=0x101ad21c0, recv=4303980600) at vm_insnhelper.c:515
#35 0x000000010015f703 in vm_exec_core (th=0x1003016b0, initial=) at insns.def:999
#36 0x0000000100166eb3 in vm_exec (th=0x1003016b0) at ../vm.c:1119
#37 0x0000000100167322 in rb_iseq_eval (iseqval=4313715880) at ../vm.c:1329
#38 0x000000010003ce78 in rb_load_internal (fname=4314292760, wrap=) at ../load.c:293
#39 0x000000010003e12c in rb_require_safe (fname=4314327280, safe=0) at ../load.c:582
#40 0x000000010015be0d in vm_call_cfunc (th=0x1003016b0, reg_cfp=0x1004ff978, num=1, recv=4303980600, blockptr=0x0, flag=, me=0x101ad21c0) at vm_insnhelper.c:390
#41 0x000000010015c7d2 in vm_call_method (th=0x1003016b0, cfp=0x1004ff978, num=1, blockptr=0x0, flag=14, id=, me=0x101ad21c0, recv=4303980600) at vm_insnhelper.c:515
#42 0x000000010015f703 in vm_exec_core (th=0x1003016b0, initial=) at insns.def:999
#43 0x0000000100166eb3 in vm_exec (th=0x1003016b0) at ../vm.c:1119
#44 0x0000000100167322 in rb_iseq_eval (iseqval=4315168400) at ../vm.c:1329
#45 0x000000010003ce78 in rb_load_internal (fname=4315194600, wrap=) at ../load.c:293
#46 0x000000010003e12c in rb_require_safe (fname=4315198080, safe=0) at ../load.c:582
#47 0x000000010015be0d in vm_call_cfunc (th=0x1003016b0, reg_cfp=0x1004ffad8, num=1, recv=4303980600, blockptr=0x0, flag=, me=0x101ad21c0) at vm_insnhelper.c:390
#48 0x000000010015c7d2 in vm_call_method (th=0x1003016b0, cfp=0x1004ffad8, num=1, blockptr=0x0, flag=14, id=, me=0x101ad21c0, recv=4303980600) at vm_insnhelper.c:515
#49 0x000000010015f703 in vm_exec_core (th=0x1003016b0, initial=) at insns.def:999
#50 0x0000000100166eb3 in vm_exec (th=0x1003016b0) at ../vm.c:1119
#51 0x0000000100167322 in rb_iseq_eval (iseqval=4304328560) at ../vm.c:1329
#52 0x000000010003ce78 in rb_load_internal (fname=4304367280, wrap=) at ../load.c:293
#53 0x000000010003e12c in rb_require_safe (fname=4304370760, safe=0) at ../load.c:582
#54 0x000000010015be0d in vm_call_cfunc (th=0x1003016b0, reg_cfp=0x1004ffc38, num=1, recv=4303980600, blockptr=0x0, flag=, me=0x10036ccf0) at vm_insnhelper.c:390
#55 0x000000010015c7d2 in vm_call_method (th=0x1003016b0, cfp=0x1004ffc38, num=1, blockptr=0x0, flag=8, id=, me=0x10036ccf0, recv=4303980600) at vm_insnhelper.c:515
#56 0x000000010015f703 in vm_exec_core (th=0x1003016b0, initial=) at insns.def:999
#57 0x0000000100166eb3 in vm_exec (th=0x1003016b0) at ../vm.c:1119
#58 0x0000000100167322 in rb_iseq_eval (iseqval=4304504240) at ../vm.c:1329
#59 0x000000010003ce78 in rb_load_internal (fname=4304506000, wrap=) at ../load.c:293
#60 0x000000010003db1a in rb_f_load (argc=, argv=) at ../load.c:366
#61 0x000000010015be0d in vm_call_cfunc (th=0x1003016b0, reg_cfp=0x1004ffd40, num=1, recv=4304631080, blockptr=0x0, flag=, me=0x10036cb90) at vm_insnhelper.c:390
#62 0x000000010015c7d2 in vm_call_method (th=0x1003016b0, cfp=0x1004ffd40, num=1, blockptr=0x0, flag=8, id=, me=0x10036cb90, recv=4304631080) at vm_insnhelper.c:515
#63 0x000000010015f703 in vm_exec_core (th=0x1003016b0, initial=) at insns.def:999
#64 0x0000000100166eb3 in vm_exec (th=0x1003016b0) at ../vm.c:1119
#65 0x00000001001671a0 in rb_iseq_eval_main (iseqval=4303722960) at ../vm.c:1343
#66 0x000000010003a352 in ruby_exec_internal (n=0x1008599d0) at ../eval.c:204
#67 0x000000010003ca6c in ruby_exec_node inlined at /Users/muraken/src/ruby-trunk.svn/eval.c:251
#68 0x000000010003ca6c in ruby_run_node (n=) at ../eval.c:244
#69 0x000000010000105f in main (argc=3, argv=0x7fff5fbfeb80) at ../main.c:35
=end


Related issues

Related to Ruby master - Bug #2330: Non systematic segmentation fault with autoload rubyspecClosed11/04/2009Actions
Related to Ruby master - Bug #2976: cucumberでSEGVClosed03/18/2010Actions
Related to Ruby master - Bug #3132: …/nokogiri-1.4.1/ext/nokogiri/nokogiri.bundle: [BUG] Bus ErrorClosed04/12/2010Actions
Has duplicate Ruby master - Bug #2786: Segfault when loading gemClosed02/24/2010Actions

History

#1

Updated by naruse (Yui NARUSE) over 9 years ago

  • Status changed from Open to Closed
  • % Done changed from 0 to 100

=begin
This issue was solved with changeset r27393.
Kenta, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.

=end

Also available in: Atom PDF