From: Hiroshi Ichikawa Date: 2009-07-30T17:17:37+09:00 Subject: [ruby-dev:38961] [Bug #1837] Test failure (test_block.rb) in Ruby 1.9.2 preview1 on FreeBSD 6.0 Bug #1837: Test failure (test_block.rb) in Ruby 1.9.2 preview1 on FreeBSD 6.0 http://redmine.ruby-lang.org/issues/show/1837 起票者: Hiroshi Ichikawa ステータス: Open, 優先度: Low カテゴリ: core, Target version: 1.9.2 ruby -v: ruby 1.9.2dev (2009-07-18 trunk 24186) [i386-freebsd6.0] > まず、この手の明白なバグはRedmineに入れていただいた方が忘れられづらいです。 了解しました。ということで改めて。 > さて、この問題ですが現在の最新はr24311とかですが、これでも再現しますか? > とりあえず、1.9.2dev (2009-07-29 trunk 24311) [x86_64-freebsd7.2]では再現しません。 r24321で再現しました。FreeBSD6特有なのか、32bit特有なのか、でしょうか…。 (以下一度メールで送ったもののコピペ) FreeBSD 6.0上でRuby 1.9.2 preview1のmake testを実行すると、test_block.rbで失敗します。 $ ./ruby --version ruby 1.9.2dev (2009-07-18 trunk 24186) [i386-freebsd6.0] $ make install && make test ...snip... #60 test_block.rb:464:in `': e = [1,2,3].each 10000.times { e = [e].each } Thread.new { GC.start }.join #=> killed by SIGILL (signal 4) [ruby-dev:32604] FAIL 1/938 tests failed *** Error code 1 trunkのリビジョンを2分探索したところ、リビジョン 24085からこのエラーが出始めている(24084では起きない)ようです。GCまわりの変更のようですが、中身がよく分からず、これ以上の深追いはできていません…。とりあえず、ご報告まで。 ------------------------------------------------------------------------ r24085 | ko1 | 2009-07-13 18:30:23 +0900 (月, 13 7 2009) | 10 lines * vm_core.h, compile.c: declare struct iseq_inline_cache_entry. Inline cache (IC) entries are no longer GC managed object. IC entries are freed when ISeq is freed. * iseq.c: fix mark, free, memsize functions for above change. * insns.def: remove rb_gc_write_barrier(). * vm_insnhelper.c (vm_method_search): ditto. * tool/instruction.rb, template/insns_info.inc.tmpl (insn_iclen): added. ------------------------------------------------------------------------ GDBでスタックトレースを出力すると、以下のようなものが延々と続いています。 #0 0x0806010b in gc_mark_children (objspace=Cannot access memory at address 0xbf9fffec ) at gc.c:1589 #1 0x080615e8 in gc_mark_children (objspace=0x81ce520, ptr=136882532, lev=1) at gc.c:1578 #2 0x0817d9b5 in enumerator_mark (p=0x8362ee0) at enumerator.c:58 #3 0x080606e8 in gc_mark_children (objspace=0x81ce520, ptr=136882500, lev=2) at gc.c:1786 #4 0x080615e8 in gc_mark_children (objspace=0x81ce520, ptr=136882492, lev=1) at gc.c:1578 #5 0x0817d9b5 in enumerator_mark (p=0x8362f00) at enumerator.c:58 #6 0x080606e8 in gc_mark_children (objspace=0x81ce520, ptr=136882460, lev=2) at gc.c:1786 #7 0x080615e8 in gc_mark_children (objspace=0x81ce520, ptr=136882452, lev=1) at gc.c:1578 #8 0x0817d9b5 in enumerator_mark (p=0x8362f20) at enumerator.c:58 #9 0x080606e8 in gc_mark_children (objspace=0x81ce520, ptr=136882420, lev=2) at gc.c:1786 #10 0x080615e8 in gc_mark_children (objspace=0x81ce520, ptr=136882412, lev=1) at gc.c:1578 #11 0x0817d9b5 in enumerator_mark (p=0x8362f40) at enumerator.c:58 #12 0x080606e8 in gc_mark_children (objspace=0x81ce520, ptr=136882380, lev=2) at gc.c:1786 #13 0x080615e8 in gc_mark_children (objspace=0x81ce520, ptr=136882372, lev=1) at gc.c:1578 ---------------------------------------- http://redmine.ruby-lang.org