Hi, I've a collection of core dumps from SIGINTing a heavily
multi-threaded ruby process. Doesn't always happen, but semi-regularly.

Unfortunately, Ubuntu is still shipping 1.8.4.

I suspect this has gotten better in 1.8.5, and I don't want to waste
time with bug reports for uninteresting stuff. If someone wants the
cores, I can post them. Fwiw, the apps not stand-alone, and it uses
openssl heavily, mostly composed of threads doing

  loop
     sleep 10
	 @ssl.write "blah"
  end

uname -a = Linux pebble.bycast.com 2.6.17-10-386 #2 Tue Dec 5 22:26:18 UTC 2006 i686 GNU/Linux

ruby 1.8.4 (2005-12-24) [i486-linux]

Sam


(gdb) bt
#0  0xffffe410 in __kernel_vsyscall ()
#1  0xb7d45770 in raise () from /lib/tls/i686/cmov/libc.so.6
#2  0xb7d46ef3 in abort () from /lib/tls/i686/cmov/libc.so.6
#3  0xb7edc0d2 in rb_bug (fmt=0xb7f73f8f "Segmentation fault") at error.c:214
#4  0xb7f47780 in sigsegv (sig=11) at signal.c:447
#5  <signal handler called>
#6  0xb7d8a37c in memcpy () from /lib/tls/i686/cmov/libc.so.6
#7  0xb7edeec4 in rb_thread_save_context (th=0xb7b9e000) at eval.c:10158
#8  0xb7ee4f3c in rb_thread_interrupt () at eval.c:12140
#9  0xb7f477e9 in signal_exec (sig=<value optimized out>) at signal.c:376
#10 0xb7f478e3 in sighandler (sig=144451200) at signal.c:422
#11 <signal handler called>
#12 0xffffe410 in __kernel_vsyscall ()
#13 0xb7eb4bf6 in __nanosleep_nocancel () from /lib/tls/i686/cmov/libpthread.so.0
#14 0xb7ee0550 in thread_timer (dummy=0x0) at eval.c:11628
#15 0xb7eae504 in start_thread () from /lib/tls/i686/cmov/libpthread.so.0
#16 0xb7de951e in clone () from /lib/tls/i686/cmov/libc.so.6

  (I have two of the above)

(gdb) bt
#0  0xffffe410 in __kernel_vsyscall ()
#1  0xb7d60770 in raise () from /lib/tls/i686/cmov/libc.so.6
#2  0xb7d61ef3 in abort () from /lib/tls/i686/cmov/libc.so.6
#3  0xb7ef70d2 in rb_bug (fmt=0xb7f79654 "cross-thread violation on rb_thread_schedule()") at error.c:214
#4  0xb7f008bf in rb_thread_schedule () at eval.c:10505
#5  0xb7f1edbe in io_fflush (f=0xb7e67560, fptr=0x806d008) at io.c:341
#6  0xb7f1ef36 in io_fwrite (str=3066920600, fptr=0x806d008) at io.c:442
#7  0xb7f25da2 in io_write (io=3084038180, str=3066920600) at io.c:561
#8  0xb7efaa1a in call_cfunc (func=0xb7f25cb0 <io_write>, recv=3084038180, len=21965, argc=6, argv=0xbfb4a790) at eval.c:5626
#9  0xb7f01f7e in rb_call0 (klass=3084040820, recv=3084038180, id=7281, oid=7281, argc=4793, argv=0xbfb4a790, body=0xb7d2b484, flags=0) at eval.c:5776
#10 0xb7f02be8 in rb_call (klass=3084040820, recv=3084038180, mid=7281, argc=1, argv=0xbfb4a790, scope=1) at eval.c:6006
#11 0xb7f031a2 in vafuncall (recv=3084038180, mid=7281, n=1, ar=0xbfb4a7f4) at eval.c:6083
#12 0xb7f03330 in rb_funcall (recv=3084038180, mid=7281, n=1) at eval.c:6100
#13 0xb7f1e4d6 in rb_io_write (io=3084038180, str=3066920600) at io.c:574
#14 0xb7f1e518 in rb_write_error2 (mesg=0x84a7440 "./bin/battr:191:in `write'", len=26) at io.c:4062
#15 0xb7f047d3 in error_print () at eval.c:1253
#16 0xb7f04d83 in error_handle (ex=<value optimized out>) at eval.c:1491
#17 0xb7f05502 in ruby_cleanup (ex=<value optimized out>) at eval.c:1574
#18 0xb7f055ed in ruby_stop (ex=6) at eval.c:1606
#19 0xb7f10481 in ruby_run () at eval.c:1627
#20 0x08048612 in main ()


(gdb) bt
#0  0xffffe410 in __kernel_vsyscall ()
#1  0xb7ce8770 in raise () from /lib/tls/i686/cmov/libc.so.6
#2  0xb7ce9ef3 in abort () from /lib/tls/i686/cmov/libc.so.6
#3  0xb7e7f0d2 in rb_bug (fmt=0xb7f01654 "cross-thread violation on rb_thread_schedule()") at error.c:214
#4  0xb7e888bf in rb_thread_schedule () at eval.c:10505
#5  0xb7e906c1 in rb_eval (self=3066241120, n=0x6) at eval.c:4095
#6  0xb7e91d3b in rb_eval (self=3066241120, n=<value optimized out>) at eval.c:3429
#7  0xb7e91087 in rb_eval (self=3066241120, n=<value optimized out>) at eval.c:3636
#8  0xb7e90cb7 in rb_eval (self=3066241120, n=<value optimized out>) at eval.c:3306
#9  0xb7e8a79b in rb_call0 (klass=3080189000, recv=3066241120, id=29353, oid=29353, argc=0, argv=0xbfea3ce4, body=0xb798e6b4, flags=0) at eval.c:5912
#10 0xb7e8abe8 in rb_call (klass=3080189000, recv=3066241120, mid=29353, argc=1, argv=0xbfea3ce0, scope=1) at eval.c:6006
#11 0xb7e91f3c in rb_eval (self=<value optimized out>, n=<value optimized out>) at eval.c:3450
#12 0xb7e93bac in rb_eval (self=3066241120, n=<value optimized out>) at eval.c:3163
#13 0xb7e9542c in rb_yield_0 (val=6, self=3066241120, klass=<value optimized out>, flags=0, avalue=0) at eval.c:4953
#14 0xb7e91fe9 in rb_eval (self=3066241120, n=<value optimized out>) at eval.c:3239
#15 0xb7e935e1 in rb_eval (self=3066241120, n=<value optimized out>) at eval.c:3299
#16 0xb7e8a79b in rb_call0 (klass=3080189000, recv=3066241120, id=29345, oid=29345, argc=0, argv=0x0, body=0xb798ec40, flags=0) at eval.c:5912
#17 0xb7e8abe8 in rb_call (klass=3080189000, recv=3066241120, mid=29345, argc=0, argv=0x0, scope=1) at eval.c:6006
#18 0xb7e91f3c in rb_eval (self=<value optimized out>, n=<value optimized out>) at eval.c:3450
#19 0xb7e93bac in rb_eval (self=3066241120, n=<value optimized out>) at eval.c:3163
#20 0xb7e8a79b in rb_call0 (klass=3080189000, recv=3066241120, id=5193, oid=5193, argc=0, argv=0xbfea5edc, body=0xb798ef38, flags=0) at eval.c:5912
#21 0xb7e8abe8 in rb_call (klass=3080189000, recv=3066241120, mid=5193, argc=3, argv=0xbfea5ed0, scope=1) at eval.c:6006
#22 0xb7e91f3c in rb_eval (self=<value optimized out>, n=<value optimized out>) at eval.c:3450
#23 0xb7e942fd in block_pass (self=3066241120, node=0xb79a0f94) at eval.c:8761
#24 0xb7e920e1 in rb_eval (self=3066241120, n=<value optimized out>) at eval.c:3149
#25 0xb7e8a79b in rb_call0 (klass=3080186320, recv=3066241120, id=28769, oid=28769, argc=0, argv=0xbfea6c44, body=0xb79a1408, flags=0) at eval.c:5912
#26 0xb7e8abe8 in rb_call (klass=3080186320, recv=3066241120, mid=28769, argc=1, argv=0xbfea6c40, scope=1) at eval.c:6006