Bug #5380

gc params cause Segmentation fault

Added by saber ma over 2 years ago. Updated over 2 years ago.

[ruby-core:39777]
Status:Closed
Priority:Normal
Assignee:Tomoyuki Chikanaga
Category:core
Target version:1.9.3
ruby -v:ruby 1.9.3dev (2011-09-23 revision 33323) [i686-linux] Backport:

Description

ruby1.9.3-rc1 or ruby1.9.3-preview1, set the gc params:
export RUBYGCMALLOCLIMIT=60000000
export RUBY
HEAPMINSLOTS=100000

ruby -e 'puts 1'
malloclimit=60000000 (8000000)
heap
minslots=100000 (10000)
1
*** glibc detected *** ruby: free(): invalid pointer: 0x09699944 ***
======= Backtrace: =========
/lib/tls/i686/cmov/libc.so.6(+0x6b591)[0xe9f591]
/lib/tls/i686/cmov/libc.so.6(+0x6cde8)[0xea0de8]
/lib/tls/i686/cmov/libc.so.6(cfree+0x6d)[0xea3ecd]
/home/saberma/.rvm/rubies/ruby-1.9.3-rc1/lib/libruby.so.1.9(ruby
xfree+0x21)[0x17b191]
/home/saberma/.rvm/rubies/ruby-1.9.3-rc1/lib/libruby.so.1.9(stfreetable+0x35)[0x225de5]
/home/saberma/.rvm/rubies/ruby-1.9.3-rc1/lib/libruby.so.1.9(+0x6b435)[0x17b435]
/home/saberma/.rvm/rubies/ruby-1.9.3-rc1/lib/libruby.so.1.9(+0x6d33c)[0x17d33c]
/home/saberma/.rvm/rubies/ruby-1.9.3-rc1/lib/libruby.so.1.9(rubyvmdestruct+0x79)[0x27cfb9]
/home/saberma/.rvm/rubies/ruby-1.9.3-rc1/lib/libruby.so.1.9(rubycleanup+0x20d)[0x16940d]
/home/saberma/.rvm/rubies/ruby-1.9.3-rc1/lib/libruby.so.1.9(ruby
runnode+0x3d)[0x16960d]
ruby[0x80487d8]
/lib/tls/i686/cmov/libc.so.6(
libcstartmain+0xe6)[0xe4abd6]
ruby[0x80486d1]
======= Memory map: ========
00110000-00303000 r-xp 00000000 08:01 5377589 /home/saberma/.rvm/rubies/ruby-1.9.3-rc1/lib/libruby.so.1.9.1
00303000-00306000 r--p 001f2000 08:01 5377589 /home/saberma/.rvm/rubies/ruby-1.9.3-rc1/lib/libruby.so.1.9.1
00306000-00308000 rw-p 001f5000 08:01 5377589 /home/saberma/.rvm/rubies/ruby-1.9.3-rc1/lib/libruby.so.1.9.1
00308000-00318000 rw-p 00000000 00:00 0
00318000-0031a000 r-xp 00000000 08:01 11272255 /lib/tls/i686/cmov/libdl-2.11.1.so
0031a000-0031b000 r--p 00001000 08:01 11272255 /lib/tls/i686/cmov/libdl-2.11.1.so
0031b000-0031c000 rw-p 00002000 08:01 11272255 /lib/tls/i686/cmov/libdl-2.11.1.so
00355000-00370000 r-xp 00000000 08:01 11276218 /lib/ld-2.11.1.so
00370000-00371000 r--p 0001a000 08:01 11276218 /lib/ld-2.11.1.so
00371000-00372000 rw-p 0001b000 08:01 11276218 /lib/ld-2.11.1.so
0038c000-0038e000 r-xp 00000000 08:01 7216634 /home/saberma/.rvm/rubies/ruby-1.9.3-rc1/lib/ruby/1.9.1/i686-linux/enc/encdb.so
0038e000-0038f000 r--p 00001000 08:01 7216634 /home/saberma/.rvm/rubies/ruby-1.9.3-rc1/lib/ruby/1.9.1/i686-linux/enc/encdb.so
0038f000-00390000 rw-p 00002000 08:01 7216634 /home/saberma/.rvm/rubies/ruby-1.9.3-rc1/lib/ruby/1.9.1/i686-linux/enc/encdb.so
00514000-00516000 r-xp 00000000 08:01 7349987 /home/saberma/.rvm/rubies/ruby-1.9.3-rc1/lib/ruby/1.9.1/i686-linux/enc/trans/transdb.so
00516000-00517000 r--p 00001000 08:01 7349987 /home/saberma/.rvm/rubies/ruby-1.9.3-rc1/lib/ruby/1.9.1/i686-linux/enc/trans/transdb.so
00517000-00518000 rw-p 00002000 08:01 7349987 /home/saberma/.rvm/rubies/ruby-1.9.3-rc1/lib/ruby/1.9.1/i686-linux/enc/trans/transdb.so
0077c000-0077d000 r-xp 00000000 00:00 0 [vdso]
00843000-00858000 r-xp 00000000 08:01 11272349 /lib/tls/i686/cmov/libpthread-2.11.1.so
00858000-00859000 r--p 00014000 08:01 11272349 /lib/tls/i686/cmov/libpthread-2.11.1.so
00859000-0085a000 rw-p 00015000 08:01 11272349 /lib/tls/i686/cmov/libpthread-2.11.1.so
0085a000-0085c000 rw-p 00000000 00:00 0
00998000-009bc000 r-xp 00000000 08:01 11272290 /lib/tls/i686/cmov/libm-2.11.1.so
009bc000-009bd000 r--p 00023000 08:01 11272290 /lib/tls/i686/cmov/libm-2.11.1.so
009bd000-009be000 rw-p 00024000 08:01 11272290 /lib/tls/i686/cmov/libm-2.11.1.so
00aaf000-00ab6000 r-xp 00000000 08:01 11272355 /lib/tls/i686/cmov/librt-2.11.1.so
00ab6000-00ab7000 r--p 00006000 08:01 11272355 /lib/tls/i686/cmov/librt-2.11.1.so
00ab7000-00ab8000 rw-p 00007000 08:01 11272355 /lib/tls/i686/cmov/librt-2.11.1.so
00bb6000-00bd3000 r-xp 00000000 08:01 11272275 /lib/libgcc
s.so.1
00bd3000-00bd4000 r--p 0001c000 08:01 11272275 /lib/libgccs.so.1
00bd4000-00bd5000 rw-p 0001d000 08:01 11272275 /lib/libgcc
s.so.1
00df1000-00dfa000 r-xp 00000000 08:01 11272249 /lib/tls/i686/cmov/libcrypt-2.11.1.so
00dfa000-00dfb000 r--p 00008000 08:01 11272249 /lib/tls/i686/cmov/libcrypt-2.11.1.so
00dfb000-00dfc000 rw-p 00009000 08:01 11272249 /lib/tls/i686/cmov/libcrypt-2.11.1.so
00dfc000-00e23000 rw-p 00000000 00:00 0
00e34000-00f87000 r-xp 00000000 08:01 11272241 /lib/tls/i686/cmov/libc-2.11.1.so
00f87000-00f88000 ---p 00153000 08:01 11272241 /lib/tls/i686/cmov/libc-2.11.1.so
00f88000-00f8a000 r--p 00153000 08:01 11272241 /lib/tls/i686/cmov/libc-2.11.1.so
00f8a000-00f8b000 rw-p 00155000 08:01 11272241 /lib/tls/i686/cmov/libc-2.11.1.so
00f8b000-00f8e000 rw-p 00000000 00:00 0
08048000-08049000 r-xp 00000000 08:01 5258895 /home/saberma/.rvm/rubies/ruby-1.9.3-rc1/bin/ruby
08049000-0804a000 r--p 00000000 08:01 5258895 /home/saberma/.rvm/rubies/ruby-1.9.3-rc1/bin/ruby
0804a000-0804b000 rw-p 00001000 08:01 5258895 /home/saberma/.rvm/rubies/ruby-1.9.3-rc1/bin/ruby
09381000-096a2000 rw-p 00000000 00:00 0 [heap]
b7600000-b7621000 rw-p 00000000 00:00 0
b7621000-b7700000 ---p 00000000 00:00 0
b77c4000-b7803000 r--p 00000000 08:01 2891665 /usr/lib/locale/enUS.utf8/LCCTYPE
b7803000-b7806000 rw-p 00000000 00:00 0
b780b000-b780c000 rw-p 00000000 00:00 0
b780c000-b780d000 ---p 00000000 00:00 0
b780d000-b7810000 rw-p 00000000 00:00 0
b7810000-b7817000 r--s 00000000 08:01 2884807 /usr/lib/gconv/gconv-modules.cache
b7817000-b7819000 rw-p 00000000 00:00 0
bfe69000-bfe7f000 rw-p 00000000 00:00 0 [stack]
[1] 17007 abort ruby -e 'puts 1'

the irb command raise the same error.

irb
malloclimit=60000000 (8000000)
heap
minslots=100000 (10000)
/home/saberma/.rvm/rubies/ruby-1.9.3-rc1/lib/ruby/site
ruby/1.9.1/rubygems.rb:392: [BUG] Segmentation fault
ruby 1.9.3dev (2011-09-23 revision 33323) [i686-linux]

-- Control frame information -----------------------------------------------
c:0025 p:0025 s:0094 b:0094 l:000093 d:000093 METHOD /home/saberma/.rvm/rubies/ruby-1.9.3-rc1/lib/ruby/siteruby/1.9.1/rubygems.rb:392
c:0024 p:0011 s:0091 b:0091 l:000090 d:000090 METHOD /home/saberma/.rvm/rubies/ruby-1.9.3-rc1/lib/ruby/site
ruby/1.9.1/rubygems.rb:413
c:0023 p:0030 s:0088 b:0088 l:000087 d:000087 METHOD /home/saberma/.rvm/rubies/ruby-1.9.3-rc1/lib/ruby/siteruby/1.9.1/rubygems/specification.rb:381
c:0022 p:0033 s:0085 b:0085 l:000084 d:000084 METHOD /home/saberma/.rvm/rubies/ruby-1.9.3-rc1/lib/ruby/site
ruby/1.9.1/rubygems/specification.rb:267
c:0021 p:0036 s:0081 b:0081 l:000080 d:000080 METHOD /home/saberma/.rvm/rubies/ruby-1.9.3-rc1/lib/ruby/siteruby/1.9.1/rubygems/specification.rb:409
c:0020 p:---- s:0078 b:0078 l:000077 d:000077 FINISH
c:0019 p:---- s:0076 b:0076 l:000075 d:000075 CFUNC :find
c:0018 p:0011 s:0073 b:0073 l:000072 d:000072 METHOD /home/saberma/.rvm/rubies/ruby-1.9.3-rc1/lib/ruby/site
ruby/1.9.1/rubygems/specification.rb:441
c:0017 p:0021 s:0069 b:0069 l:000068 d:000068 METHOD /home/saberma/.rvm/rubies/ruby-1.9.3-rc1/lib/ruby/site_ruby/1.9.1/rubygems.rb:203
c:0016 p:0040 s:0064 b:0064 l:000049 d:000063 BLOCK /home/saberma/.rvm/rubies/ruby-1.9.3-rc1/lib/ruby/1.9.1/irb/locale.rb:150
c:0015 p:0073 s:0061 b:0061 l:000054 d:000060 BLOCK /home/saberma/.rvm/rubies/ruby-1.9.3-rc1/lib/ruby/1.9.1/irb/locale.rb:158
c:0014 p:0081 s:0058 b:0058 l:000057 d:000057 METHOD /home/saberma/.rvm/rubies/ruby-1.9.3-rc1/lib/ruby/1.9.1/irb/locale.rb:167
c:0013 p:0036 s:0055 b:0055 l:000054 d:000054 METHOD /home/saberma/.rvm/rubies/ruby-1.9.3-rc1/lib/ruby/1.9.1/irb/locale.rb:157
c:0012 p:0015 s:0050 b:0050 l:000049 d:000049 METHOD /home/saberma/.rvm/rubies/ruby-1.9.3-rc1/lib/ruby/1.9.1/irb/locale.rb:145
c:0011 p:0108 s:0044 b:0044 l:000043 d:000043 METHOD /home/saberma/.rvm/rubies/ruby-1.9.3-rc1/lib/ruby/1.9.1/irb/locale.rb:124
c:0010 p:0016 s:0037 b:0037 l:000036 d:000036 METHOD /home/saberma/.rvm/rubies/ruby-1.9.3-rc1/lib/ruby/1.9.1/irb/locale.rb:108
c:0009 p:0177 s:0031 b:0031 l:000030 d:000030 METHOD /home/saberma/.rvm/rubies/ruby-1.9.3-rc1/lib/ruby/1.9.1/irb/locale.rb:32
c:0008 p:---- s:0026 b:0026 l:000025 d:000025 FINISH
c:0007 p:---- s:0024 b:0024 l:000023 d:000023 CFUNC :new
c:0006 p:0649 s:0021 b:0019 l:000018 d:000018 METHOD /home/saberma/.rvm/rubies/ruby-1.9.3-rc1/lib/ruby/1.9.1/irb/init.rb:114
c:0005 p:0019 s:0015 b:0015 l:000014 d:000014 METHOD /home/saberma/.rvm/rubies/ruby-1.9.3-rc1/lib/ruby/1.9.1/irb/init.rb:16
c:0004 p:0047 s:0011 b:0011 l:000010 d:000010 METHOD /home/saberma/.rvm/rubies/ruby-1.9.3-rc1/lib/ruby/1.9.1/irb.rb:53
c:0003 p:0142 s:0006 b:0006 l:000014 d:00029c EVAL /home/saberma/.rvm/rubies/ruby-1.9.3-rc1/bin/irb:16
c:0002 p:---- s:0004 b:0004 l:000003 d:000003 FINISH
c:0001 p:0000 s:0002 b:0002 l:000014 d:000014 TOP

-- Ruby level backtrace information ----------------------------------------
/home/saberma/.rvm/rubies/ruby-1.9.3-rc1/bin/irb:16:in <main>'
/home/saberma/.rvm/rubies/ruby-1.9.3-rc1/lib/ruby/1.9.1/irb.rb:53:in
start'
/home/saberma/.rvm/rubies/ruby-1.9.3-rc1/lib/ruby/1.9.1/irb/init.rb:16:in setup'
/home/saberma/.rvm/rubies/ruby-1.9.3-rc1/lib/ruby/1.9.1/irb/init.rb:114:in
initconfig'
/home/saberma/.rvm/rubies/ruby-1.9.3-rc1/lib/ruby/1.9.1/irb/init.rb:114:in new'
/home/saberma/.rvm/rubies/ruby-1.9.3-rc1/lib/ruby/1.9.1/irb/locale.rb:32:in
initialize'
/home/saberma/.rvm/rubies/ruby-1.9.3-rc1/lib/ruby/1.9.1/irb/locale.rb:108:in load'
/home/saberma/.rvm/rubies/ruby-1.9.3-rc1/lib/ruby/1.9.1/irb/locale.rb:124:in
find'
/home/saberma/.rvm/rubies/ruby-1.9.3-rc1/lib/ruby/1.9.1/irb/locale.rb:145:in search_file'
/home/saberma/.rvm/rubies/ruby-1.9.3-rc1/lib/ruby/1.9.1/irb/locale.rb:157:in
each
localizedpath'
/home/saberma/.rvm/rubies/ruby-1.9.3-rc1/lib/ruby/1.9.1/irb/locale.rb:167:in each_sublocale'
/home/saberma/.rvm/rubies/ruby-1.9.3-rc1/lib/ruby/1.9.1/irb/locale.rb:158:in
block in each
localizedpath'
/home/saberma/.rvm/rubies/ruby-1.9.3-rc1/lib/ruby/1.9.1/irb/locale.rb:150:in block in search_file'
/home/saberma/.rvm/rubies/ruby-1.9.3-rc1/lib/ruby/site_ruby/1.9.1/rubygems.rb:203:in
try
activate'
/home/saberma/.rvm/rubies/ruby-1.9.3-rc1/lib/ruby/siteruby/1.9.1/rubygems/specification.rb:441:in find_by_path'
/home/saberma/.rvm/rubies/ruby-1.9.3-rc1/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:441:in
find'
/home/saberma/.rvm/rubies/ruby-1.9.3-rc1/lib/ruby/site
ruby/1.9.1/rubygems/specification.rb:409:in each'
/home/saberma/.rvm/rubies/ruby-1.9.3-rc1/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb:267:in
all'
/home/saberma/.rvm/rubies/ruby-1.9.3-rc1/lib/ruby/site
ruby/1.9.1/rubygems/specification.rb:381:in dirs'
/home/saberma/.rvm/rubies/ruby-1.9.3-rc1/lib/ruby/site_ruby/1.9.1/rubygems.rb:413:in
path'
/home/saberma/.rvm/rubies/ruby-1.9.3-rc1/lib/ruby/site_ruby/1.9.1/rubygems.rb:392:in `paths'

-- C level backtrace information -------------------------------------------
/home/saberma/.rvm/rubies/ruby-1.9.3-rc1/lib/libruby.so.1.9(+0x184253) [0x294253] vmdump.c:796
/home/saberma/.rvm/rubies/ruby-1.9.3-rc1/lib/libruby.so.1.9(+0x55b57) [0x165b57] error.c:258
/home/saberma/.rvm/rubies/ruby-1.9.3-rc1/lib/libruby.so.1.9(rb
bug+0x49) [0x165c59] error.c:277
/home/saberma/.rvm/rubies/ruby-1.9.3-rc1/lib/libruby.so.1.9(+0x10d93c) [0x21d93c] signal.c:609
[0xa15410]
/home/saberma/.rvm/rubies/ruby-1.9.3-rc1/lib/libruby.so.1.9(+0x6f88c) [0x17f88c] gc.c:2212
/home/saberma/.rvm/rubies/ruby-1.9.3-rc1/lib/libruby.so.1.9(+0x6fcaf) [0x17fcaf] gc.c:694
/home/saberma/.rvm/rubies/ruby-1.9.3-rc1/lib/libruby.so.1.9(rbstrbufnew+0xc7) [0x22fb17] string.c:744
/home/saberma/.rvm/rubies/ruby-1.9.3-rc1/lib/libruby.so.1.9(rb
encvsprintf+0x37) [0x225447] sprintf.c:1170
/home/saberma/.rvm/rubies/ruby-1.9.3-rc1/lib/libruby.so.1.9(rb
vsprintf+0x2c) [0x2254fc] sprintf.c:1199
/home/saberma/.rvm/rubies/ruby-1.9.3-rc1/lib/libruby.so.1.9(rbsprintf+0x24) [0x225534] sprintf.c:1209
/home/saberma/.rvm/rubies/ruby-1.9.3-rc1/lib/libruby.so.1.9(+0x15ce47) [0x26ce47] compile.c:4683
/home/saberma/.rvm/rubies/ruby-1.9.3-rc1/lib/libruby.so.1.9(rb
iseqcompilenode+0x70a) [0x27306a] compile.c:487
/home/saberma/.rvm/rubies/ruby-1.9.3-rc1/lib/libruby.so.1.9(rbiseqnewwithopt+0x9d) [0x27b4ed] iseq.c:411
/home/saberma/.rvm/rubies/ruby-1.9.3-rc1/lib/libruby.so.1.9(rbiseqnewtop+0x53) [0x27ba33] iseq.c:386
/home/saberma/.rvm/rubies/ruby-1.9.3-rc1/lib/libruby.so.1.9(+0x5ab6a) [0x16ab6a] load.c:308
/home/saberma/.rvm/rubies/ruby-1.9.3-rc1/lib/libruby.so.1.9(rb
requiresafe+0x742) [0x16c2a2] load.c:619
/home/saberma/.rvm/rubies/ruby-1.9.3-rc1/lib/libruby.so.1.9(rb
autoloadload+0xa8) [0x262ee8] variable.c:1566
/home/saberma/.rvm/rubies/ruby-1.9.3-rc1/lib/libruby.so.1.9(+0x1550e9) [0x2650e9] variable.c:1605
/home/saberma/.rvm/rubies/ruby-1.9.3-rc1/lib/libruby.so.1.9(+0x155288) [0x265288] variable.c:1649
/home/saberma/.rvm/rubies/ruby-1.9.3-rc1/lib/libruby.so.1.9(+0x17098e) [0x28098e] vm
insnhelper.c:1231
/home/saberma/.rvm/rubies/ruby-1.9.3-rc1/lib/libruby.so.1.9(+0x1724fc) [0x2824fc] insns.def:223
/home/saberma/.rvm/rubies/ruby-1.9.3-rc1/lib/libruby.so.1.9(+0x179052) [0x289052] vm.c:1220
/home/saberma/.rvm/rubies/ruby-1.9.3-rc1/lib/libruby.so.1.9(+0x17a95a) [0x28a95a] vmeval.c:66
/home/saberma/.rvm/rubies/ruby-1.9.3-rc1/lib/libruby.so.1.9(+0x17e4a8) [0x28e4a8] vm
eval.c:235
/home/saberma/.rvm/rubies/ruby-1.9.3-rc1/lib/libruby.so.1.9(rbiterate+0xcc) [0x27e7cc] vmeval.c:862
/home/saberma/.rvm/rubies/ruby-1.9.3-rc1/lib/libruby.so.1.9(rbblockcall+0x4d) [0x27e96d] vmeval.c:942
/home/saberma/.rvm/rubies/ruby-1.9.3-rc1/lib/libruby.so.1.9(+0x4c8f5) [0x15c8f5] enum.c:211
/home/saberma/.rvm/rubies/ruby-1.9.3-rc1/lib/libruby.so.1.9(+0x16d908) [0x27d908] vm
insnhelper.c:317
/home/saberma/.rvm/rubies/ruby-1.9.3-rc1/lib/libruby.so.1.9(+0x17edd5) [0x28edd5] vminsnhelper.c:404
/home/saberma/.rvm/rubies/ruby-1.9.3-rc1/lib/libruby.so.1.9(+0x174268) [0x284268] insns.def:1015
/home/saberma/.rvm/rubies/ruby-1.9.3-rc1/lib/libruby.so.1.9(+0x179052) [0x289052] vm.c:1220
/home/saberma/.rvm/rubies/ruby-1.9.3-rc1/lib/libruby.so.1.9(+0x17a95a) [0x28a95a] vm
eval.c:66
/home/saberma/.rvm/rubies/ruby-1.9.3-rc1/lib/libruby.so.1.9(rbobjcallinit+0x50) [0x167840] eval.c:876
/home/saberma/.rvm/rubies/ruby-1.9.3-rc1/lib/libruby.so.1.9(rb
classnewinstance+0x3a) [0x1b940a] object.c:1625
/home/saberma/.rvm/rubies/ruby-1.9.3-rc1/lib/libruby.so.1.9(+0x16d908) [0x27d908] vminsnhelper.c:317
/home/saberma/.rvm/rubies/ruby-1.9.3-rc1/lib/libruby.so.1.9(+0x17edd5) [0x28edd5] vm
insnhelper.c:404
/home/saberma/.rvm/rubies/ruby-1.9.3-rc1/lib/libruby.so.1.9(+0x174268) [0x284268] insns.def:1015
/home/saberma/.rvm/rubies/ruby-1.9.3-rc1/lib/libruby.so.1.9(+0x179052) [0x289052] vm.c:1220
/home/saberma/.rvm/rubies/ruby-1.9.3-rc1/lib/libruby.so.1.9(rbiseqevalmain+0x1f2) [0x289452] vm.c:1461
/home/saberma/.rvm/rubies/ruby-1.9.3-rc1/lib/libruby.so.1.9(+0x57eca) [0x167eca] eval.c:204
/home/saberma/.rvm/rubies/ruby-1.9.3-rc1/lib/libruby.so.1.9(ruby
execnode+0x25) [0x167f05] eval.c:251
/home/saberma/.rvm/rubies/ruby-1.9.3-rc1/lib/libruby.so.1.9(ruby
runnode+0x35) [0x169605] eval.c:244
irb() [0x80487d8]
/lib/tls/i686/cmov/libc.so.6(
libcstart_main+0xe6) [0x350bd6]
irb() [0x80486d1]

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

  • Loaded script: irb

  • Loaded features:

    0 enumerator.so
    1 /home/saberma/.rvm/rubies/ruby-1.9.3-rc1/lib/ruby/1.9.1/i686-linux/enc/encdb.so
    2 /home/saberma/.rvm/rubies/ruby-1.9.3-rc1/lib/ruby/1.9.1/i686-linux/enc/trans/transdb.so
    3 /home/saberma/.rvm/rubies/ruby-1.9.3-rc1/lib/ruby/siteruby/1.9.1/rubygems/defaults.rb
    4 /home/saberma/.rvm/rubies/ruby-1.9.3-rc1/lib/ruby/1.9.1/i686-linux/rbconfig.rb
    5 /home/saberma/.rvm/rubies/ruby-1.9.3-rc1/lib/ruby/site
    ruby/1.9.1/rubygems/deprecate.rb
    6 /home/saberma/.rvm/rubies/ruby-1.9.3-rc1/lib/ruby/siteruby/1.9.1/rubygems/exceptions.rb
    7 /home/saberma/.rvm/rubies/ruby-1.9.3-rc1/lib/ruby/site
    ruby/1.9.1/rubygems/customrequire.rb
    8 /home/saberma/.rvm/rubies/ruby-1.9.3-rc1/lib/ruby/site
    ruby/1.9.1/rubygems.rb
    9 /home/saberma/.rvm/rubies/ruby-1.9.3-rc1/lib/ruby/1.9.1/e2mmap.rb
    10 /home/saberma/.rvm/rubies/ruby-1.9.3-rc1/lib/ruby/1.9.1/irb/init.rb
    11 /home/saberma/.rvm/rubies/ruby-1.9.3-rc1/lib/ruby/1.9.1/irb/workspace.rb
    12 /home/saberma/.rvm/rubies/ruby-1.9.3-rc1/lib/ruby/1.9.1/irb/inspector.rb
    13 /home/saberma/.rvm/rubies/ruby-1.9.3-rc1/lib/ruby/1.9.1/irb/context.rb
    14 /home/saberma/.rvm/rubies/ruby-1.9.3-rc1/lib/ruby/1.9.1/irb/extend-command.rb
    15 /home/saberma/.rvm/rubies/ruby-1.9.3-rc1/lib/ruby/1.9.1/irb/output-method.rb
    16 /home/saberma/.rvm/rubies/ruby-1.9.3-rc1/lib/ruby/1.9.1/irb/notifier.rb
    17 /home/saberma/.rvm/rubies/ruby-1.9.3-rc1/lib/ruby/1.9.1/irb/slex.rb
    18 /home/saberma/.rvm/rubies/ruby-1.9.3-rc1/lib/ruby/1.9.1/irb/ruby-token.rb
    19 /home/saberma/.rvm/rubies/ruby-1.9.3-rc1/lib/ruby/1.9.1/irb/ruby-lex.rb
    20 /home/saberma/.rvm/rubies/ruby-1.9.3-rc1/lib/ruby/1.9.1/irb/srcencoding.rb
    21 /home/saberma/.rvm/rubies/ruby-1.9.3-rc1/lib/ruby/1.9.1/irb/magic-file.rb
    22 /home/saberma/.rvm/rubies/ruby-1.9.3-rc1/lib/ruby/1.9.1/i686-linux/readline.so
    23 /home/saberma/.rvm/rubies/ruby-1.9.3-rc1/lib/ruby/1.9.1/irb/input-method.rb
    24 /home/saberma/.rvm/rubies/ruby-1.9.3-rc1/lib/ruby/1.9.1/irb/locale.rb
    25 /home/saberma/.rvm/rubies/ruby-1.9.3-rc1/lib/ruby/1.9.1/irb.rb
    26 /home/saberma/.rvm/rubies/ruby-1.9.3-rc1/lib/ruby/site
    ruby/1.9.1/rubygems/version.rb
    27 /home/saberma/.rvm/rubies/ruby-1.9.3-rc1/lib/ruby/siteruby/1.9.1/rubygems/requirement.rb
    28 /home/saberma/.rvm/rubies/ruby-1.9.3-rc1/lib/ruby/site
    ruby/1.9.1/rubygems/platform.rb
    29 /home/saberma/.rvm/rubies/ruby-1.9.3-rc1/lib/ruby/site_ruby/1.9.1/rubygems/specification.rb

  • Process memory map:

00110000-00303000 r-xp 00000000 08:01 5377589 /home/saberma/.rvm/rubies/ruby-1.9.3-rc1/lib/libruby.so.1.9.1
00303000-00306000 r--p 001f2000 08:01 5377589 /home/saberma/.rvm/rubies/ruby-1.9.3-rc1/lib/libruby.so.1.9.1
00306000-00308000 rw-p 001f5000 08:01 5377589 /home/saberma/.rvm/rubies/ruby-1.9.3-rc1/lib/libruby.so.1.9.1
00308000-00318000 rw-p 00000000 00:00 0
00318000-0032d000 r-xp 00000000 08:01 11272349 /lib/tls/i686/cmov/libpthread-2.11.1.so
0032d000-0032e000 r--p 00014000 08:01 11272349 /lib/tls/i686/cmov/libpthread-2.11.1.so
0032e000-0032f000 rw-p 00015000 08:01 11272349 /lib/tls/i686/cmov/libpthread-2.11.1.so
0032f000-00331000 rw-p 00000000 00:00 0
00331000-00338000 r-xp 00000000 08:01 11272355 /lib/tls/i686/cmov/librt-2.11.1.so
00338000-00339000 r--p 00006000 08:01 11272355 /lib/tls/i686/cmov/librt-2.11.1.so
00339000-0033a000 rw-p 00007000 08:01 11272355 /lib/tls/i686/cmov/librt-2.11.1.so
0033a000-0048d000 r-xp 00000000 08:01 11272241 /lib/tls/i686/cmov/libc-2.11.1.so
0048d000-0048e000 ---p 00153000 08:01 11272241 /lib/tls/i686/cmov/libc-2.11.1.so
0048e000-00490000 r--p 00153000 08:01 11272241 /lib/tls/i686/cmov/libc-2.11.1.so
00490000-00491000 rw-p 00155000 08:01 11272241 /lib/tls/i686/cmov/libc-2.11.1.so
00491000-00494000 rw-p 00000000 00:00 0
00498000-0049a000 r-xp 00000000 08:01 7216634 /home/saberma/.rvm/rubies/ruby-1.9.3-rc1/lib/ruby/1.9.1/i686-linux/enc/encdb.so
0049a000-0049b000 r--p 00001000 08:01 7216634 /home/saberma/.rvm/rubies/ruby-1.9.3-rc1/lib/ruby/1.9.1/i686-linux/enc/encdb.so
0049b000-0049c000 rw-p 00002000 08:01 7216634 /home/saberma/.rvm/rubies/ruby-1.9.3-rc1/lib/ruby/1.9.1/i686-linux/enc/encdb.so
0049c000-004cb000 r-xp 00000000 08:01 11272352 /lib/libreadline.so.6.1
004cb000-004cc000 r--p 0002e000 08:01 11272352 /lib/libreadline.so.6.1
004cc000-004cf000 rw-p 0002f000 08:01 11272352 /lib/libreadline.so.6.1
004cf000-004d0000 rw-p 00000000 00:00 0
00911000-0091a000 r-xp 00000000 08:01 11272249 /lib/tls/i686/cmov/libcrypt-2.11.1.so
0091a000-0091b000 r--p 00008000 08:01 11272249 /lib/tls/i686/cmov/libcrypt-2.11.1.so
0091b000-0091c000 rw-p 00009000 08:01 11272249 /lib/tls/i686/cmov/libcrypt-2.11.1.so
0091c000-00943000 rw-p 00000000 00:00 0
00997000-0099c000 r-xp 00000000 08:01 6559402 /home/saberma/.rvm/rubies/ruby-1.9.3-rc1/lib/ruby/1.9.1/i686-linux/readline.so
0099c000-0099d000 r--p 00004000 08:01 6559402 /home/saberma/.rvm/rubies/ruby-1.9.3-rc1/lib/ruby/1.9.1/i686-linux/readline.so
0099d000-0099e000 rw-p 00005000 08:01 6559402 /home/saberma/.rvm/rubies/ruby-1.9.3-rc1/lib/ruby/1.9.1/i686-linux/readline.so
00a15000-00a16000 r-xp 00000000 00:00 0 [vdso]
00b02000-00b04000 r-xp 00000000 08:01 11272255 /lib/tls/i686/cmov/libdl-2.11.1.so
00b04000-00b05000 r--p 00001000 08:01 11272255 /lib/tls/i686/cmov/libdl-2.11.1.so
00b05000-00b06000 rw-p 00002000 08:01 11272255 /lib/tls/i686/cmov/libdl-2.11.1.so
00bfd000-00bff000 r-xp 00000000 08:01 7349987 /home/saberma/.rvm/rubies/ruby-1.9.3-rc1/lib/ruby/1.9.1/i686-linux/enc/trans/transdb.so
00bff000-00c00000 r--p 00001000 08:01 7349987 /home/saberma/.rvm/rubies/ruby-1.9.3-rc1/lib/ruby/1.9.1/i686-linux/enc/trans/transdb.so
00c00000-00c01000 rw-p 00002000 08:01 7349987 /home/saberma/.rvm/rubies/ruby-1.9.3-rc1/lib/ruby/1.9.1/i686-linux/enc/trans/transdb.so
00cb5000-00cd2000 r-xp 00000000 08:01 11272275 /lib/libgccs.so.1
00cd2000-00cd3000 r--p 0001c000 08:01 11272275 /lib/libgcc
s.so.1
00cd3000-00cd4000 rw-p 0001d000 08:01 11272275 /lib/libgccs.so.1
00df1000-00e0c000 r-xp 00000000 08:01 11276218 /lib/ld-2.11.1.so
00e0c000-00e0d000 r--p 0001a000 08:01 11276218 /lib/ld-2.11.1.so
00e0d000-00e0e000 rw-p 0001b000 08:01 11276218 /lib/ld-2.11.1.so
00f05000-00f39000 r-xp 00000000 08:01 11272294 /lib/libncurses.so.5.7
00f39000-00f3a000 ---p 00034000 08:01 11272294 /lib/libncurses.so.5.7
00f3a000-00f3c000 r--p 00034000 08:01 11272294 /lib/libncurses.so.5.7
00f3c000-00f3d000 rw-p 00036000 08:01 11272294 /lib/libncurses.so.5.7
00f7d000-00fa1000 r-xp 00000000 08:01 11272290 /lib/tls/i686/cmov/libm-2.11.1.so
00fa1000-00fa2000 r--p 00023000 08:01 11272290 /lib/tls/i686/cmov/libm-2.11.1.so
00fa2000-00fa3000 rw-p 00024000 08:01 11272290 /lib/tls/i686/cmov/libm-2.11.1.so
08048000-08049000 r-xp 00000000 08:01 5258895 /home/saberma/.rvm/rubies/ruby-1.9.3-rc1/bin/ruby
08049000-0804a000 r--p 00000000 08:01 5258895 /home/saberma/.rvm/rubies/ruby-1.9.3-rc1/bin/ruby
0804a000-0804b000 rw-p 00001000 08:01 5258895 /home/saberma/.rvm/rubies/ruby-1.9.3-rc1/bin/ruby
09389000-099c4000 rw-p 00000000 00:00 0 [heap]
b77c8000-b7849000 rw-p 00000000 00:00 0
b7849000-b7888000 r--p 00000000 08:01 2891665 /usr/lib/locale/en
US.utf8/LC_CTYPE
b7888000-b788b000 rw-p 00000000 00:00 0
b788f000-b7891000 rw-p 00000000 00:00 0
b7891000-b7892000 ---p 00000000 00:00 0
b7892000-b7895000 rw-p 00000000 00:00 0
b7895000-b789c000 r--s 00000000 08:01 2884807 /usr/lib/gconv/gconv-modules.cache
b789c000-b789e000 rw-p 00000000 00:00 0
bfcfa000-bfd10000 rw-p 00000000 00:00 0 [stack]

gc_parameter_message.patch Magnifier (2.06 KB) Tomoyuki Chikanaga, 10/01/2011 11:22 AM

Associated revisions

Revision 33368
Added by Tomoyuki Chikanaga over 2 years ago

  • gc.c (addheapslots, initheap): reset heapsinc zero when
    heap slots are expanded by environment variable RUBYHEAPMIN_SLOTS.
    [Bug #5380]

  • test/ruby/testgc.rb (testgc_parameter): add test for it.

  • test/ruby/envutil.rb (assertnormalexit): add :child_env option to
    enable pass environemnt variables to child process.

Revision 33379
Added by Tomoyuki Chikanaga over 2 years ago

  • gc.c (rbgcset_params): output GC parameter change messages only
    if -w/-v options are specified. these messages are output to stderr,
    not to stdout. [Bug #5380]

  • test/ruby/testgc.rb (testgc_parameter): add test for it.

History

#1 Updated by Tomoyuki Chikanaga over 2 years ago

Thank you for reporting a bug.

I can reproduce similar SEGV on "ruby 1.9.4dev (2011-09-30 trunk 33364) [i686-linux]"
The following patch seems fix this issue.

Narihiro-san, could you take a glance to this patch?

diff --git a/gc.c b/gc.c
index fad49e0..1fce29a 100644
--- a/gc.c
+++ b/gc.c
@@ -1090,6 +1090,7 @@ addheapslots(rbobjspacet *objspace, sizet add)
for (i = 0; i < add; i++) {
assign
heapslot(objspace);
}
+ heaps
inc = 0;
}

static void
@@ -1106,7 +1107,6 @@ initheap(rbobjspace_t *objspace)
}
#endif

  • heapsinc = 0; objspace->profile.invoketime = getrusagetime(); finalizertable = stinitnumtable(); }

#2 Updated by Tomoyuki Chikanaga over 2 years ago

BTW, when GC parameters are set by environment variable, some messages are output to standard output with printf().
I wonder if these are statements for debug and should be eliminated. Can I delete them?

#3 Updated by Narihiro Nakamura over 2 years ago

Tomoyuki Chikanaga wrote:

Thank you for reporting a bug.

I can reproduce similar SEGV on "ruby 1.9.4dev (2011-09-30 trunk 33364) [i686-linux]"
The following patch seems fix this issue.

Narihiro-san, could you take a glance to this patch?

diff --git a/gc.c b/gc.c
index fad49e0..1fce29a 100644
--- a/gc.c
+++ b/gc.c
@@ -1090,6 +1090,7 @@ addheapslots(rbobjspacet *objspace, sizet add)
for (i = 0; i < add; i++) {
assign
heapslot(objspace);
}
+ heaps
inc = 0;
}

static void
@@ -1106,7 +1107,6 @@ initheap(rbobjspace_t *objspace)
}
#endif

  • heapsinc = 0; objspace->profile.invoketime = getrusagetime(); finalizertable = stinitnumtable(); }

Thanks! Please commit this patch.

#4 Updated by Narihiro Nakamura over 2 years ago

Tomoyuki Chikanaga wrote:

BTW, when GC parameters are set by environment variable, some messages are output to standard output with printf().
I wonder if these are statements for debug and should be eliminated. Can I delete them?

I think this behavior is specific.
Matz, What do you think?

#5 Updated by Nobuyoshi Nakada over 2 years ago

Narihiro Nakamura wrote:

Tomoyuki Chikanaga wrote:

BTW, when GC parameters are set by environment variable, some messages are output to standard output with printf().
I wonder if these are statements for debug and should be eliminated. Can I delete them?

I think this behavior is specific.

I think they should be shown only when GC_NOTIFY is set, at least.

#6 Updated by Yukihiro Matsumoto over 2 years ago

Nobuyoshi Nakada wrote:

I think this behavior is specific.

I think they should be shown only when GC_NOTIFY is set, at least.

or when -w option is specified.

#7 Updated by Tomoyuki Chikanaga over 2 years ago

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

This issue was solved with changeset r33368.
saber, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.


  • gc.c (addheapslots, initheap): reset heapsinc zero when
    heap slots are expanded by environment variable RUBYHEAPMIN_SLOTS.
    [Bug #5380]

  • test/ruby/testgc.rb (testgc_parameter): add test for it.

  • test/ruby/envutil.rb (assertnormalexit): add :child_env option to
    enable pass environemnt variables to child process.

#8 Updated by Tomoyuki Chikanaga over 2 years ago

  • File gc_parameter_message.patchMagnifier added
  • Category set to core
  • Status changed from Closed to Assigned
  • Assignee set to Tomoyuki Chikanaga
  • Target version set to 1.9.3

Yukihiro Matsumoto wrote:

Nobuyoshi Nakada wrote:

I think this behavior is specific.

I think they should be shown only when GC_NOTIFY is set, at least.

or when -w option is specified.
Thank you for your comments.

I think shown with -w option is fine.
And I feel it's more natural the messages shown with -w are outputted to stderr.
I attach a patch with test.
If there's no opposite opinion, I'll check in it.

#9 Updated by Tomoyuki Chikanaga over 2 years ago

  • Status changed from Assigned to Closed

This issue was solved with changeset r33379.
saber, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.


  • gc.c (rbgcset_params): output GC parameter change messages only
    if -w/-v options are specified. these messages are output to stderr,
    not to stdout. [Bug #5380]

  • test/ruby/testgc.rb (testgc_parameter): add test for it.

Also available in: Atom PDF