Repository navigation
2.x.x: release stall-probe frame references after sampling - #248
Merged
Merged
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
This was referenced Sep 8, 2026
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.
StallProbe.capture_stacks()kept the dictionary returned bysys._current_frames(), including its own frame. That cycle retained sampled workers and their local data after they finished, until cyclic GC. The defect was reproduced on the deployed Python 3.14.7 runtime during investigation of the continuing Union mainnet lease-monitor alerts.Release the snapshot and traversal references in
finally, including formatting failures and sampling caps. Retained diagnostic state contains formatted text. The existing output, rate limits, metrics, fencing, and monitor exit policy are preserved.Adds real-thread weak-reference regressions with cyclic GC disabled. All six retention cases failed against the original method and pass with the fix: normal return, a retained formatting-error traceback, thread caps of 0/1, and frame caps of 0/1. An empty-snapshot control also passes. The capacity guide documents ownership and the remaining production measurements.
Validation:
os.spliceassumptions and ten skips. All five failures were reproduced unchanged on the2.x.xbaseline.Independent Fable 5.1 Extra High review through Superset approved the fix with no blockers. The reviewer reproduced the baseline failures, tested cleanup mutations, and passed 228 focused tests on Python 3.14.7 in Docker. Both optional suggestions were addressed: isolate the formatting-failure mock to this module and explain the loop variable's possible self-reference. The reviewer then approved final commit
51a9472, confirmed both findings resolved, and verified the revised test with concurrent logging and mutation checks. The 177-test Docker selection, compilation, and lint passed again after those edits.Addresses #247; related incident #236 remains open. The ownership defect is confirmed, but its exact contribution to production RSS, GC pauses, and restarts is unmeasured. Deployment and the 350k–400k native-ledger/window/job soak remain follow-up validation; this PR does not claim that all remaining stalls are resolved.