[ruby-dev:27979] digest problem
From:
Tanaka Akira <akr@...17n.org>
Date:
2005-12-09 12:17:59 UTC
List:
ruby-dev #27979
[ruby-dev:27911] の GC を常に動かすパッチを当てて digest を
テストしてみると core を吐きます。digest には GC にまつわる
問題があるように思います。
% RUBY_ALWAYS_GC= ./ruby -v test/digest/test_digest.rb
ruby 1.9.0 (2005-12-08) [i686-linux]
Loaded suite test/digest/test_digest
Started
..zsh: segmentation fault (core dumped) RUBY_ALWAYS_GC= ./ruby -v test/digest/test_digest.rb
% gdb ruby core
GNU gdb 6.3-debian
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 "i386-linux"...Using host libthread_db library "/lib/tls/libthread_db.so.1".
Core was generated by `test/digest/test_digest.rb test_s_dig'.
Program terminated with signal 11, Segmentation fault.
warning: current_sos: Can't read pathname for load map: Input/output error
Reading symbols from /lib/tls/libdl.so.2...Reading symbols from /usr/lib/debug/lib/tls/libdl-2.3.2.so...done.
done.
Loaded symbols for /lib/tls/libdl.so.2
Reading symbols from /lib/tls/libcrypt.so.1...Reading symbols from /usr/lib/debug/lib/tls/libcrypt-2.3.2.so...done.
done.
Loaded symbols for /lib/tls/libcrypt.so.1
Reading symbols from /lib/tls/libm.so.6...Reading symbols from /usr/lib/debug/lib/tls/libm-2.3.2.so...done.
done.
Loaded symbols for /lib/tls/libm.so.6
Reading symbols from /lib/tls/libc.so.6...Reading symbols from /usr/lib/debug/lib/tls/libc-2.3.2.so...done.
done.
Loaded symbols for /lib/tls/libc.so.6
Reading symbols from /lib/ld-linux.so.2...Reading symbols from /usr/lib/debug/lib/ld-2.3.2.so...done.
done.
Loaded symbols for /lib/ld-linux.so.2
Reading symbols from /tmp/d/lib/ruby/1.9/i686-linux/digest.so...done.
Loaded symbols for /tmp/d/lib/ruby/1.9/i686-linux/digest.so
Reading symbols from /tmp/d/lib/ruby/1.9/i686-linux/digest/md5.so...done.
Loaded symbols for /tmp/d/lib/ruby/1.9/i686-linux/digest/md5.so
Reading symbols from /usr/lib/i686/cmov/libcrypto.so.0.9.7...done.
Loaded symbols for /usr/lib/i686/cmov/libcrypto.so.0.9.7
Reading symbols from /tmp/d/lib/ruby/1.9/i686-linux/digest/rmd160.so...done.
Loaded symbols for /tmp/d/lib/ruby/1.9/i686-linux/digest/rmd160.so
Reading symbols from /tmp/d/lib/ruby/1.9/i686-linux/digest/sha1.so...done.
Loaded symbols for /tmp/d/lib/ruby/1.9/i686-linux/digest/sha1.so
Reading symbols from /tmp/d/lib/ruby/1.9/i686-linux/digest/sha2.so...done.
Loaded symbols for /tmp/d/lib/ruby/1.9/i686-linux/digest/sha2.so
#0 0xb7e0f965 in _int_malloc () from /lib/tls/libc.so.6
(gdb) bt
#0 0xb7e0f965 in _int_malloc () from /lib/tls/libc.so.6
#1 0xb7e0ec43 in malloc () from /lib/tls/libc.so.6
#2 0x08071e94 in ruby_xmalloc (size=16) at gc.c:125
#3 0x080c2319 in st_insert (table=0x818be00, key=11746, value=3084140108) at st.c:292
#4 0x080d2567 in rb_ivar_set (obj=3084140068, id=11746, val=3084140108) at variable.c:959
#5 0x08059a4b in rb_eval (self=3084140068, n=0xb7ecf840) at eval.c:3454
#6 0x0805f173 in rb_call0 (klass=3084289968, recv=3084140068, id=3001, oid=3085760576, argc=3, argv=0xbf82fde8,
body=0xb7d6aa9c, flags=10) at eval.c:5698
#7 0x0805f8d0 in rb_call (klass=3084289968, recv=3084140068, mid=3001, argc=3, argv=0xbf82fde8, scope=1) at eval.c:5791
#8 0x0805fd7a in rb_funcall2 (recv=96, mid=3085760576, argc=-1209206720, argv=0xb7ecf840) at ruby.h:659
#9 0x08062778 in rb_obj_call_init (obj=3085760576, argc=-1209206720, argv=0xb7ecf840) at eval.c:7246
#10 0x0808addc in rb_class_new_instance (argc=-1209206720, argv=0xb7ecf840, klass=3085760576) at object.c:1455
#11 0x0806c73a in call_cfunc (func=0x808adb0 <rb_class_new_instance>, recv=3084289968, len=96, argc=135839496,
argv=0xbf82fde8) at eval.c:5406
#12 0x0805f609 in rb_call0 (klass=3084500216, recv=3084289968, id=3393, oid=3085760576, argc=3, argv=0xbf82fde8,
body=0xb7d9ab3c, flags=0) at eval.c:5617
#13 0x0805f8d0 in rb_call (klass=3084500216, recv=3084289968, mid=3393, argc=3, argv=0xbf82fde8, scope=0) at eval.c:5791
#14 0x0805a0ce in rb_eval (self=3084148588, n=0xb7ecf840) at ruby.h:659
#15 0x0805f173 in rb_call0 (klass=3084294348, recv=3084148588, id=11233, oid=3085760576, argc=4, argv=0xbf830748,
body=0xb7d7fc74, flags=8) at eval.c:5698
#16 0x0805f8d0 in rb_call (klass=3084294348, recv=3084148588, mid=11233, argc=4, argv=0xbf830748, scope=1) at eval.c:5791
#17 0x0805a0ce in rb_eval (self=3084148588, n=0xb7ecf840) at ruby.h:659
#18 0x08059959 in rb_eval (self=3084148588, n=0xb7ecf840) at eval.c:3433
#19 0x0805f173 in rb_call0 (klass=3084294348, recv=3084148588, id=10697, oid=3085760576, argc=2, argv=0xbf831828,
body=0xb7d85994, flags=8) at eval.c:5698
#20 0x0805f8d0 in rb_call (klass=3084294348, recv=3084148588, mid=10697, argc=2, argv=0xbf831828, scope=1) at eval.c:5791
#21 0x0805a0ce in rb_eval (self=3084148588, n=0xb7ecf840) at ruby.h:659
#22 0x0805d35a in rb_yield_0 (val=3084140788, self=3084148588, klass=4, flags=0, avalue=0) at eval.c:4795
#23 0x0805da09 in rb_yield (val=3085760576) at eval.c:4876
#24 0x08075955 in each_i (key=96, value=3085760576) at hash.c:1024
#25 0x08074992 in hash_foreach_iter (key=3084428436, value=3085760576, arg=0xbf832350) at hash.c:148
#26 0x080c2807 in st_foreach (table=0x817be68, func=0x8074960 <hash_foreach_iter>, arg=3213042512) at st.c:468
#27 0x08074ac3 in hash_foreach_call (arg=0xb7ecf840) at hash.c:181
#28 0x0805e829 in rb_ensure (b_proc=0x8074aa0 <hash_foreach_call>, data1=3213042512, e_proc=0x8074a20 <hash_foreach_ensure>,
data2=3084279388) at eval.c:5229
#29 0x08074b2b in rb_hash_foreach (hash=96, func=0xb7ecf840 <main_arena>, farg=3085760576) at hash.c:196
#30 0x080759b7 in rb_hash_each (hash=3084279388) at hash.c:1052
#31 0x0806c741 in call_cfunc (func=0x8075960 <rb_hash_each>, recv=3084279388, len=96, argc=135839496, argv=0x0)
at eval.c:5409
#32 0x0805f609 in rb_call0 (klass=3084466156, recv=3084279388, id=3889, oid=3085760576, argc=0, argv=0x0, body=0xb7d93440,
---Type <return> to continue, or q <return> to quit---
flags=0) at eval.c:5617
#33 0x0805f8d0 in rb_call (klass=3084466156, recv=3084279388, mid=3889, argc=0, argv=0x0, scope=0) at eval.c:5791
#34 0x0805a0ce in rb_eval (self=3084148588, n=0xb7ecf840) at ruby.h:659
#35 0x08059477 in rb_eval (self=3084148588, n=0xb7ecf840) at eval.c:2976
#36 0x0805f173 in rb_call0 (klass=3084279408, recv=3084148588, id=10721, oid=3085760576, argc=0, argv=0xbf8338dc,
body=0xb7d89fbc, flags=8) at eval.c:5698
#37 0x0805f8d0 in rb_call (klass=3084279408, recv=3084148588, mid=10721, argc=0, argv=0xbf8338dc, scope=1) at eval.c:5791
#38 0x0805fb52 in send_funcall (argc=0, argv=0xbf8338dc, recv=3084148588, scope=-1209206720) at ruby.h:659
#39 0x0805fc10 in rb_f_send (argc=-1209206720, argv=0xb7ecf840, recv=3085760576) at eval.c:5849
#40 0x0806c73a in call_cfunc (func=0x805fbe0 <rb_f_send>, recv=3084148588, len=96, argc=135839496, argv=0xbf8338d8)
at eval.c:5406
#41 0x0805f609 in rb_call0 (klass=3084500116, recv=3084148588, id=3945, oid=3085760576, argc=1, argv=0xbf8338d8,
body=0xb7d99d18, flags=8) at eval.c:5617
#42 0x0805f8d0 in rb_call (klass=3084500116, recv=3084148588, mid=3945, argc=1, argv=0xbf8338d8, scope=1) at eval.c:5791
#43 0x0805a0ce in rb_eval (self=3084148588, n=0xb7ecf840) at ruby.h:659
#44 0x0805975a in rb_eval (self=3084148588, n=0xb7ecf840) at eval.c:3067
#45 0x080598a2 in rb_eval (self=3084148588, n=0xb7ecf840) at eval.c:3116
#46 0x0805f173 in rb_call0 (klass=3084298788, recv=3084148588, id=5209, oid=3085760576, argc=1, argv=0xbf835138,
body=0xb7d87514, flags=0) at eval.c:5698
#47 0x0805f8d0 in rb_call (klass=3084298788, recv=3084148588, mid=5209, argc=1, argv=0xbf835138, scope=0) at eval.c:5791
#48 0x0805a0ce in rb_eval (self=3084149228, n=0xb7ecf840) at ruby.h:659
#49 0x0806527a in call_block (arg=0x60) at eval.c:8585
#50 0x08065175 in rb_block_pass (func=0x8065260 <call_block>, arg=3213056608, proc=3084143928) at eval.c:8524
#51 0x080652bb in block_pass (self=135839496, node=0x60) at eval.c:8594
#52 0x0805ad7a in rb_eval (self=3084149228, n=0xb7ecf840) at eval.c:2949
#53 0x0805d35a in rb_yield_0 (val=3084148588, self=3084149228, klass=4, flags=0, avalue=0) at eval.c:4795
#54 0x0805da09 in rb_yield (val=3085760576) at eval.c:4876
#55 0x080d590f in rb_ary_each (ary=3084148788) at array.c:1140
#56 0x0806c741 in call_cfunc (func=0x80d58d0 <rb_ary_each>, recv=3084148788, len=96, argc=135839496, argv=0x0) at eval.c:5409
#57 0x0805f609 in rb_call0 (klass=3084469136, recv=3084148788, id=3889, oid=3085760576, argc=0, argv=0x0, body=0xb7d93f6c,
flags=0) at eval.c:5617
#58 0x0805f8d0 in rb_call (klass=3084469136, recv=3084148788, mid=3889, argc=0, argv=0x0, scope=0) at eval.c:5791
#59 0x0805a0ce in rb_eval (self=3084149228, n=0xb7ecf840) at ruby.h:659
#60 0x08059477 in rb_eval (self=3084149228, n=0xb7ecf840) at eval.c:2976
#61 0x0805f173 in rb_call0 (klass=3084281708, recv=3084149228, id=5209, oid=3085760576, argc=1, argv=0xbf837728,
body=0xb7d670cc, flags=0) at eval.c:5698
#62 0x0805f8d0 in rb_call (klass=3084281708, recv=3084149228, mid=5209, argc=1, argv=0xbf837728, scope=0) at eval.c:5791
#63 0x0805a0ce in rb_eval (self=3084156328, n=0xb7ecf840) at ruby.h:659
#64 0x0806527a in call_block (arg=0x60) at eval.c:8585
#65 0x08065175 in rb_block_pass (func=0x8065260 <call_block>, arg=3213066320, proc=3084143928) at eval.c:8524
---Type <return> to continue, or q <return> to quit---
#66 0x080652bb in block_pass (self=135839496, node=0x60) at eval.c:8594
#67 0x0805ad7a in rb_eval (self=3084156328, n=0xb7ecf840) at eval.c:2949
#68 0x0805d35a in rb_yield_0 (val=3084149228, self=3084156328, klass=4, flags=0, avalue=0) at eval.c:4795
#69 0x0805da09 in rb_yield (val=3085760576) at eval.c:4876
#70 0x080d590f in rb_ary_each (ary=3084154868) at array.c:1140
#71 0x0806c741 in call_cfunc (func=0x80d58d0 <rb_ary_each>, recv=3084154868, len=96, argc=135839496, argv=0x0) at eval.c:5409
#72 0x0805f609 in rb_call0 (klass=3084469136, recv=3084154868, id=3889, oid=3085760576, argc=0, argv=0x0, body=0xb7d93f6c,
flags=0) at eval.c:5617
#73 0x0805f8d0 in rb_call (klass=3084469136, recv=3084154868, mid=3889, argc=0, argv=0x0, scope=0) at eval.c:5791
#74 0x0805a0ce in rb_eval (self=3084156328, n=0xb7ecf840) at ruby.h:659
#75 0x08059477 in rb_eval (self=3084156328, n=0xb7ecf840) at eval.c:2976
#76 0x0805f173 in rb_call0 (klass=3084281708, recv=3084156328, id=5209, oid=3085760576, argc=1, argv=0xbf839d18,
body=0xb7d670cc, flags=0) at eval.c:5698
#77 0x0805f8d0 in rb_call (klass=3084281708, recv=3084156328, mid=5209, argc=1, argv=0xbf839d18, scope=0) at eval.c:5791
#78 0x0805a0ce in rb_eval (self=3084154988, n=0xb7ecf840) at ruby.h:659
#79 0x08059477 in rb_eval (self=3084154988, n=0xb7ecf840) at eval.c:2976
#80 0x0805f173 in rb_call0 (klass=3084131968, recv=3084154988, id=14161, oid=3085760576, argc=0, argv=0x0, body=0xb7d436f4,
flags=0) at eval.c:5698
#81 0x0805f8d0 in rb_call (klass=3084131968, recv=3084154988, mid=14161, argc=0, argv=0x0, scope=0) at eval.c:5791
#82 0x0805a0ce in rb_eval (self=3084275068, n=0xb7ecf840) at ruby.h:659
#83 0x0805f173 in rb_call0 (klass=3084139468, recv=3084275068, id=14049, oid=3085760576, argc=0, argv=0x0, body=0xb7d44edc,
flags=10) at eval.c:5698
#84 0x0805f8d0 in rb_call (klass=3084139468, recv=3084275068, mid=14049, argc=0, argv=0x0, scope=2) at eval.c:5791
#85 0x0805a0ce in rb_eval (self=3084275068, n=0xb7ecf840) at ruby.h:659
#86 0x0805f173 in rb_call0 (klass=3084139468, recv=3084275068, id=5129, oid=3085760576, argc=0, argv=0x0, body=0xb7d457b0,
flags=0) at eval.c:5698
#87 0x0805f8d0 in rb_call (klass=3084139468, recv=3084275068, mid=5129, argc=0, argv=0x0, scope=0) at eval.c:5791
#88 0x0805a0ce in rb_eval (self=3084139468, n=0xb7ecf840) at ruby.h:659
#89 0x0805f173 in rb_call0 (klass=3084139368, recv=3084139468, id=5209, oid=3085760576, argc=2, argv=0xbf83c9e8,
body=0xb7d61ac8, flags=0) at eval.c:5698
#90 0x0805f8d0 in rb_call (klass=3084139368, recv=3084139468, mid=5209, argc=2, argv=0xbf83c9e8, scope=0) at eval.c:5791
#91 0x0805a0ce in rb_eval (self=3084277348, n=0xb7ecf840) at ruby.h:659
#92 0x08059fa2 in rb_eval (self=3084277348, n=0xb7ecf840) at eval.c:3246
#93 0x0805f173 in rb_call0 (klass=3084262768, recv=3084277348, id=5209, oid=3085760576, argc=0, argv=0x0, body=0xb7d61fb4,
flags=0) at eval.c:5698
#94 0x0805f8d0 in rb_call (klass=3084262768, recv=3084277348, mid=5209, argc=0, argv=0x0, scope=0) at eval.c:5791
#95 0x0805a0ce in rb_eval (self=3084262768, n=0xb7ecf840) at ruby.h:659
#96 0x0805f173 in rb_call0 (klass=3084262748, recv=3084262768, id=5209, oid=3085760576, argc=0, argv=0x0, body=0xb7d66320,
flags=0) at eval.c:5698
#97 0x0805f8d0 in rb_call (klass=3084262748, recv=3084262768, mid=5209, argc=0, argv=0x0, scope=0) at eval.c:5791
---Type <return> to continue, or q <return> to quit---
#98 0x0805a0ce in rb_eval (self=3084495376, n=0xb7ecf840) at ruby.h:659
#99 0x0805a408 in rb_eval (self=3084495376, n=0xb7ecf840) at ruby.h:683
#100 0x0805d35a in rb_yield_0 (val=3084299568, self=3084495376, klass=4, flags=2, avalue=2) at eval.c:4795
#101 0x0806491f in proc_invoke (proc=3084299408, args=3084299568, self=6, klass=0) at ruby.h:659
#102 0x08062c06 in call_end_proc (data=3085760576) at eval.c:7478
#103 0x08062ee6 in rb_exec_end_proc () at eval.c:7559
#104 0x08056162 in ruby_finalize_0 () at eval.c:1425
#105 0x08056335 in ruby_cleanup (ex=0) at eval.c:1456
#106 0x08056481 in ruby_stop (ex=-1209206720) at eval.c:1514
#107 0x080564cf in ruby_run () at eval.c:1526
#108 0x080543de in main (argc=-1209206720, argv=0xb7ecf840, envp=0xbf83fb04) at main.c:38
(gdb)
--
[田中 哲][たなか あきら][Tanaka Akira]