Bug #6558

Crash in garbage collection - using caller inside finalizer method

Added by Bill Paulson almost 3 years ago. Updated over 2 years ago.

[ruby-core:45488]
Status:Rejected
Priority:Normal
Assignee:Narihiro Nakamura
ruby -v:ruby 1.9.2p290 (2011-07-09 revision 32553) [i686-linux] Backport:

Description

While debugging a hangup in a daemon, created the following program that crashes intermittently in 1.9.1 and 1.9.2 (don't have a current 1.9.3), and finishes in 1.8 (ruby 1.8.7 (2012-02-08 patchlevel 358) [i686-linux]):
====== infinite.rb
def foo
x = "hello world"*100000
ObjectSpace.define_finalizer(x, lambda { |x| recurse(1000);print "x: "+caller[1]+"\n"})
x = nil
end

def recurse(n)
y="hello world"*1000
ObjectSpace.define_finalizer(y, lambda { |x| print "y: "+caller[1]+"\n" })
y = nil
n>0 ? recurse(n-1): nil
end

500.times do |i|
foo
end

puts "done"

The host machine is running Red Hat Enterprise Linux Server release 5.3 (Tikanga).

The program isn't deterministic - usually it crashes, sometimes not.

In 1.9, even when it finishes it's still got a problem: the number of output messages is less than the number of finalizers that should run. Running it via
ruby infinite.rb | sort | uniq -c
gets results like:
1 done
496 x: infinite.rb:2:in foo'
2 x: infinite.rb:8:in
recurse'
105214 y: infinite.rb:2:in foo'
359123 y: infinite.rb:8:in
recurse'
19099 y: infinite.rb:9:in block in recurse'
999 y: infinite.rb:9:in
new'
2004 y: infinite.rb:9:in print'
12013 y: infinite.rb:9:in
recurse'

The number of "x: infinite" messages adds to 498 (496+2), rather than the expected 500. The number of "y: infinite" messages adds up to 498452 instead of the expected 500,000.

========== Trace from crashing run

infinite.rb:9: [BUG] rb_gc_mark(): unknown data type 0x0(0xa3a64bc) non object
ruby 1.9.1p429 (2010-07-02 revision 28523) [i686-linux]

-- control frame ----------
c:0055 p:---- s:0243 b:0243 l:000242 d:000242 CFUNC :caller
c:0054 p:0012 s:0240 b:0238 l:000e8c d:000237 LAMBDA infinite.rb:9
c:0053 p:---- s:0235 b:0235 l:000234 d:000234 FINISH
c:0052 p:---- s:0233 b:0233 l:000232 d:000232 CFUNC :call
c:0051 p:0009 s:0231 b:0231 l:000230 d:000230 METHOD infinite.rb:8
c:0050 p:0062 s:0226 b:0226 l:00246c d:00246c METHOD infinite.rb:11
c:0049 p:0062 s:0221 b:0221 l:0024dc d:0024dc METHOD infinite.rb:11
c:0048 p:0062 s:0216 b:0216 l:001bf4 d:001bf4 METHOD infinite.rb:11
c:0047 p:0062 s:0211 b:0211 l:001c6c d:001c6c METHOD infinite.rb:11
c:0046 p:0062 s:0206 b:0206 l:001cdc d:001cdc METHOD infinite.rb:11
c:0045 p:0062 s:0201 b:0201 l:001e54 d:001e54 METHOD infinite.rb:11
c:0044 p:0062 s:0196 b:0196 l:0005a4 d:0005a4 METHOD infinite.rb:11
c:0043 p:0062 s:0191 b:0191 l:000ecc d:000ecc METHOD infinite.rb:11
c:0042 p:0062 s:0186 b:0186 l:00007c d:00007c METHOD infinite.rb:11
c:0041 p:0062 s:0181 b:0181 l:0024c4 d:0024c4 METHOD infinite.rb:11
c:0040 p:0062 s:0176 b:0176 l:001654 d:001654 METHOD infinite.rb:11
c:0039 p:0062 s:0171 b:0171 l:001f3c d:001f3c METHOD infinite.rb:11
c:0038 p:0062 s:0166 b:0166 l:002064 d:002064 METHOD infinite.rb:11
c:0037 p:0062 s:0161 b:0161 l:0024c4 d:0024c4 METHOD infinite.rb:11
c:0036 p:0062 s:0156 b:0156 l:001b6c d:001b6c METHOD infinite.rb:11
c:0035 p:0062 s:0151 b:0151 l:00238c d:00238c METHOD infinite.rb:11
c:0034 p:0062 s:0146 b:0146 l:0004bc d:0004bc METHOD infinite.rb:11
c:0033 p:0062 s:0141 b:0141 l:0012d4 d:0012d4 METHOD infinite.rb:11
c:0032 p:0062 s:0136 b:0136 l:0002ac d:0002ac METHOD infinite.rb:11
c:0031 p:0062 s:0131 b:0131 l:001fd4 d:001fd4 METHOD infinite.rb:11
c:0030 p:0062 s:0126 b:0126 l:00131c d:00131c METHOD infinite.rb:11
c:0029 p:0062 s:0121 b:0121 l:00050c d:00050c METHOD infinite.rb:11
c:0028 p:0062 s:0116 b:0116 l:0011c4 d:0011c4 METHOD infinite.rb:11
c:0027 p:0062 s:0111 b:0111 l:0015e4 d:0015e4 METHOD infinite.rb:11
c:0026 p:0062 s:0106 b:0106 l:0013a4 d:0013a4 METHOD infinite.rb:11
c:0025 p:0062 s:0101 b:0101 l:000fe4 d:000fe4 METHOD infinite.rb:11
c:0024 p:0062 s:0096 b:0096 l:000f84 d:000f84 METHOD infinite.rb:11
c:0023 p:0062 s:0091 b:0091 l:0017f4 d:0017f4 METHOD infinite.rb:11
c:0022 p:0062 s:0086 b:0086 l:001e4c d:001e4c METHOD infinite.rb:11
c:0021 p:0062 s:0081 b:0081 l:00113c d:00113c METHOD infinite.rb:11
c:0020 p:0062 s:0076 b:0076 l:00166c d:00166c METHOD infinite.rb:11
c:0019 p:0062 s:0071 b:0071 l:0010b4 d:0010b4 METHOD infinite.rb:11
c:0018 p:0062 s:0066 b:0066 l:00128c d:00128c METHOD infinite.rb:11
c:0017 p:0062 s:0061 b:0061 l:0019a4 d:0019a4 METHOD infinite.rb:11
c:0016 p:0062 s:0056 b:0056 l:000aac d:000aac METHOD infinite.rb:11
c:0015 p:0062 s:0051 b:0051 l:001a8c d:001a8c METHOD infinite.rb:11
c:0014 p:0062 s:0046 b:0046 l:0007f4 d:0007f4 METHOD infinite.rb:11
c:0013 p:0062 s:0041 b:0041 l:0010ac d:0010ac METHOD infinite.rb:11
c:0012 p:0062 s:0036 b:0036 l:001ea4 d:001ea4 METHOD infinite.rb:11
c:0011 p:0062 s:0031 b:0031 l:002004 d:002004 METHOD infinite.rb:11
c:0010 p:0011 s:0026 b:0026 l:0000e0 d:000025 LAMBDA infinite.rb:3
c:0009 p:---- s:0022 b:0022 l:000021 d:000021 FINISH
c:0008 p:---- s:0020 b:0020 l:000019 d:000019 CFUNC :call
c:0007 p:0009 s:0018 b:0018 l:000017 d:000017 METHOD infinite.rb:2
c:0006 p:0009 s:0014 b:0014 l:001384 d:000013 BLOCK infinite.rb:15
c:0005 p:---- s:0011 b:0011 l:000010 d:000010 FINISH
c:0004 p:---- s:0009 b:0009 l:000008 d:000008 CFUNC :times
c:0003 p:0044 s:0006 b:0006 l:001384 d:000f5c EVAL infinite.rb:14
c:0002 p:---- s:0004 b:0004 l:000003 d:000003 FINISH

c:0001 p:0000 s:0002 b:0002 l:001384 d:001384 TOP

infinite.rb:9: [BUG] object allocation during garbage collection phase
ruby 1.9.1p429 (2010-07-02 revision 28523) [i686-linux]

-- control frame ----------
c:0055 p:---- s:0243 b:0243 l:000242 d:000242 CFUNC :caller
c:0054 p:0012 s:0240 b:0238 l:000e8c d:000237 LAMBDA infinite.rb:9
c:0053 p:---- s:0235 b:0235 l:000234 d:000234 FINISH
c:0052 p:---- s:0233 b:0233 l:000232 d:000232 CFUNC :call
c:0051 p:0009 s:0231 b:0231 l:000230 d:000230 METHOD infinite.rb:8
c:0050 p:0062 s:0226 b:0226 l:00246c d:00246c METHOD infinite.rb:11
c:0049 p:0062 s:0221 b:0221 l:0024dc d:0024dc METHOD infinite.rb:11
c:0048 p:0062 s:0216 b:0216 l:001bf4 d:001bf4 METHOD infinite.rb:11
c:0047 p:0062 s:0211 b:0211 l:001c6c d:001c6c METHOD infinite.rb:11
c:0046 p:0062 s:0206 b:0206 l:001cdc d:001cdc METHOD infinite.rb:11
c:0045 p:0062 s:0201 b:0201 l:001e54 d:001e54 METHOD infinite.rb:11
c:0044 p:0062 s:0196 b:0196 l:0005a4 d:0005a4 METHOD infinite.rb:11
c:0043 p:0062 s:0191 b:0191 l:000ecc d:000ecc METHOD infinite.rb:11
c:0042 p:0062 s:0186 b:0186 l:00007c d:00007c METHOD infinite.rb:11
c:0041 p:0062 s:0181 b:0181 l:0024c4 d:0024c4 METHOD infinite.rb:11
c:0040 p:0062 s:0176 b:0176 l:001654 d:001654 METHOD infinite.rb:11
c:0039 p:0062 s:0171 b:0171 l:001f3c d:001f3c METHOD infinite.rb:11
c:0038 p:0062 s:0166 b:0166 l:002064 d:002064 METHOD infinite.rb:11
c:0037 p:0062 s:0161 b:0161 l:0024c4 d:0024c4 METHOD infinite.rb:11
c:0036 p:0062 s:0156 b:0156 l:001b6c d:001b6c METHOD infinite.rb:11
c:0035 p:0062 s:0151 b:0151 l:00238c d:00238c METHOD infinite.rb:11
c:0034 p:0062 s:0146 b:0146 l:0004bc d:0004bc METHOD infinite.rb:11
c:0033 p:0062 s:0141 b:0141 l:0012d4 d:0012d4 METHOD infinite.rb:11
c:0032 p:0062 s:0136 b:0136 l:0002ac d:0002ac METHOD infinite.rb:11
c:0031 p:0062 s:0131 b:0131 l:001fd4 d:001fd4 METHOD infinite.rb:11
c:0030 p:0062 s:0126 b:0126 l:00131c d:00131c METHOD infinite.rb:11
c:0029 p:0062 s:0121 b:0121 l:00050c d:00050c METHOD infinite.rb:11
c:0028 p:0062 s:0116 b:0116 l:0011c4 d:0011c4 METHOD infinite.rb:11
c:0027 p:0062 s:0111 b:0111 l:0015e4 d:0015e4 METHOD infinite.rb:11
c:0026 p:0062 s:0106 b:0106 l:0013a4 d:0013a4 METHOD infinite.rb:11
c:0025 p:0062 s:0101 b:0101 l:000fe4 d:000fe4 METHOD infinite.rb:11
c:0024 p:0062 s:0096 b:0096 l:000f84 d:000f84 METHOD infinite.rb:11
c:0023 p:0062 s:0091 b:0091 l:0017f4 d:0017f4 METHOD infinite.rb:11
c:0022 p:0062 s:0086 b:0086 l:001e4c d:001e4c METHOD infinite.rb:11
c:0021 p:0062 s:0081 b:0081 l:00113c d:00113c METHOD infinite.rb:11
c:0020 p:0062 s:0076 b:0076 l:00166c d:00166c METHOD infinite.rb:11
c:0019 p:0062 s:0071 b:0071 l:0010b4 d:0010b4 METHOD infinite.rb:11
c:0018 p:0062 s:0066 b:0066 l:00128c d:00128c METHOD infinite.rb:11
c:0017 p:0062 s:0061 b:0061 l:0019a4 d:0019a4 METHOD infinite.rb:11
c:0016 p:0062 s:0056 b:0056 l:000aac d:000aac METHOD infinite.rb:11
c:0015 p:0062 s:0051 b:0051 l:001a8c d:001a8c METHOD infinite.rb:11
c:0014 p:0062 s:0046 b:0046 l:0007f4 d:0007f4 METHOD infinite.rb:11
c:0013 p:0062 s:0041 b:0041 l:0010ac d:0010ac METHOD infinite.rb:11
c:0012 p:0062 s:0036 b:0036 l:001ea4 d:001ea4 METHOD infinite.rb:11
c:0011 p:0062 s:0031 b:0031 l:002004 d:002004 METHOD infinite.rb:11
c:0010 p:0011 s:0026 b:0026 l:0000e0 d:000025 LAMBDA infinite.rb:3
c:0009 p:---- s:0022 b:0022 l:000021 d:000021 FINISH
c:0008 p:---- s:0020 b:0020 l:000019 d:000019 CFUNC :call
c:0007 p:0009 s:0018 b:0018 l:000017 d:000017 METHOD infinite.rb:2
c:0006 p:0009 s:0014 b:0014 l:001384 d:000013 BLOCK infinite.rb:15
c:0005 p:---- s:0011 b:0011 l:000010 d:000010 FINISH
c:0004 p:---- s:0009 b:0009 l:000008 d:000008 CFUNC :times
c:0003 p:0044 s:0006 b:0006 l:001384 d:000f5c EVAL infinite.rb:14
c:0002 p:---- s:0004 b:0004 l:000003 d:000003 FINISH

c:0001 p:0000 s:0002 b:0002 l:001384 d:001384 TOP

-- Ruby level backtrace information-----------------------------------------
infinite.rb:9:in caller'
infinite.rb:9:in
block in recurse'
infinite.rb:8:in call'
infinite.rb:8:in
recurse'
infinite.rb:11:in recurse'
infinite.rb:11:in
recurse'
infinite.rb:11:in recurse'
infinite.rb:11:in
recurse'
infinite.rb:11:in recurse'
infinite.rb:11:in
recurse'
infinite.rb:11:in recurse'
infinite.rb:11:in
recurse'
infinite.rb:11:in recurse'
infinite.rb:11:in
recurse'
infinite.rb:11:in recurse'
infinite.rb:11:in
recurse'
infinite.rb:11:in recurse'
infinite.rb:11:in
recurse'
infinite.rb:11:in recurse'
infinite.rb:11:in
recurse'
infinite.rb:11:in recurse'
infinite.rb:11:in
recurse'
infinite.rb:11:in recurse'
infinite.rb:11:in
recurse'
infinite.rb:11:in recurse'
infinite.rb:11:in
recurse'
infinite.rb:11:in recurse'
infinite.rb:11:in
recurse'
infinite.rb:11:in recurse'
infinite.rb:11:in
recurse'
infinite.rb:11:in recurse'
infinite.rb:11:in
recurse'
infinite.rb:11:in recurse'
infinite.rb:11:in
recurse'
infinite.rb:11:in recurse'
infinite.rb:11:in
recurse'
infinite.rb:11:in recurse'
infinite.rb:11:in
recurse'
infinite.rb:11:in recurse'
infinite.rb:11:in
recurse'
infinite.rb:11:in recurse'
infinite.rb:11:in
recurse'
infinite.rb:11:in recurse'
infinite.rb:11:in
recurse'
infinite.rb:3:in block in foo'
infinite.rb:2:in
call'
infinite.rb:2:in foo'
infinite.rb:15:in
block in '
infinite.rb:14:in times'
infinite.rb:14:in
'

-- C level backtrace information -------------------------------------------
0x811d0a8 /opt/swe/tools/ext/gnu/ruby-1.9.1_p429/i686-linux2.6/bin/ruby(rb_vm_bugreport+0x48) [0x811d0a8]
0x8149538 /opt/swe/tools/ext/gnu/ruby-1.9.1_p429/i686-linux2.6/bin/ruby [0x8149538]
0x81495bb /opt/swe/tools/ext/gnu/ruby-1.9.1_p429/i686-linux2.6/bin/ruby(rb_bug+0x2b) [0x81495bb]
0x8062720 /opt/swe/tools/ext/gnu/ruby-1.9.1_p429/i686-linux2.6/bin/ruby(rb_data_object_alloc+0) [0x8062720]
0x81277fc /opt/swe/tools/ext/gnu/ruby-1.9.1_p429/i686-linux2.6/bin/ruby [0x81277fc]
0x8127a5e /opt/swe/tools/ext/gnu/ruby-1.9.1_p429/i686-linux2.6/bin/ruby [0x8127a5e]
0x8127fc2 /opt/swe/tools/ext/gnu/ruby-1.9.1_p429/i686-linux2.6/bin/ruby(rb_ary_new+0x12) [0x8127fc2]
0x810efb9 /opt/swe/tools/ext/gnu/ruby-1.9.1_p429/i686-linux2.6/bin/ruby(rb_make_backtrace+0x29) [0x810efb9]
0x811d08a /opt/swe/tools/ext/gnu/ruby-1.9.1_p429/i686-linux2.6/bin/ruby(rb_vm_bugreport+0x2a) [0x811d08a]
0x8149538 /opt/swe/tools/ext/gnu/ruby-1.9.1_p429/i686-linux2.6/bin/ruby [0x8149538]
0x81495bb /opt/swe/tools/ext/gnu/ruby-1.9.1_p429/i686-linux2.6/bin/ruby(rb_bug+0x2b) [0x81495bb]
0x8061165 /opt/swe/tools/ext/gnu/ruby-1.9.1_p429/i686-linux2.6/bin/ruby [0x8061165]
0x80614ae /opt/swe/tools/ext/gnu/ruby-1.9.1_p429/i686-linux2.6/bin/ruby [0x80614ae]
0x80617a6 /opt/swe/tools/ext/gnu/ruby-1.9.1_p429/i686-linux2.6/bin/ruby [0x80617a6]
0x80d59c2 /opt/swe/tools/ext/gnu/ruby-1.9.1_p429/i686-linux2.6/bin/ruby(st_foreach+0xe2) [0x80d59c2]
0x805f2f7 /opt/swe/tools/ext/gnu/ruby-1.9.1_p429/i686-linux2.6/bin/ruby [0x805f2f7]
0x8061b1d /opt/swe/tools/ext/gnu/ruby-1.9.1_p429/i686-linux2.6/bin/ruby [0x8061b1d]
0x806268e /opt/swe/tools/ext/gnu/ruby-1.9.1_p429/i686-linux2.6/bin/ruby(rb_newobj+0x3e) [0x806268e]
0x80de02d /opt/swe/tools/ext/gnu/ruby-1.9.1_p429/i686-linux2.6/bin/ruby(rb_str_buf_new+0x1d) [0x80de02d]
0x80d29bb /opt/swe/tools/ext/gnu/ruby-1.9.1_p429/i686-linux2.6/bin/ruby(rb_enc_vsprintf+0x2b) [0x80d29bb]
0x80d2a50 /opt/swe/tools/ext/gnu/ruby-1.9.1_p429/i686-linux2.6/bin/ruby(rb_vsprintf+0x20) [0x80d2a50]
0x80d2a7b /opt/swe/tools/ext/gnu/ruby-1.9.1_p429/i686-linux2.6/bin/ruby(rb_sprintf+0x1b) [0x80d2a7b]
0x810ef01 /opt/swe/tools/ext/gnu/ruby-1.9.1_p429/i686-linux2.6/bin/ruby [0x810ef01]
0x810fd32 /opt/swe/tools/ext/gnu/ruby-1.9.1_p429/i686-linux2.6/bin/ruby [0x810fd32]
0x810dea6 /opt/swe/tools/ext/gnu/ruby-1.9.1_p429/i686-linux2.6/bin/ruby [0x810dea6]
0x810f5ea /opt/swe/tools/ext/gnu/ruby-1.9.1_p429/i686-linux2.6/bin/ruby [0x810f5ea]
0x8110454 /opt/swe/tools/ext/gnu/ruby-1.9.1_p429/i686-linux2.6/bin/ruby [0x8110454]
0x8112b84 /opt/swe/tools/ext/gnu/ruby-1.9.1_p429/i686-linux2.6/bin/ruby [0x8112b84]
0x8116d95 /opt/swe/tools/ext/gnu/ruby-1.9.1_p429/i686-linux2.6/bin/ruby [0x8116d95]
0x8117354 /opt/swe/tools/ext/gnu/ruby-1.9.1_p429/i686-linux2.6/bin/ruby [0x8117354]
0x81177d1 /opt/swe/tools/ext/gnu/ruby-1.9.1_p429/i686-linux2.6/bin/ruby(rb_vm_invoke_proc+0x81) [0x81177d1]
0x805d054 /opt/swe/tools/ext/gnu/ruby-1.9.1_p429/i686-linux2.6/bin/ruby [0x805d054]
0x810dea6 /opt/swe/tools/ext/gnu/ruby-1.9.1_p429/i686-linux2.6/bin/ruby [0x810dea6]
0x8118caa /opt/swe/tools/ext/gnu/ruby-1.9.1_p429/i686-linux2.6/bin/ruby [0x8118caa]
0x810fe8a /opt/swe/tools/ext/gnu/ruby-1.9.1_p429/i686-linux2.6/bin/ruby(rb_funcall2+0x10a) [0x810fe8a]
0x81188a3 /opt/swe/tools/ext/gnu/ruby-1.9.1_p429/i686-linux2.6/bin/ruby(rb_eval_cmd+0xe3) [0x81188a3]
0x805fc21 /opt/swe/tools/ext/gnu/ruby-1.9.1_p429/i686-linux2.6/bin/ruby [0x805fc21]
0x805a1ae /opt/swe/tools/ext/gnu/ruby-1.9.1_p429/i686-linux2.6/bin/ruby(rb_protect+0xbe) [0x805a1ae]
0x805f91e /opt/swe/tools/ext/gnu/ruby-1.9.1_p429/i686-linux2.6/bin/ruby [0x805f91e]
0x805f9cc /opt/swe/tools/ext/gnu/ruby-1.9.1_p429/i686-linux2.6/bin/ruby [0x805f9cc]
0x805fbde /opt/swe/tools/ext/gnu/ruby-1.9.1_p429/i686-linux2.6/bin/ruby [0x805fbde]
0x81204da /opt/swe/tools/ext/gnu/ruby-1.9.1_p429/i686-linux2.6/bin/ruby [0x81204da]
0x81105bb /opt/swe/tools/ext/gnu/ruby-1.9.1_p429/i686-linux2.6/bin/ruby [0x81105bb]
0x8111c1f /opt/swe/tools/ext/gnu/ruby-1.9.1_p429/i686-linux2.6/bin/ruby [0x8111c1f]
0x8116d95 /opt/swe/tools/ext/gnu/ruby-1.9.1_p429/i686-linux2.6/bin/ruby [0x8116d95]
0x8117354 /opt/swe/tools/ext/gnu/ruby-1.9.1_p429/i686-linux2.6/bin/ruby [0x8117354]
0x81177d1 /opt/swe/tools/ext/gnu/ruby-1.9.1_p429/i686-linux2.6/bin/ruby(rb_vm_invoke_proc+0x81) [0x81177d1]
0x805d054 /opt/swe/tools/ext/gnu/ruby-1.9.1_p429/i686-linux2.6/bin/ruby [0x805d054]
0x810dea6 /opt/swe/tools/ext/gnu/ruby-1.9.1_p429/i686-linux2.6/bin/ruby [0x810dea6]
0x8118caa /opt/swe/tools/ext/gnu/ruby-1.9.1_p429/i686-linux2.6/bin/ruby [0x8118caa]
0x810fe8a /opt/swe/tools/ext/gnu/ruby-1.9.1_p429/i686-linux2.6/bin/ruby(rb_funcall2+0x10a) [0x810fe8a]
0x81188a3 /opt/swe/tools/ext/gnu/ruby-1.9.1_p429/i686-linux2.6/bin/ruby(rb_eval_cmd+0xe3) [0x81188a3]
0x805fc21 /opt/swe/tools/ext/gnu/ruby-1.9.1_p429/i686-linux2.6/bin/ruby [0x805fc21]
0x805a1ae /opt/swe/tools/ext/gnu/ruby-1.9.1_p429/i686-linux2.6/bin/ruby(rb_protect+0xbe) [0x805a1ae]
0x805f91e /opt/swe/tools/ext/gnu/ruby-1.9.1_p429/i686-linux2.6/bin/ruby [0x805f91e]
0x805f9cc /opt/swe/tools/ext/gnu/ruby-1.9.1_p429/i686-linux2.6/bin/ruby [0x805f9cc]
0x805fbde /opt/swe/tools/ext/gnu/ruby-1.9.1_p429/i686-linux2.6/bin/ruby [0x805fbde]
0x81204da /opt/swe/tools/ext/gnu/ruby-1.9.1_p429/i686-linux2.6/bin/ruby [0x81204da]
0x81105bb /opt/swe/tools/ext/gnu/ruby-1.9.1_p429/i686-linux2.6/bin/ruby [0x81105bb]
0x8111c1f /opt/swe/tools/ext/gnu/ruby-1.9.1_p429/i686-linux2.6/bin/ruby [0x8111c1f]
0x8116d95 /opt/swe/tools/ext/gnu/ruby-1.9.1_p429/i686-linux2.6/bin/ruby [0x8116d95]
0x8117354 /opt/swe/tools/ext/gnu/ruby-1.9.1_p429/i686-linux2.6/bin/ruby [0x8117354]
0x8117c57 /opt/swe/tools/ext/gnu/ruby-1.9.1_p429/i686-linux2.6/bin/ruby(rb_yield+0x47) [0x8117c57]
0x807b641 /opt/swe/tools/ext/gnu/ruby-1.9.1_p429/i686-linux2.6/bin/ruby [0x807b641]
0x810f5ea /opt/swe/tools/ext/gnu/ruby-1.9.1_p429/i686-linux2.6/bin/ruby [0x810f5ea]
0x8110454 /opt/swe/tools/ext/gnu/ruby-1.9.1_p429/i686-linux2.6/bin/ruby [0x8110454]
0x8112b84 /opt/swe/tools/ext/gnu/ruby-1.9.1_p429/i686-linux2.6/bin/ruby [0x8112b84]
0x8116d95 /opt/swe/tools/ext/gnu/ruby-1.9.1_p429/i686-linux2.6/bin/ruby [0x8116d95]
0x8116f45 /opt/swe/tools/ext/gnu/ruby-1.9.1_p429/i686-linux2.6/bin/ruby(rb_iseq_eval_main+0x95) [0x8116f45]
0x805aaef /opt/swe/tools/ext/gnu/ruby-1.9.1_p429/i686-linux2.6/bin/ruby(ruby_exec_node+0x9f) [0x805aaef]
0x805bb62 /opt/swe/tools/ext/gnu/ruby-1.9.1_p429/i686-linux2.6/bin/ruby(ruby_run_node+0x42) [0x805bb62]
0x8059680 /opt/swe/tools/ext/gnu/ruby-1.9.1_p429/i686-linux2.6/bin/ruby(main+0x60) [0x8059680]
0x343e8c /lib/libc.so.6(_libc_start_main+0xdc) [0x343e8c]
0x8059561 /opt/swe/tools/ext/gnu/ruby-1.9.1
p429/i686-linux2.6/bin/ruby [0x8059561]

[NOTE]
You may encounter a bug of Ruby interpreter. Bug reports are welcome.
For details: http://www.ruby-lang.org/bugreport.html

  1 <internal:gem_prelude>:286:in `push_all_highest_version_gems_on_load_path'
  1 <internal:gem_prelude>:355:in `<compiled>'
  1 <internal:gem_prelude>:38:in `dir'
  1 <internal:gem_prelude>:47:in `path'
  1 <internal:gem_prelude>:69:in `force_encoding'
  1 <internal:gem_prelude>:69:in `set_home'
  1 <internal:gem_prelude>:76:in `set_paths'
  1 Error loading gem paths on load path in gem_prelude
  1 can't modify frozen string
 35 x: infinite.rb:2:in `foo'
  8 x: infinite.rb:8:in `recurse'

7002 y: infinite.rb:2:in foo'
31485 y: infinite.rb:8:in
recurse'
1017 y: infinite.rb:9:in block in recurse'
2002 y: infinite.rb:9:in
print'
1 y: infinite.rb:9:in `recurse'

History

#1 Updated by Iñaki Baz Castillo almost 3 years ago

It does not crash for me using Ruby 1.9.3p0. I've also added a thread on top of the above script:

Thread.new do
loop do
sleep 0.01
GC.start
end
end

I use it to force GC and detect C extensions errors. As said before, I cannot reproduce the crash in 1.9.3p0.

#2 Updated by Koichi Sasada almost 3 years ago

  • Status changed from Open to Feedback
  • Target version set to 2.0.0

Can you reproduce it on the trunk?

#3 Updated by Koichi Sasada over 2 years ago

  • Assignee set to Narihiro Nakamura

nari-san, could you check it?

#4 Updated by Narihiro Nakamura over 2 years ago

  • Status changed from Feedback to Rejected

Ummm.. I can't reproduce SEGV in trunk.

Please reopen this ticket if you reproduce it.

Thanks.

Also available in: Atom PDF