/usr/local/lib/ruby/1.8/monitor.rb:218: [BUG] cross-thread violation on
rb_thread_schedule()
ruby 1.8.4 (2005-12-24) [i386-freebsd4]

Abort trap (core dumped)

$ gdb `which ruby` ruby.core
GNU gdb 4.18 (FreeBSD)
Copyright 1998 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-unknown-freebsd"...(no debugging
symbols found)...
Core was generated by `ruby'.
Program terminated with signal 6, Abort trap.
Reading symbols from /usr/local/lib/libruby18.so.18...(no debugging
symbols found)...done.
Reading symbols from /usr/lib/libcrypt.so.2...(no debugging symbols
found)...done.
Reading symbols from /usr/lib/libm.so.2...(no debugging symbols
found)...done.
Reading symbols from /usr/lib/libc_r.so.4...(no debugging symbols
found)...done.
Reading symbols from
/usr/local/lib/ruby/site_ruby/1.8/i386-freebsd4/idn.so...
(no debugging symbols found)...done.
Reading symbols from /usr/local/lib/libidn.so.16...(no debugging
symbols found)...done.
Reading symbols from /usr/local/lib/libgnugetopt.so.1...(no debugging
symbols found)...done.
Reading symbols from /usr/local/lib/libiconv.so.3...(no debugging
symbols found)...done.
Reading symbols from
/usr/local/lib/ruby/1.8/i386-freebsd4/stringio.so...(no debugging
symbols found)...
done.
Reading symbols from
/usr/local/lib/ruby/1.8/i386-freebsd4/syck.so...(no debugging symbols
found)...done.
Reading symbols from
/usr/local/lib/ruby/1.8/i386-freebsd4/socket.so...(no debugging symbols
found)...done.
Reading symbols from
/usr/local/lib/ruby/1.8/i386-freebsd4/digest/md5.so...(no debugging
symbols found)...
done.
Reading symbols from /usr/local/lib/libcrypto.so.4...(no debugging
symbols found)...done.
Reading symbols from
/usr/local/lib/ruby/1.8/i386-freebsd4/digest.so...(no debugging symbols
found)...done.
Reading symbols from
/usr/local/lib/ruby/1.8/i386-freebsd4/fcntl.so...(no debugging symbols
found)...done.
Reading symbols from
/usr/local/lib/ruby/1.8/i386-freebsd4/openssl.so...(no debugging
symbols found)...done.
Reading symbols from /usr/local/lib/libssl.so.4...(no debugging symbols
found)...done.
Reading symbols from /usr/local/lib/ruby/1.8/i386-freebsd4/nkf.so...(no
debugging symbols found)...done.
Reading symbols from /usr/libexec/ld-elf.so.1...(no debugging symbols
found)...done.
#0  0x2819b584 in kill () from /usr/lib/libc_r.so.4
(gdb) bt
#0  0x2819b584 in kill () from /usr/lib/libc_r.so.4
#1  0x281e9b9e in abort () from /usr/lib/libc_r.so.4
#2  0x2808333d in rb_bug () from /usr/local/lib/libruby18.so.18
#3  0x280990c6 in rb_thread_schedule () from
/usr/local/lib/libruby18.so.18
#4  0x2809a678 in rb_thread_pass () from /usr/local/lib/libruby18.so.18
#5  0x280908c1 in rb_call0 () from /usr/local/lib/libruby18.so.18
#6  0x280913d0 in rb_call () from /usr/local/lib/libruby18.so.18
#7  0x2808b5ff in rb_eval () from /usr/local/lib/libruby18.so.18
#8  0x28090f40 in rb_call0 () from /usr/local/lib/libruby18.so.18
#9  0x280913d0 in rb_call () from /usr/local/lib/libruby18.so.18
#10 0x2808b8a4 in rb_eval () from /usr/local/lib/libruby18.so.18
#11 0x2808ae10 in rb_eval () from /usr/local/lib/libruby18.so.18
#12 0x28090f40 in rb_call0 () from /usr/local/lib/libruby18.so.18
#13 0x280913d0 in rb_call () from /usr/local/lib/libruby18.so.18
#14 0x2808b5ff in rb_eval () from /usr/local/lib/libruby18.so.18
#15 0x2808a732 in rb_eval () from /usr/local/lib/libruby18.so.18
#16 0x28090f40 in rb_call0 () from /usr/local/lib/libruby18.so.18
#17 0x280913d0 in rb_call () from /usr/local/lib/libruby18.so.18
#18 0x2808b5ff in rb_eval () from /usr/local/lib/libruby18.so.18
#19 0x28090f40 in rb_call0 () from /usr/local/lib/libruby18.so.18
#20 0x280913d0 in rb_call () from /usr/local/lib/libruby18.so.18
#21 0x2808b82c in rb_eval () from /usr/local/lib/libruby18.so.18
#22 0x280964e9 in block_pass () from /usr/local/lib/libruby18.so.18
#23 0x2808a560 in rb_eval () from /usr/local/lib/libruby18.so.18
#24 0x28090f40 in rb_call0 () from /usr/local/lib/libruby18.so.18
#25 0x280913d0 in rb_call () from /usr/local/lib/libruby18.so.18
#26 0x2808b5ff in rb_eval () from /usr/local/lib/libruby18.so.18
#27 0x28090f40 in rb_call0 () from /usr/local/lib/libruby18.so.18
#28 0x280913d0 in rb_call () from /usr/local/lib/libruby18.so.18
#29 0x2808b5ff in rb_eval () from /usr/local/lib/libruby18.so.18
#30 0x28090f40 in rb_call0 () from /usr/local/lib/libruby18.so.18
#31 0x280913d0 in rb_call () from /usr/local/lib/libruby18.so.18
#32 0x2808b8a4 in rb_eval () from /usr/local/lib/libruby18.so.18
#33 0x2808ea1f in rb_yield_0 () from /usr/local/lib/libruby18.so.18
#34 0x28095e7c in proc_invoke () from /usr/local/lib/libruby18.so.18
#35 0x28096002 in proc_call () from /usr/local/lib/libruby18.so.18
#36 0x28090892 in rb_call0 () from /usr/local/lib/libruby18.so.18
#37 0x280913d0 in rb_call () from /usr/local/lib/libruby18.so.18
#38 0x28091801 in rb_funcall2 () from /usr/local/lib/libruby18.so.18
#39 0x28087b11 in rb_eval_cmd () from /usr/local/lib/libruby18.so.18
#40 0x28097ed2 in run_trap_eval () from /usr/local/lib/libruby18.so.18
#41 0x2808fb1a in rb_protect () from /usr/local/lib/libruby18.so.18
#42 0x280980a5 in rb_trap_eval () from /usr/local/lib/libruby18.so.18
#43 0x2809b7ad in rb_thread_trap_eval () from
/usr/local/lib/libruby18.so.18
#44 0x280eab45 in signal_exec () from /usr/local/lib/libruby18.so.18
#45 0x280eab92 in sighandler () from /usr/local/lib/libruby18.so.18
#46 0x281ad723 in _thread_sig_handler () from /usr/lib/libc_r.so.4
#47 0x281ae9bc in _thread_sig_wrapper () from /usr/lib/libc_r.so.4
#48 0x0 in ?? ()
(gdb)

Seems like a stack overflow, but I can't seem to figure what's doing it.