Conversation
…thonGH-152826) Preserve active attach waiters across successive stop-the-world pauses so a tight collection loop cannot keep them from making progress. Keep the waiter-aware resume operation local to pystate.c because this branch does not have the newer BRC suspend and resume helpers. (cherry picked from commit f156510)
tpn
requested review from
FFY00,
ZeroIntensity and
ericsnowcurrently
as code owners
September 25, 2026 18:35
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.
Backport of gh-152826, merged as f156510, for gh-151518.
A tight loop of stop-the-world pauses can repeatedly suspend a thread trying to reattach after sleeping, preventing it from returning and stopping the loop. This was found during intentional
numba-cudaGC stress on many-core machines. The fix preserves active attach waiters across successive pauses so they have a chance to run.This branch predates gh-157839, so the waiter-aware resume operation is a private helper in
pystate.c. The attachment changes, regression test, and guard that avoids blocking waits on WASI are carried over from the merged fix.Validation:
test_stop_the_world. Local WASI checks used SDK 34 and Wasmtime 48; the WASI CI job also passed with the branch's configured toolchain.CI note: the required Tests workflow passed. The Intel macOS JIT debug job exceeded its one-hour limit; its log is unavailable, so the cause is not yet known. The other 18 JIT jobs passed.
@hugovk Given the 3.15 RC freeze, should this go into 3.15.0 or wait for the first maintenance release?