From: Paul Donohue Date: 2010-07-07T02:21:54+09:00 Subject: [ruby-core:31093] [Backport #3532] Segfault/infinite loop/GC bug when a thread aborts on an exception whose to_s method uses a block Issue #3532 has been updated by Paul Donohue. File stacktrace added I'm attaching another stack trace generated using the Ruby-EE package in Ubuntu (which gets stuck running at 100% CPU). It looks like "block = Data_Make_Struct(klass, struct BLOCK, blk_mark, blk_free, data);" in proc_alloc() in eval.c line 8829 is returning a pointer to rb_block->prev ... so when blk_copy_prev() is called to copy rb_block->prev (which is now a copy of rb_block, such that rb_block->prev->prev points to rb_block->prev), it loops making copies of rb_block->prev until it runs out of memory, at which point the garbage collector loops forever checking the rb_block linked list (which is now recursive). I don't quite understand yet why Data_Make_Struct would return a pointer to the already allocated rb_block->prev data structure ... perhaps rb_block->prev has been erroneously garbage collected and is being re-allocated? ---------------------------------------- http://redmine.ruby-lang.org/issues/show/3532 ---------------------------------------- http://redmine.ruby-lang.org