Skip to content

YJIT crash on arm64 (Ruby 3.4.1) #566

Closed
ruby/ruby
#12668
@asheldon

Description

@asheldon
ruby: YJIT has panicked. More info to follow...
thread '<unnamed>' panicked at ./yjit/src/backend/arm64/mod.rs:1348:17:
assertion `left != right` failed: should not fail when writing to a fresh code page
  left: Err(RetryOnNextPage)
right: Err(RetryOnNextPage)
stack backtrace:
   0: rust_begin_unwind
             at /rustc/9fc6b43126469e3858e2fe86cafb4f0fd5068869/library/std/src/panicking.rs:665:5
   1: core::panicking::panic_fmt
             at /rustc/9fc6b43126469e3858e2fe86cafb4f0fd5068869/library/core/src/panicking.rs:76:14
   2: core::panicking::assert_failed_inner
   3: core::panicking::assert_failed
             at /rustc/9fc6b43126469e3858e2fe86cafb4f0fd5068869/library/core/src/panicking.rs:373:5
   4: yjit::backend::arm64::<impl yjit::backend::ir::Assembler>::compile_with_regs
             at /local/p4clients/pkgbuild-const/workspace/build/Ruby34x/Ruby34x-1.0.234.0/AL2023_aarch64/DEV.STD.PTHREAD/build/private/src/yjit/src/backend/arm64/mod.rs:1348:17
   5: yjit::backend::ir::Assembler::compile
             at /local/p4clients/pkgbuild-const/workspace/build/Ruby34x/Ruby34x-1.0.234.0/AL2023_aarch64/DEV.STD.PTHREAD/build/private/src/yjit/src/backend/ir.rs:1630:19
   6: yjit::codegen::gen_single_block
             at /local/p4clients/pkgbuild-const/workspace/build/Ruby34x/Ruby34x-1.0.234.0/AL2023_aarch64/DEV.STD.PTHREAD/build/private/src/yjit/src/codegen.rs:1448:27
   7: yjit::core::gen_block_series_body
             at /local/p4clients/pkgbuild-const/workspace/build/Ruby34x/Ruby34x-1.0.234.0/AL2023_aarch64/DEV.STD.PTHREAD/build/private/src/yjit/src/core.rs:3088:23
   8: yjit::core::gen_block_series
             at /local/p4clients/pkgbuild-const/workspace/build/Ruby34x/Ruby34x-1.0.234.0/AL2023_aarch64/DEV.STD.PTHREAD/build/private/src/yjit/src/core.rs:3066:18
   9: yjit::core::branch_stub_hit_body
             at /local/p4clients/pkgbuild-const/workspace/build/Ruby34x/Ruby34x-1.0.234.0/AL2023_aarch64/DEV.STD.PTHREAD/build/private/src/yjit/src/core.rs:3604:17
  10: yjit::core::branch_stub_hit::{{closure}}::{{closure}}
             at /local/p4clients/pkgbuild-const/workspace/build/Ruby34x/Ruby34x-1.0.234.0/AL2023_aarch64/DEV.STD.PTHREAD/build/private/src/yjit/src/core.rs:3493:36
  11: yjit::stats::with_compile_time
             at /local/p4clients/pkgbuild-const/workspace/build/Ruby34x/Ruby34x-1.0.234.0/AL2023_aarch64/DEV.STD.PTHREAD/build/private/src/yjit/src/stats.rs:1084:15
  12: yjit::core::branch_stub_hit::{{closure}}
             at /local/p4clients/pkgbuild-const/workspace/build/Ruby34x/Ruby34x-1.0.234.0/AL2023_aarch64/DEV.STD.PTHREAD/build/private/src/yjit/src/core.rs:3493:13
  13: std::panicking::try::do_call
             at /rustc/9fc6b43126469e3858e2fe86cafb4f0fd5068869/library/std/src/panicking.rs:557:40
  14: std::panicking::try
             at /rustc/9fc6b43126469e3858e2fe86cafb4f0fd5068869/library/std/src/panicking.rs:520:19
  15: std::panic::catch_unwind
             at /rustc/9fc6b43126469e3858e2fe86cafb4f0fd5068869/library/std/src/panic.rs:358:14
  16: yjit::cruby::with_vm_lock
             at /local/p4clients/pkgbuild-const/workspace/build/Ruby34x/Ruby34x-1.0.234.0/AL2023_aarch64/DEV.STD.PTHREAD/build/private/src/yjit/src/cruby.rs:688:21
  17: yjit::core::branch_stub_hit
             at /local/p4clients/pkgbuild-const/workspace/build/Ruby34x/Ruby34x-1.0.234.0/AL2023_aarch64/DEV.STD.PTHREAD/build/private/src/yjit/src/core.rs:3492:9
  18: <unknown>
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
[BUG] /local/p4clients/pkgbuild-const/workspace/src/{redacted}/{redacted.rb}:68:  YJIT: panicked at ./yjit/src/backend/arm64/mod.rs:1348:17:
assertion `left != right` failed: should not fail when writing to a fresh code page
  left: Err(RetryOnNextPage)
right: Err(RetryOnNextPage)/40",
Q�
ruby 3.4.1 (2024-12-25 revision 48d4efcb85) +YJIT +PRISM [aarch64-linux]

Ruby 3.4.1 on Amazon Graviton2. No crash observed in an identical x86_64 setup.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions