Skip to content

Make ZJIT tracing safe across Ractors - #1096

Closed
efegokdemir wants to merge 1 commit into
Shopify:masterfrom
efegokdemir:efe/zjit-tracer-ractor-safety
Closed

efegokdemir wants to merge 1 commit into
Shopify:masterfrom
efegokdemir:efe/zjit-tracer-ractor-safety

Conversation

@efegokdemir

Copy link
Copy Markdown

Guard the process-wide Perfetto tracer with a mutex so Ractors cannot race while updating sampling state, the string table, or the output writer. Stack capture and compilation stay outside the lock; it is held only for tracer state and trace writes. Add a two-Ractor regression test that confirms fallback events reach the trace file. Fixes #1054.

make -j2 test/ruby/test_zjit_cli.rb passes (28 tests, 7,624 assertions).

@github-actions github-actions Bot added the jit label Nov 3, 2026
@tekknolagi

Copy link
Copy Markdown

Please file PRs to ruby/ruby.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ZJIT: --zjit-trace-fallbacks (rb_zjit_record_exit_stack) not ractor safe

2 participants