Roger said:
Was this in an embedded environment? What version of ruby? Is it
reproducible? What's the full gdb? Can you produce a sample that
causes it [that is really the only way it can ever get fixed].
Jruby is another option.
Thanks!
-=R
Hello Roger and thanks for quick reply,
It is always hard to reproduce a bug in garbage collector as it is
unpredictable at best. But calling the same function between 5-10 times
always produces the segmentation fault.
It can only be reproduced in my web environment running rails with
webbrick (or any other webserver). I've tried to reproduce the bug in
the console but haven't succeeded, maybe because its hard to simulate
what the webserver does in the console. If you have any ideas on how to
do this please let me know
This is not an embedded environment.
uname -a
Linux debian-ipox-x64 2.6.18-5-amd64 #1 SMP Thu May 31 23:51:05 UTC 2007
x86_64 GNU/Linux
I tried with different version of ruby and now I'm using
ruby 1.8.7 (2008-10-31 revision 0) [x86_64-linux]
Below is a GDB backtrace
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 47286927956704 (LWP 23124)]
garbage_collect () at gc.c:1184
1184 if (!(p->as.basic.flags & FL_MARK)) {
(gdb) bt
#0 garbage_collect () at gc.c:1184
#1 0x000000000042e41b in rb_gc () at gc.c:1533
#2 0x000000000042e439 in rb_gc_start () at gc.c:1550
#3 0x000000000041b87a in rb_call0 (klass=47286918689040,
recv=47286918689080, id=5313, oid=5313,
argc=0, argv=0x0, body=0x2b01d7fdb0e8, flags=<value optimized out>)
at eval.c:5906
#4 0x000000000041c63f in rb_call (klass=47286918689040,
recv=47286918689080, mid=5313, argc=0,
argv=0x0, scope=0, self=47287043546680) at eval.c:6153
#5 0x000000000041734c in rb_eval (self=47287043546680, n=<value
optimized out>) at eval.c:3494
#6 0x000000000041c0f2 in rb_call0 (klass=47287043546760,
recv=47287043546680, id=107929,
oid=107929, argc=0, argv=0x7fffd2b0c1b0, body=0x2b01df71fa00,
flags=<value optimized out>)
at eval.c:6057
#7 0x000000000041c63f in rb_call (klass=47287043546760,
recv=47287043546680, mid=107929, argc=4,
argv=0x7fffd2b0c190, scope=0, self=47287042528040) at eval.c:6153
#8 0x000000000041734c in rb_eval (self=47287042528040, n=<value
optimized out>) at eval.c:3494
#9 0x00000000004176db in rb_eval (self=47287042528040, n=<value
optimized out>) at eval.c:3049
#10 0x000000000041c0f2 in rb_call0 (klass=47287043072000,
recv=47287042528040, id=113353,
oid=113353, argc=0, argv=0x7fffd2b0cea8, body=0x2b01df6a9918,
flags=<value optimized out>)
at eval.c:6057
#11 0x000000000041c63f in rb_call (klass=47287043072000,
recv=47287042528040, mid=113353, argc=0,
argv=0x7fffd2b0cea8, scope=1, self=6) at eval.c:6153
#12 0x000000000042421e in rb_f_send (argc=1, argv=0x7fffd2b0cea0,
recv=47287042528040)
at eval.c:6201
#13 0x000000000041b87a in rb_call0 (klass=47286918830400,
recv=47287042528040, id=4225, oid=4225,
argc=1, argv=0x7fffd2b0cea0, body=0x2b01d7ff93b8, flags=<value
optimized out>) at eval.c:5906
#14 0x000000000041c63f in rb_call (klass=47286918830400,
recv=47287042528040, mid=4225, argc=1,
argv=0x7fffd2b0cea0, scope=1, self=47287042528040) at eval.c:6153
#15 0x0000000000417482 in rb_eval (self=47287042528040, n=<value
optimized out>) at eval.c:3509
---Type <return> to continue, or q <return> to quit---
#16 0x000000000041c0f2 in rb_call0 (klass=47286962656200,
recv=47287042528040, id=63369,
oid=56801, argc=0, argv=0x0, body=0x2b01dab76770, flags=<value
optimized out>) at eval.c:6057
#17 0x000000000041c63f in rb_call (klass=47286962656200,
recv=47287042528040, mid=63369, argc=0,
argv=0x0, scope=2, self=47287042528040) at eval.c:6153
#18 0x00000000004174cc in rb_eval (self=47287042528040, n=<value
optimized out>) at eval.c:3515
#19 0x000000000041c0f2 in rb_call0 (klass=47286963258720,
recv=47287042528040, id=63337,
oid=63337, argc=0, argv=0x7fffd2b0db08, body=0x2b01da95f810,
flags=<value optimized out>)
at eval.c:6057
#20 0x000000000041c63f in rb_call (klass=47286963258720,
recv=47287042528040, mid=63337, argc=3,
argv=0x7fffd2b0daf0, scope=1, self=47287042528040) at eval.c:6153
#21 0x0000000000417482 in rb_eval (self=47287042528040, n=<value
optimized out>) at eval.c:3509
#22 0x000000000041c0f2 in rb_call0 (klass=47286963258720,
recv=47287042528040, id=62609,
oid=63329, argc=0, argv=0x0, body=0x2b01da95fc70, flags=<value
optimized out>) at eval.c:6057
#23 0x000000000041c63f in rb_call (klass=47286963258720,
recv=47287042528040, mid=62609, argc=0,
argv=0x0, scope=2, self=47287042528040) at eval.c:6153
#24 0x00000000004174cc in rb_eval (self=47287042528040, n=<value
optimized out>) at eval.c:3515
#25 0x000000000041aa53 in rb_yield_0 (val=6, self=47287042528040,
klass=0,
flags=<value optimized out>, avalue=0) at eval.c:5079
#26 0x0000000000417e84 in rb_eval (self=47286940121880, n=<value
optimized out>) at eval.c:3299
#27 0x000000000041c0f2 in rb_call0 (klass=47286943807600,
recv=47286940121880, id=53321,
oid=53321, argc=0, argv=0x0, body=0x2b01d8d125e0, flags=<value
optimized out>) at eval.c:6057
#28 0x000000000041c63f in rb_call (klass=47286943807600,
recv=47286940121880, mid=53321, argc=0,
argv=0x0, scope=0, self=47287042528040) at eval.c:6153
#29 0x000000000041734c in rb_eval (self=47287042528040, n=<value
optimized out>) at eval.c:3494
#30 0x0000000000419480 in rb_eval (self=47287042528040, n=<value
optimized out>) at eval.c:3224
#31 0x0000000000417257 in rb_eval (self=47287042528040, n=<value
optimized out>) at eval.c:3488
#32 0x0000000000416c6d in rb_eval (self=47287042528040, n=<value
optimized out>) at eval.c:3847
Cheers,
Henke