Repository navigation
test: stabilize GVL-release check on fast Apple Silicon runners - #6
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes the
macos-15Ruby 3.2 CI flake inSafetyTest#test_gvl_released_and_concurrent_thread_safety(run 44871608538).On Apple Silicon XNNPACK, 40 inferences of
heavy_mlpfinished in ~20ms. Because the ticker thread callsThread.passon every increment, 20ms only allowed ~6 OS thread switches even though the GVL was released.Changes
counting = true/false) so pre-start ticks cannot mask a held GVL.0.25s(still capped at2.0smax and>= 5runs) and assertticks > 20.Verification
core->executedirectly withoutrb_thread_call_without_gvl): fails reliably withticks=2, runs=331, elapsed=0.251s(expected> 20), matching Ruby's 100ms GVL quantum.bundle exec rake test):32 runs, 247422 assertions, 0 failures, 0 errors, 0 skips.