mmtk / mmtk-ruby

Ruby binding for MMTk
Other
9 stars 5 forks source link

Object 0x20102ff9ae0 does not have HAS_MOVED_GIVTBL flag or original givtbl #94

Open eileencodes opened 3 months ago

eileencodes commented 3 months ago

As I see crashes in CI I'll open issues for them and then try to find the repro steps.

Error from recent run https://github.com/mmtk/ruby/actions/runs/10200710721/job/28220885175 using Immix

[BUG] Segmentation fault at 0x00004e0a01400000
  ruby 3.4.0dev (2024-08-01T14:57:18Z mmtk dff44cade4) +MMTk(Immix) [x86_64-linux]

  -- Machine register context ------------------------------------------------
   RIP: 0x00007feabbf47707 RBP: 0x00007fea9c00b6e0 RSP: 0x00007feabb5ee768
   RAX: 0x0000000000000075 RBX: 0x0000000000008000 RCX: 0x0000020140000100
   RDX: 0x0000040209e16b00 RDI: 0x0000000201041342 RSI: 0x00004e0a01400000
    R8: 0x0000040209e16ad8  R9: 0x000052b285ff015a R10: 0x00007feabc0dd3b8
   R11: 0xf30f00ae13c19b67 R12: 0x0000020104134260 R13: 0x00007fea640047a0
   R14: 0x0000000000000cf0 R15: 0x0000555b65a11290 EFL: 0x0000000000010206

  -- C level backtrace information -------------------------------------------
  ERROR: An MMTk GC thread panicked.  This is a bug.
  panicked at src/abi.rs:129:17:
  Object 0x20102ff9ae0 does not have HAS_MOVED_GIVTBL flag or original givtbl
     0: mmtk_ruby::set_panic_hook::{{closure}}
     1: std::panicking::rust_panic_with_hook
     2: std::panicking::begin_panic_handler::{{closure}}
     3: std::sys_common::backtrace::__rust_end_short_backtrace
     4: rust_begin_unwind
     5: core::panicking::panic_fmt
     6: mmtk_get_givtbl_during_gc
     7: rb_mark_generic_ivar
               at ./../src/variable.c:1119:17
     8: gc_mark_children
               at ./../src/gc.c:7356:9
     9: rb_mmtk_mark_children
               at ./../src/gc.c:14907:5
    10: rb_mmtk_scan_object_ruby_style
               at ./../src/mmtk_support.c:538:5
    11: <mmtk::scheduler::gc_work::PlanScanObjects<E,P> as mmtk::scheduler::work::GCWork<<E as mmtk::scheduler::gc_work::ProcessEdgesWork>::VM>>::do_work
    12: std::sys_common::backtrace::__rust_begin_short_backtrace
    13: core::ops::function::FnOnce::call_once{{vtable.shim}}
    14: std::sys::pal::unix::thread::Thread::new::thread_start
    15: <unknown>
    16: <unknown>

  running file: /home/runner/work/ruby/ruby/src/test/rubygems/test_gem_stub_specification.rb

  A test worker crashed. It might be an interpreter bug or
  a bug in test/unit/parallel.rb. Try again without the -j
  option.

  Children under /tmp/rubytest.0i4rak:
  * drwx------ 2 4096 2024-08-01 15:03:06 +0000 test_rubygems_20[240](https://github.com/mmtk/ruby/actions/runs/10200710721/job/28220885175#step:10:241)801-17470-wl6gfb/
  make: *** [uncommon.mk:966: yes-test-all] Error 1
wks commented 2 months ago

The following is reproduced when running CI tests with release build and Immix plan. See: https://github.com/mmtk/mmtk-ruby/actions/runs/10787810450/job/29917245733?pr=102

2024-09-10T07:37:00.7028799Z ERROR: An MMTk GC thread panicked.  This is a bug.
2024-09-10T07:37:00.7103028Z panicked at src/abi.rs:129:17:
2024-09-10T07:37:00.7107419Z Object 0x201017062a8 does not have HAS_MOVED_GIVTBL flag or original givtbl
2024-09-10T07:37:00.7949074Z    0: mmtk_ruby::set_panic_hook::{{closure}}
2024-09-10T07:37:00.7951791Z    1: std::panicking::rust_panic_with_hook
2024-09-10T07:37:00.7954941Z    2: std::panicking::begin_panic_handler::{{closure}}
2024-09-10T07:37:00.7957880Z    3: std::sys_common::backtrace::__rust_end_short_backtrace
2024-09-10T07:37:00.7964657Z    4: rust_begin_unwind
2024-09-10T07:37:00.7969219Z    5: core::panicking::panic_fmt
2024-09-10T07:37:00.7973457Z    6: mmtk_get_givtbl_during_gc
2024-09-10T07:37:00.7974108Z    7: rb_mark_generic_ivar
2024-09-10T07:37:00.7974670Z              at ./../variable.c:1119:17
2024-09-10T07:37:00.7975328Z    8: rb_gc_mark_children
2024-09-10T07:37:00.7975890Z              at ./../gc.c:2563:9
2024-09-10T07:37:00.7976464Z    9: rb_mmtk_scan_object_ruby_style
2024-09-10T07:37:00.7977424Z              at ./../mmtk_support.c:550:5
2024-09-10T07:37:00.7978870Z   10: <mmtk::scheduler::gc_work::PlanScanObjects<E,P> as mmtk::scheduler::work::GCWork<<E as mmtk::scheduler::gc_work::ProcessEdgesWork>::VM>>::do_work
2024-09-10T07:37:00.7980437Z   11: std::sys_common::backtrace::__rust_begin_short_backtrace
2024-09-10T07:37:00.7981293Z   12: core::ops::function::FnOnce::call_once{{vtable.shim}}
2024-09-10T07:37:00.7982315Z   13: std::sys::pal::unix::thread::Thread::new::thread_start
2024-09-10T07:37:00.7983004Z   14: <unknown>
2024-09-10T07:37:00.7983418Z   15: <unknown>
2024-09-10T07:37:00.7983723Z 
2024-09-10T07:37:00.9504626Z running file: /home/runner/work/mmtk-ruby/mmtk-ruby/git/ruby/test/ruby/test_compile_prism.rb