I posted about this before but Matz wanted me to post more detail.

We are encountering a gc_sweep core dump on Ruby in a complex networked 
application that is processing very large Ruby files.  Its Ruby 1.8.  
Moving to 1.8.1 would be difficult right now since we have a production 
system running on over 300 computers.  Here is the GDB 'where' output:

[asmt@sv022 shared]$ gdb /usr/bin/ruby core.15316
GNU gdb Red Hat Linux (5.2.1-4)
Copyright 2002 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-redhat-linux"...
Core was generated by `ruby -W0 SAVE-P-PreStage56.rb'.
Program terminated with signal 6, Aborted.
Reading symbols from /lib/libdl.so.2...done.
Loaded symbols for /lib/libdl.so.2
Reading symbols from /lib/libcrypt.so.1...done.
Loaded symbols for /lib/libcrypt.so.1
Reading symbols from /lib/i686/libm.so.6...done.
Loaded symbols for /lib/i686/libm.so.6
Reading symbols from /lib/i686/libc.so.6...done.
Loaded symbols for /lib/i686/libc.so.6
Reading symbols from /lib/ld-linux.so.2...done.
Loaded symbols for /lib/ld-linux.so.2
Reading symbols from /usr/lib/ruby/1.8/i686-linux/syck.so...done.
Loaded symbols for /usr/lib/ruby/1.8/i686-linux/syck.so
Reading symbols from /usr/lib/ruby/1.8/i686-linux/socket.so...done.
Loaded symbols for /usr/lib/ruby/1.8/i686-linux/socket.so
Reading symbols from 
/mnt/shared/socVA/csmart/assessment/lib/postgres.so...done.
Loaded symbols for /mnt/shared/socVA/csmart/assessment/lib/postgres.so
Reading symbols from /usr/lib/libpq.so.2...done.
Loaded symbols for /usr/lib/libpq.so.2
Reading symbols from /lib/libnsl.so.1...done.
Loaded symbols for /lib/libnsl.so.1
Reading symbols from /lib/libssl.so.2...done.
Loaded symbols for /lib/libssl.so.2
Reading symbols from /lib/libcrypto.so.2...done.
Loaded symbols for /lib/libcrypto.so.2
Reading symbols from /usr/kerberos/lib/libkrb5.so.3...done.
Loaded symbols for /usr/kerberos/lib/libkrb5.so.3
Reading symbols from /usr/kerberos/lib/libk5crypto.so.3...done.
Loaded symbols for /usr/kerberos/lib/libk5crypto.so.3
Reading symbols from /usr/kerberos/lib/libcom_err.so.3...done.
Loaded symbols for /usr/kerberos/lib/libcom_err.so.3
Reading symbols from /lib/libresolv.so.2...done.
Loaded symbols for /lib/libresolv.so.2
Reading symbols from /usr/lib/ruby/1.8/i686-linux/openssl.so...done.
Loaded symbols for /usr/lib/ruby/1.8/i686-linux/openssl.so
Reading symbols from /lib/libnss_files.so.2...done.
Loaded symbols for /lib/libnss_files.so.2
Reading symbols from /lib/libnss_nisplus.so.2...done.
Loaded symbols for /lib/libnss_nisplus.so.2
Reading symbols from /lib/libnss_nis.so.2...done.
Loaded symbols for /lib/libnss_nis.so.2
Reading symbols from /lib/libnss_dns.so.2...done.
Loaded symbols for /lib/libnss_dns.so.2
Reading symbols from /usr/lib/ruby/1.8/i686-linux/digest/sha1.so...done.
Loaded symbols for /usr/lib/ruby/1.8/i686-linux/digest/sha1.so
Reading symbols from /usr/lib/ruby/1.8/i686-linux/digest.so...done.
Loaded symbols for /usr/lib/ruby/1.8/i686-linux/digest.so
#0  0x42028cc1 in kill () from /lib/i686/libc.so.6
(gdb)
(gdb)
(gdb) where
#0  0x42028cc1 in kill () from /lib/i686/libc.so.6
#1  0x42028ac8 in raise () from /lib/i686/libc.so.6
#2  0x4202a019 in abort () from /lib/i686/libc.so.6
#3  0x080b9774 in rb_check_type (x=1108517584, t=6) at error.c:193
#4  0x0806a636 in obj_free (obj=1074200648) at gc.c:1150
#5  0x0806a38d in gc_sweep () at gc.c:939
#6  0x0806a84f in rb_gc () at gc.c:1299
#7  0x080692e1 in ruby_xmalloc (size=16) at gc.c:106
#8  0x080a07a3 in st_insert (table=0xb250af0, key=41274, value=4) at 
st.c:301
#9  0x080acaaa in rb_ivar_set (obj=1137533592, id=41274, val=4) at 
variable.c:995
#10 0x080568e1 in rb_eval (self=1137533592, n=0x0) at eval.c:3182
#11 0x080568c9 in rb_eval (self=1137533592, n=0x0) at eval.c:3181
#12 0x080568c9 in rb_eval (self=1137533592, n=0x0) at eval.c:3181
#13 0x080568c9 in rb_eval (self=1137533592, n=0x0) at eval.c:3181
#14 0x0805b01a in rb_call0 (klass=1076011132, recv=1137533592, id=2953, 
oid=0, argc=2, argv=0xbffefd80, body=0x4065cf9c, nosuper=0)
     at eval.c:5032
#15 0x0805b4d1 in rb_call (klass=1076011132, recv=1137533592, mid=2953, 
argc=2, argv=0xbffefd80, scope=1) at eval.c:5122
#16 0x0805b7a3 in rb_funcall2 (recv=1108517584, mid=2953, argc=2, 
argv=0xbffefd80) at ruby.h:626
#17 0x0805d94e in rb_obj_call_init (obj=1137533592, argc=2, 
argv=0xbffefd80) at eval.c:6258
#18 0x0807c890 in rb_class_new_instance (argc=2, argv=0xbffefd80, 
klass=1076011132) at object.c:767
#19 0x0806525f in call_cfunc (func=0x807c870 <rb_class_new_instance>, 
recv=1076011132, len=1108517584, argc=2, argv=0x6) at eval.c:4767
#20 0x0805ad31 in rb_call0 (klass=1074400504, recv=1076011132, 
id=28737, oid=0, argc=2, argv=0xbffefd80, body=0x4009fb64, nosuper=0)
     at eval.c:4904
#21 0x0805b4d1 in rb_call (klass=1074400504, recv=1076011132, 
mid=28737, argc=2, argv=0xbffefd80, scope=0) at eval.c:5122
#22 0x08056e33 in rb_eval (self=1076011132, n=0x0) at eval.c:2994
#23 0x08056817 in rb_eval (self=1076011132, n=0x0) at eval.c:3161
#24 0x0805b01a in rb_call0 (klass=1076011092, recv=1076011132, id=3353, 
oid=0, argc=0, argv=0xbfff09c8, body=0x40252130, nosuper=0)
     at eval.c:5032
#25 0x0805b4d1 in rb_call (klass=1076011092, recv=1076011132, mid=3353, 
argc=2, argv=0xbfff09c0, scope=0) at eval.c:5122
#26 0x08056e33 in rb_eval (self=1075974772, n=0x0) at eval.c:2994
#27 0x08056817 in rb_eval (self=1075974772, n=0x0) at eval.c:3161
#28 0x08056661 in rb_eval (self=1075974772, n=0x0) at eval.c:2812
#29 0x0805b01a in rb_call0 (klass=1075974012, recv=1075974772, 
id=12017, oid=0, argc=0, argv=0xbfff1b24, body=0x400b3bf4, nosuper=0)
     at eval.c:5032
#30 0x0805b4d1 in rb_call (klass=1075974012, recv=1075974772, 
mid=12017, argc=1, argv=0xbfff1b20, scope=0) at eval.c:5122
#31 0x08056e33 in rb_eval (self=1079574288, n=0x0) at eval.c:2994
#32 0x080567d1 in rb_eval (self=1079574288, n=0x0) at eval.c:3154
---Type <return> to continue, or q <return> to quit---
#33 0x0805952e in rb_yield_0 (val=1142722392, self=1079574288, klass=0, 
flags=0, avalue=0) at eval.c:4153
#34 0x080574c3 in rb_eval (self=1115029332, n=0x0) at eval.c:2802
#35 0x0805952e in rb_yield_0 (val=1142722392, self=1115029332, klass=0, 
flags=0, avalue=0) at eval.c:4153
#36 0x080574c3 in rb_eval (self=1113965632, n=0x0) at eval.c:2802
#37 0x0805952e in rb_yield_0 (val=1142722392, self=1113965632, klass=0, 
flags=0, avalue=0) at eval.c:4153
#38 0x08059966 in rb_yield (val=1142722392) at eval.c:4222
#39 0x080af383 in rb_ary_each (ary=1113962212) at array.c:817
#40 0x0806525f in call_cfunc (func=0x80af35c <rb_ary_each>, 
recv=1113962212, len=1108517584, argc=0, argv=0x6) at eval.c:4767
#41 0x0805ad31 in rb_call0 (klass=1074370424, recv=1113962212, id=3817, 
oid=0, argc=0, argv=0x0, body=0x40099354, nosuper=0) at eval.c:4904
#42 0x0805b4d1 in rb_call (klass=1074370424, recv=1113962212, mid=3817, 
argc=0, argv=0x0, scope=0) at eval.c:5122
#43 0x08056e33 in rb_eval (self=1113965632, n=0x0) at eval.c:2994
#44 0x08056279 in rb_eval (self=1113965632, n=0x0) at eval.c:2717
#45 0x0805b01a in rb_call0 (klass=1075104368, recv=1113965632, 
id=12841, oid=0, argc=0, argv=0x0, body=0x400d50b0, nosuper=0) at 
eval.c:5032
#46 0x0805b4d1 in rb_call (klass=1075104368, recv=1113965632, 
mid=12841, argc=0, argv=0x0, scope=0) at eval.c:5122
#47 0x08056e33 in rb_eval (self=1115029332, n=0x0) at eval.c:2994
#48 0x08056279 in rb_eval (self=1115029332, n=0x0) at eval.c:2717
#49 0x0805952e in rb_yield_0 (val=1113965632, self=1115029332, klass=0, 
flags=0, avalue=0) at eval.c:4153
#50 0x08059966 in rb_yield (val=1113965632) at eval.c:4222
#51 0x080af383 in rb_ary_each (ary=1115028972) at array.c:817
#52 0x0806525f in call_cfunc (func=0x80af35c <rb_ary_each>, 
recv=1115028972, len=1108517584, argc=0, argv=0x6) at eval.c:4767
#53 0x0805ad31 in rb_call0 (klass=1074370424, recv=1115028972, id=3817, 
oid=0, argc=0, argv=0x0, body=0x40099354, nosuper=0) at eval.c:4904
#54 0x0805b4d1 in rb_call (klass=1074370424, recv=1115028972, mid=3817, 
argc=0, argv=0x0, scope=0) at eval.c:5122
#55 0x08056e33 in rb_eval (self=1115029332, n=0x0) at eval.c:2994
#56 0x08056279 in rb_eval (self=1115029332, n=0x0) at eval.c:2717
#57 0x0805b01a in rb_call0 (klass=1075105208, recv=1115029332, 
id=12841, oid=0, argc=0, argv=0x0, body=0x400da3e4, nosuper=0) at 
eval.c:5032
#58 0x0805b4d1 in rb_call (klass=1075105208, recv=1115029332, 
mid=12841, argc=0, argv=0x0, scope=0) at eval.c:5122
#59 0x08056e33 in rb_eval (self=1079574288, n=0x0) at eval.c:2994
#60 0x08056279 in rb_eval (self=1079574288, n=0x0) at eval.c:2717
#61 0x0805b01a in rb_call0 (klass=1075851092, recv=1079574288, 
id=31265, oid=0, argc=0, argv=0xbfff68a4, body=0x4020bfdc, nosuper=0)
     at eval.c:5032
#62 0x0805b4d1 in rb_call (klass=1075851092, recv=1079574288, 
mid=31265, argc=1, argv=0xbfff68a0, scope=1) at eval.c:5122
#63 0x08056e33 in rb_eval (self=1079574288, n=0x0) at eval.c:2994
#64 0x080559c6 in rb_eval (self=1079574288, n=0x0) at eval.c:2550
#65 0x0805952e in rb_yield_0 (val=29, self=1079574288, klass=0, 
flags=0, avalue=0) at eval.c:4153
#66 0x08059966 in rb_yield (val=29) at eval.c:4222
#67 0x0807a994 in int_dotimes (num=33) at numeric.c:1775
#68 0x0806525f in call_cfunc (func=0x807a95c <int_dotimes>, recv=33, 
len=1108517584, argc=0, argv=0x6) at eval.c:4767
---Type <return> to continue, or q <return> to quit---
#69 0x0805ad31 in rb_call0 (klass=1074375004, recv=33, id=6361, oid=0, 
argc=0, argv=0x0, body=0x4009a894, nosuper=0) at eval.c:4904
#70 0x0805b4d1 in rb_call (klass=1074375004, recv=33, mid=6361, argc=0, 
argv=0x0, scope=0) at eval.c:5122
#71 0x08056e33 in rb_eval (self=1079574288, n=0x0) at eval.c:2994
#72 0x08056279 in rb_eval (self=1079574288, n=0x0) at eval.c:2717
#73 0x0805b01a in rb_call0 (klass=1075851092, recv=1079574288, 
id=13809, oid=0, argc=0, argv=0x0, body=0x4020e160, nosuper=0) at 
eval.c:5032
#74 0x0805b4d1 in rb_call (klass=1075851092, recv=1079574288, 
mid=13809, argc=0, argv=0x0, scope=0) at eval.c:5122
#75 0x08056e33 in rb_eval (self=1078831908, n=0x0) at eval.c:2994
#76 0x08056661 in rb_eval (self=1078831908, n=0x0) at eval.c:2812
#77 0x0805675b in rb_eval (self=1078831908, n=0x0) at eval.c:2852
#78 0x080556a9 in rb_eval (self=1078831908, n=0x0) at eval.c:2462
#79 0x08055e40 in rb_eval (self=1078831908, n=0x0) at eval.c:2647
#80 0x0805b01a in rb_call0 (klass=1075118968, recv=1078831908, id=5969, 
oid=0, argc=0, argv=0x0, body=0x40081448, nosuper=0) at eval.c:5032
#81 0x0805b4d1 in rb_call (klass=1075118968, recv=1078831908, mid=5969, 
argc=0, argv=0x0, scope=0) at eval.c:5122
#82 0x08056e33 in rb_eval (self=1078831948, n=0x0) at eval.c:2994
#83 0x080556a9 in rb_eval (self=1078831948, n=0x0) at eval.c:2462
#84 0x0805b01a in rb_call0 (klass=1075119028, recv=1078831948, id=5969, 
oid=0, argc=0, argv=0x0, body=0x400a2818, nosuper=0) at eval.c:5032
#85 0x0805b4d1 in rb_call (klass=1075119028, recv=1078831948, mid=5969, 
argc=0, argv=0x0, scope=0) at eval.c:5122
#86 0x08056e33 in rb_eval (self=1078832128, n=0x0) at eval.c:2994
#87 0x0805952e in rb_yield_0 (val=1, self=1078832128, klass=0, flags=0, 
avalue=0) at eval.c:4153
#88 0x08059966 in rb_yield (val=1) at eval.c:4222
#89 0x0807a994 in int_dotimes (num=3) at numeric.c:1775
#90 0x0806525f in call_cfunc (func=0x807a95c <int_dotimes>, recv=3, 
len=1108517584, argc=0, argv=0x6) at eval.c:4767
#91 0x0805ad31 in rb_call0 (klass=1074375004, recv=3, id=6361, oid=0, 
argc=0, argv=0x0, body=0x4009a894, nosuper=0) at eval.c:4904
#92 0x0805b4d1 in rb_call (klass=1074375004, recv=3, mid=6361, argc=0, 
argv=0x0, scope=0) at eval.c:5122
#93 0x08056e33 in rb_eval (self=1078832128, n=0x0) at eval.c:2994
#94 0x08056279 in rb_eval (self=1078832128, n=0x0) at eval.c:2717
#95 0x0805b01a in rb_call0 (klass=1075120068, recv=1078832128, id=2953, 
oid=0, argc=0, argv=0xbfffc208, body=0x4020b578, nosuper=0)
     at eval.c:5032
#96 0x0805b4d1 in rb_call (klass=1075120068, recv=1078832128, mid=2953, 
argc=2, argv=0xbfffc200, scope=1) at eval.c:5122
#97 0x0805b7a3 in rb_funcall2 (recv=1108517584, mid=2953, argc=2, 
argv=0xbfffc200) at ruby.h:626
#98 0x0805d94e in rb_obj_call_init (obj=1078832128, argc=2, 
argv=0xbfffc200) at eval.c:6258
#99 0x0807c890 in rb_class_new_instance (argc=2, argv=0xbfffc200, 
klass=1075120068) at object.c:767
#100 0x0806525f in call_cfunc (func=0x807c870 <rb_class_new_instance>, 
recv=1075120068, len=1108517584, argc=2, argv=0x6) at eval.c:4767
#101 0x0805ad31 in rb_call0 (klass=1074400504, recv=1075120068, 
id=3353, oid=0, argc=2, argv=0xbfffc200, body=0x4009fb64, nosuper=0)
     at eval.c:4904
#102 0x0805b4d1 in rb_call (klass=1074400504, recv=1075120068, 
mid=3353, argc=2, argv=0xbfffc200, scope=0) at eval.c:5122
#103 0x08056e33 in rb_eval (self=1075120068, n=0x0) at eval.c:2994
---Type <return> to continue, or q <return> to quit---
#104 0x0805faa7 in block_pass (self=1075120068, node=0x400a8290) at 
eval.c:7243
#105 0x0805788f in rb_eval (self=1075120068, n=0x0) at eval.c:2703
#106 0x0805744f in rb_eval (self=1075120068, n=0x0) at eval.c:2940
#107 0x0805b01a in rb_call0 (klass=1075119788, recv=1075120068, 
id=5969, oid=0, argc=0, argv=0xbfffd4f8, body=0x400a8330, nosuper=0)
     at eval.c:5032
#108 0x0805b4d1 in rb_call (klass=1075119788, recv=1075120068, 
mid=5969, argc=2, argv=0xbfffd4f0, scope=0) at eval.c:5122
#109 0x08056e33 in rb_eval (self=1078832268, n=0x0) at eval.c:2994
#110 0x0805faa7 in block_pass (self=1078832268, node=0x400a8754) at 
eval.c:7243
#111 0x0805788f in rb_eval (self=1078832268, n=0x0) at eval.c:2703
#112 0x0805b01a in rb_call0 (klass=1075120868, recv=1078832268, 
id=6049, oid=0, argc=0, argv=0xbfffe2d4, body=0x400a89e8, nosuper=0)
     at eval.c:5032
#113 0x0805b4d1 in rb_call (klass=1075120868, recv=1078832268, 
mid=6049, argc=1, argv=0xbfffe2d0, scope=0) at eval.c:5122
#114 0x08056e33 in rb_eval (self=1074395744, n=0x0) at eval.c:2994
#115 0x08056279 in rb_eval (self=1074395744, n=0x0) at eval.c:2717
#116 0x08053634 in ruby_exec () at eval.c:1386
#117 0x08053668 in ruby_run () at eval.c:1407
#118 0x08051ae5 in main (argc=3, argv=0xbfffef44, envp=0xbfffef54) at 
main.c:50
#119 0x420158d4 in __libc_start_main () from /lib/i686/libc.so.6