Repository navigation
Guard regression data runner against multiprocessing re-entry - #9195
Draft
youknowdot wants to merge 1 commit into
Draft
youknowdot wants to merge 1 commit into
youknowdot wants to merge 1 commit into
Conversation
Run discovery and result writing only from the script entrypoint. Spawn and forkserver imports as __mp_main__ must not recursively execute the complete test suite or remove the parent result file. Assisted-by: OpenAI Codex: model version unavailable
Contributor
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Contributor
Merging this PR will not alter performance
Comparing Footnotes
|
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
Put regression-data discovery, suite execution and result-file replacement behind
main()and the normal__main__guard. Keep the existing test order, runner settings, output and helper unchanged.multiprocessingspawn/forkserver reconstructs the parent script as__mp_main__. The old top-level script therefore starts the entire regression suite again in a worker. Both main's October 17 periodic job and the Python 3.15 mega job show the parallel compileall case followed by a second complete test run and a nested “Done!” before returning to compileall errors.This removes that confirmed entrypoint defect. It does not establish that the later PTY hang is resolved: the logs contain no blocking stack or SIGUSR1 sender, and the same mega head passes
test_ptyin ordinary regrtest CI. No skips, test assertions or workflow changes.Validation
e7e3dfd6; onlyextra_tests/jsontests.pychanges.__mp_main__perform zero discovery, suite execution or result-file operations. The old__mp_main__negative control reproduces the recursive execution.The periodic workflow's PR trigger is limited to its own workflow path, so ordinary CI on this single-file fix does not validate a complete periodic collection run.
AI assistance
Maintainer-requested Python 3.15/CI maintenance. OpenAI Codex assisted with log/source analysis, this entrypoint change, mocked validation and the description. Model version unavailable; the commit includes the Assisted-by trailer. No additional manual human testing is claimed.