Project

General

Profile

Actions

Bug #19385

closed

YJIT panicked while holding VM lock acquired at ./yjit/src/core.rs:1693. Aborting.

Added by jwcooper (Justin Cooper) about 1 year ago. Updated about 1 year ago.

Status:
Closed
Target version:
-
ruby -v:
ruby 3.2.0 (2022-12-25 revision a528908271) +YJIT [aarch64-linux]
[ruby-core:112061]

Description

Attached is a rust backtrace of an application crashing with a panic with yjit enabled.

This is only happening on our sidekiq processes on one of our applications in production. I'm uncertain where in our code it's crashing so far, as it's only crashing once every 20 minutes across 8 sidekiq processes running ~300 jobs/second. Our other applications running with 3.2.0 +yjit are running great on puma and sidekiq.

It may be related to, but I'm uncertain:
https://bugs.ruby-lang.org/issues/19299


Files

backtrace.txt (8.71 KB) backtrace.txt jwcooper (Justin Cooper), 01/26/2023 09:30 PM
Actions #1

Updated by byroot (Jean Boussier) about 1 year ago

  • Backport changed from 2.7: UNKNOWN, 3.0: UNKNOWN, 3.1: UNKNOWN, 3.2: UNKNOWN to 2.7: DONTNEED, 3.0: DONTNEED, 3.1: DONTNEED, 3.2: REQUIRED

Updated by noahgibbs (Noah Gibbs) about 1 year ago

I believe it is not related to bug #19299, though it looks like the same bug as recently-filed https://github.com/Shopify/yjit/issues/308

Updated by byroot (Jean Boussier) about 1 year ago

  • Assignee set to alanwu (Alan Wu)
Actions #4

Updated by alanwu (Alan Wu) about 1 year ago

  • Status changed from Open to Closed

Applied in changeset git|188688a53e7708d25ab80e14d05e70ffcf792e13.


YJIT: ARM64: Fix long jumps to labels

Previously, with Code GC, YJIT panicked while trying to emit a B.cond
instruction with an offset that is not encodable in 19 bits. This only
happens when the code in an assembler instance straddles two pages.

To fix this, when we detect that a jump to a label can land on a
different page, we switch to a fresh new page and regenerate all the
code in the assembler there. We still assume that no one assembler has
so much code that it wouldn't fit inside a fresh new page.

[Bug #19385]

Co-authored-by: Takashi Kokubun
Co-authored-by: Maxime Chevalier-Boisvert

Updated by naruse (Yui NARUSE) about 1 year ago

  • Backport changed from 2.7: DONTNEED, 3.0: DONTNEED, 3.1: DONTNEED, 3.2: REQUIRED to 2.7: DONTNEED, 3.0: DONTNEED, 3.1: DONTNEED, 3.2: DONE

ruby_3_2 535d863f34e6c36a2378683e7c2d3b7369e3d076 merged revision(s) 188688a53e7708d25ab80e14d05e70ffcf792e13.

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0