I've finally been able to test my application under load using the 
latest Ruby (1.8.1p4) with --enable-pthread (for those just tuning in, 
see [ruby-core:1932] and the following thread). Thankfully, it doesn't 
hang any longer! Unfortunately, it does still segfault. I haven't yet 
had a chance to reduce the error, but with the nearing release of Ruby 
1.8.1, I wanted to let you know that there is a segfault as quickly as 
possible. Currently all I have is this backtrace:

   #0  0x4064a0ca in ?? ()
   #1  0x400e81e1 in siglongjmp () from /lib/libc.so.6
   #2  0x400e814c in siglongjmp () from /lib/libc.so.6
   #3  0x40022426 in longjmp () from /lib/libpthread.so.0
   #4  0x08057d34 in rb_eval (self=1083432152, n=0x40685880) at 
eval.c:2920
   #5  0x0805e69f in rb_call0 (klass=1080373044, recv=1083432152, 
id=29329, oid=29329, argc=0,
       argv=0xbfff48ec, body=0x40685880, nosuper=0) at eval.c:5194
   #6  0x0805ebe8 in rb_call (klass=1080373044, recv=1083432152, 
mid=29329, argc=3,
       argv=0xbfff48e0, scope=1) at eval.c:5287
   #7  0x08058b74 in rb_eval (self=1083432152, n=0x406856f0) at 
eval.c:3091
   #8  0x0805e69f in rb_call0 (klass=1080373044, recv=1083432152, 
id=29241, oid=29241, argc=0,
       argv=0xbfff4fe4, body=0x406856f0, nosuper=0) at eval.c:5194
   #9  0x0805ebe8 in rb_call (klass=1080373044, recv=1083432152, 
mid=29241, argc=1,
       argv=0xbfff4fe0, scope=1) at eval.c:5287
   #10 0x08058b74 in rb_eval (self=1083432152, n=0x40688f58) at 
eval.c:3091
   #11 0x08059949 in rb_eval (self=1083432152, n=0x40688ea4) at 
eval.c:3279
   #12 0x0805e69f in rb_call0 (klass=1080373044, recv=1083432152, 
id=29153, oid=29153, argc=0,
       argv=0xbfff5c24, body=0x40688ea4, nosuper=0) at eval.c:5194
   #13 0x0805ebe8 in rb_call (klass=1080373044, recv=1083432152, 
mid=29153, argc=1,
       argv=0xbfff5c20, scope=1) at eval.c:5287
   #14 0x08058b74 in rb_eval (self=1083432152, n=0x4068cedc) at 
eval.c:3091
   #15 0x0805e69f in rb_call0 (klass=1080373044, recv=1083432152, 
id=11265, oid=11265, argc=0,
       argv=0xbfff6324, body=0x4068cedc, nosuper=0) at eval.c:5194
   #16 0x0805ebe8 in rb_call (klass=1080373044, recv=1083432152, 
mid=11265, argc=1,
       argv=0xbfff6320, scope=0) at eval.c:5287
   #17 0x080588ba in rb_eval (self=1083747752, n=0x40648958) at 
eval.c:3076
   #18 0x08057bc9 in rb_eval (self=1083747752, n=0x40647d50) at 
eval.c:2883
   #19 0x08057deb in rb_eval (self=1083747752, n=0x40648a98) at 
eval.c:2932
   #20 0x08057245 in rb_eval (self=1083747752, n=0x40647aa8) at 
eval.c:2720
   #21 0x0805e69f in rb_call0 (klass=1080129844, recv=1083747752, 
id=5081, oid=5081, argc=0,
       argv=0xbfff79c4, body=0x40647aa8, nosuper=0) at eval.c:5194
   #22 0x0805ebe8 in rb_call (klass=1080129844, recv=1083747752, 
mid=5081, argc=1,
       argv=0xbfff79c0, scope=1) at eval.c:5287
   #23 0x08058b74 in rb_eval (self=1083747752, n=0x4032b250) at 
eval.c:3091
   #24 0x08057bc9 in rb_eval (self=1083747752, n=0x40325648) at 
eval.c:2883
   #25 0x08057deb in rb_eval (self=1083747752, n=0x40325170) at 
eval.c:2932
   #26 0x0805c310 in rb_yield_0 (val=1083432572, self=1083747752, 
klass=0, flags=2, avalue=2)
       at eval.c:4293
   #27 0x080693e0 in rb_thread_yield (arg=1083432572, th=0x8367b28) at 
eval.c:9759
   #28 0x0806907f in rb_thread_start_0 (fn=0x8069314 <rb_thread_yield>, 
arg=0x4093de7c,
       th=0x8367b28) at eval.c:9673
   #29 0x08069533 in rb_thread_start (klass=1075962144, args=1083432572) 
at eval.c:9798
   #30 0x0806b314 in call_cfunc (func=0x80694e4 <rb_thread_start>, 
recv=1075962144, len=-2,
       argc=0, argv=0x0) at eval.c:4929
   #31 0x0805e0a3 in rb_call0 (klass=1075962124, recv=1075962144, 
id=5001, oid=5001, argc=0,
       argv=0x0, body=0x4021e094, nosuper=0) at eval.c:5066
   #32 0x0805ebe8 in rb_call (klass=1075962124, recv=1075962144, 
mid=5001, argc=0, argv=0x0,
       scope=0) at eval.c:5287
   #33 0x080588ba in rb_eval (self=1083747752, n=0x4032b3f4) at 
eval.c:3076
   #34 0x08057688 in rb_eval (self=1083747752, n=0x4032b430) at 
eval.c:2796
   #35 0x0805e69f in rb_call0 (klass=1080822024, recv=1083747752, 
id=23873, oid=23873, argc=0,
       argv=0xbfff9af4, body=0x4032b430, nosuper=1) at eval.c:5194
   #36 0x0805ebe8 in rb_call (klass=1080822024, recv=1083747752, 
mid=23873, argc=1,
       argv=0xbfff9af0, scope=1) at eval.c:5287
   #37 0x08058b74 in rb_eval (self=1083747752, n=0x4032146c) at 
eval.c:3091
   #38 0x08063d79 in block_pass (self=1083747752, node=0x40321480) at 
eval.c:7362
   #39 0x080574f4 in rb_eval (self=1083747752, n=0x40321480) at 
eval.c:2782
   #40 0x080598d9 in rb_eval (self=1083747752, n=0x40321110) at 
eval.c:3269
   #41 0x0805c310 in rb_yield_0 (val=1083746952, self=1083747752, 
klass=0, flags=0, avalue=0)
       at eval.c:4293
   #42 0x0805c5c6 in rb_yield (val=1083746952) at eval.c:4346
   #43 0x080d432f in rb_ary_each (ary=1083434132) at array.c:1106
   #44 0x0806b34d in call_cfunc (func=0x80d42f8 <rb_ary_each>, 
recv=1083434132, len=0, argc=0,
       argv=0x0) at eval.c:4935
   #45 0x0805e0a3 in rb_call0 (klass=1075947264, recv=1083434132, 
id=3825, oid=3825, argc=0,
       argv=0x0, body=0x4021a2dc, nosuper=0) at eval.c:5066
   #46 0x0805ebe8 in rb_call (klass=1075947264, recv=1083434132, 
mid=3825, argc=0, argv=0x0,
       scope=0) at eval.c:5287
   #47 0x080588ba in rb_eval (self=1083747752, n=0x4032222c) at 
eval.c:3076
   #48 0x08057688 in rb_eval (self=1083747752, n=0x403210ac) at 
eval.c:2796
   #49 0x08057bc9 in rb_eval (self=1083747752, n=0x40320350) at 
eval.c:2883
   #50 0x08057245 in rb_eval (self=1083747752, n=0x4031fa54) at 
eval.c:2720
   #51 0x0805c310 in rb_yield_0 (val=6, self=1083747752, klass=0, 
flags=0, avalue=0)
       at eval.c:4293
   #52 0x08057b20 in rb_eval (self=1080822224, n=0x406c71cc) at 
eval.c:2872
   #53 0x0805e69f in rb_call0 (klass=1080822184, recv=1080822224, 
id=5001, oid=5001, argc=0,
       argv=0x0, body=0x406c71cc, nosuper=0) at eval.c:5194
   #54 0x0805ebe8 in rb_call (klass=1080822184, recv=1080822224, 
mid=5001, argc=0, argv=0x0,
       scope=0) at eval.c:5287
   #55 0x080588ba in rb_eval (self=1083747752, n=0x40323f64) at 
eval.c:3076
   #56 0x08057688 in rb_eval (self=1083747752, n=0x40324cd4) at 
eval.c:2796
   #57 0x0805e69f in rb_call0 (klass=1080822024, recv=1083747752, 
id=5001, oid=5001, argc=0,
       argv=0x0, body=0x40324cd4, nosuper=0) at eval.c:5194
   #58 0x0805ebe8 in rb_call (klass=1080822024, recv=1083747752, 
mid=5001, argc=0, argv=0x0,
       scope=0) at eval.c:5287
   #59 0x080588ba in rb_eval (self=1083748912, n=0x4031d754) at 
eval.c:3076
   #60 0x0805e69f in rb_call0 (klass=1075997648, recv=1083748912, 
id=5001, oid=5001, argc=0,
       argv=0x0, body=0x4031d754, nosuper=0) at eval.c:5194
   #61 0x0805ebe8 in rb_call (klass=1075997648, recv=1083748912, 
mid=5001, argc=0, argv=0x0,
       scope=0) at eval.c:5287
   #62 0x080588ba in rb_eval (self=1076581292, n=0x40210818) at 
eval.c:3076
   #63 0x0805e69f in rb_call0 (klass=1075884284, recv=1076581292, 
id=10313, oid=10313, argc=0,
       argv=0x0, body=0x40210818, nosuper=0) at eval.c:5194
   #64 0x0805ebe8 in rb_call (klass=1075884284, recv=1076581292, 
mid=10313, argc=0, argv=0x0,
       scope=2) at eval.c:5287
   #65 0x08058bac in rb_eval (self=1076581292, n=0x4020ddfc) at 
eval.c:3097
   #66 0x0805e69f in rb_call0 (klass=1076582292, recv=1076581292, 
id=5001, oid=5001, argc=0,
       argv=0xbffff064, body=0x4020ddfc, nosuper=0) at eval.c:5194
   #67 0x0805ebe8 in rb_call (klass=1076582292, recv=1076581292, 
mid=5001, argc=0,
       argv=0xbffff064, scope=1) at eval.c:5287
   #68 0x0805ed13 in rb_f_send (argc=0, argv=0xbffff064, 
recv=1076581292) at eval.c:5317
   #69 0x0806b333 in call_cfunc (func=0x805ec84 <rb_f_send>, 
recv=1076581292, len=-1, argc=1,
       argv=0xbffff060) at eval.c:4932
   #70 0x0805e0a3 in rb_call0 (klass=1075977384, recv=1076581292, 
id=4025, oid=4025, argc=1,
       argv=0xbffff060, body=0x4021fde0, nosuper=0) at eval.c:5066
   #71 0x0805ebe8 in rb_call (klass=1075977384, recv=1076581292, 
mid=4025, argc=1,
       argv=0xbffff060, scope=1) at eval.c:5287
   #72 0x08058b74 in rb_eval (self=1076581292, n=0x4020e748) at 
eval.c:3091
   #73 0x0805e69f in rb_call0 (klass=1076582292, recv=1076581292, 
id=5081, oid=5081, argc=0,
       argv=0x0, body=0x4020e748, nosuper=0) at eval.c:5194
   #74 0x0805ebe8 in rb_call (klass=1076582292, recv=1076581292, 
mid=5081, argc=0, argv=0x0,
       scope=0) at eval.c:5287
   #75 0x080588ba in rb_eval (self=1075972664, n=0x402111dc) at 
eval.c:3076
   #76 0x08053d50 in eval_node (self=1075972664, node=0x402111dc) at 
eval.c:1267
   #77 0x0805434a in ruby_exec () at eval.c:1436
   #78 0x080543cd in ruby_run () at eval.c:1457
   #79 0x08052203 in main (argc=3, argv=0xbffffe14, envp=0xbffffe24) at 
main.c:50

I hope this helps, and the problem can be fixed before 1.8.1 final. If 
I'm able to find anything else out, I'll let you know ASAP!

Thanks,


Nathaniel

<:((><