Title: Fix busy interpreter test readiness race by youknowdot · Pull Request #9328 · RustPython/RustPython · GitHub
Open Graph Title: Fix busy interpreter test readiness race by youknowdot · Pull Request #9328 · RustPython/RustPython
X Title: Fix busy interpreter test readiness race by youknowdot · Pull Request #9328 · RustPython/RustPython
Description: Summary Fix a readiness race in busy_main_interpreter_does_not_block_subinterpreter: Publish readiness once, after the main interpreter successfully completes and counts its first arithmetic operation. Bound the subinterpreter's readiness wait to 30 seconds, outside its attached VM, so failure or timeout before main readiness cannot leave it spinning forever. Preserve every original arithmetic/progress assertion, the main worker's 30-second deadline, its safepoint, and both yields. No skips, sleeps, or interpreter-runtime changes. Cause and relation to #9317 The main worker previously published readiness before its first loop-condition check. The sub worker could observe readiness, finish its multiplication, and publish completion before main entered the loop. Main then returned zero operations and failed the progress assertion despite successful subinterpreter progress. This is a separate, inherited test bug rather than a PyTime fixture regression: The failing #9317 job reports main_operations > 0 as the only VM failure. The whole test suite completed in 2.38 seconds, excluding the main worker's 30-second timeout path for this failure. #9317 base 94f92e4ab84f3c164299cbaea7ac110881a10f5d and head 29404850a370aad85467a782b65d7b44349a5f62 have identical interpreter.rs blob e6c4c2852feb1263f081f0582185cf0460fa70ab. #9317 changes only _testinternalcapi.rs and its private pytime.rs helper. The same readiness-before-progress ordering was introduced by ancestor 11de045 (#8517), before #9317's base. The test uses interpreters without the standard library and integer addition/multiplication, not the changed PyTime fixtures. The repository's test-logic restriction was explicitly excepted by the requester for this actual bug only; the general rule remains unchanged. Validation Independent source review passed. Normal repository commit hooks passed. cargo test --offline --locked -p rustpython-vm --features threading --lib --no-run passed with default VM features plus threading. Exact test listing identified one test. That test ran once with --exact --test-threads=1: 1 passed, 0 failed, 0 ignored, 174 filtered out, in 0.18 seconds. The focused run used an external 60-second process-group deadline and resource limits. Source and binary hashes were unchanged before/after; cleanup found no remaining descendants. The first cold no-run build reached its 30-minute build limit without a compiler diagnostic; the authorized warm-cache continuation completed successfully. This is not a runtime-test timeout. Validation is Linux x86-64 only. Full workspace tests, C-API tests, Clippy, parallel-suite execution, and other platforms were not run locally for this narrow change. No stress-loop or baseline-pass claim is made; broader CI results remain pending. AI assistance: OpenAI Codex; exact model identifier unavailable. Used for diagnosis, implementation, independent source review, and scoped validation.
Open Graph Description: Summary Fix a readiness race in busy_main_interpreter_does_not_block_subinterpreter: Publish readiness once, after the main interpreter successfully completes and counts its first arithmetic opera...
X Description: Summary Fix a readiness race in busy_main_interpreter_does_not_block_subinterpreter: Publish readiness once, after the main interpreter successfully completes and counts its first arithmetic opera...
Opengraph URL: https://github.com/RustPython/RustPython/pull/9328
X: @github
Domain: github.com
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:d27fdec9-5b90-61ac-467e-b2e03a5d865e |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | ECFA:A71F9:3072AE9:3D565AE:6B01FE29 |
| html-safe-nonce | f75b30de109058d05b4a9b6c9bceda6898003332b8068dbdd7a02aca8e938b84 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFQ0ZBOkE3MUY5OjMwNzJBRTk6M0Q1NjVBRTo2QjAxRkUyOSIsInZpc2l0b3JfaWQiOiIxNzg1MDgwOTQ1MDgzMjg1MDMzIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | d5032916b006c348f8084c8bc97d607ed74f8d7767a6437450530e11c5c07a22 |
| hovercard-subject-tag | pull_request:4981855538 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/RustPython/RustPython/pull/9328/files |
| twitter:image | https://avatars.githubusercontent.com/u/336763669?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/336763669?s=400&v=4 |
| og:image:alt | Summary Fix a readiness race in busy_main_interpreter_does_not_block_subinterpreter: Publish readiness once, after the main interpreter successfully completes and counts its first arithmetic opera... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 87e774ee7c6b3bee0490394e4d3e57ec9dbc956f74b87ea685dc8996c1676456 |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/RustPython/RustPython git https://github.com/RustPython/RustPython.git |
| octolytics-dimension-user_id | 39710557 |
| octolytics-dimension-user_login | RustPython |
| octolytics-dimension-repository_id | 135201145 |
| octolytics-dimension-repository_nwo | RustPython/RustPython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 135201145 |
| octolytics-dimension-repository_network_root_nwo | RustPython/RustPython |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 423dbb54c5e7bfecc838eb387c1435eb3d0e760d |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width