Title: [3.13] gh-127421: Fix race in test_start_new_thread_failed (GH-127549) by miss-islington · Pull Request #127574 · python/cpython · GitHub
Open Graph Title: [3.13] gh-127421: Fix race in test_start_new_thread_failed (GH-127549) by miss-islington · Pull Request #127574 · python/cpython
X Title: [3.13] gh-127421: Fix race in test_start_new_thread_failed (GH-127549) by miss-islington · Pull Request #127574 · python/cpython
Description: Fix race in test_start_new_thread_failed When we succeed in starting a new thread, for example if setrlimit was ineffective, we must wait for the newly spawned thread to exit. Otherwise, we run the risk that the newly spawned thread will race with runtime finalization and access memory that has already been clobbered/freed. _thread.start_new_thread() only spawns daemon threads, which the runtime does not wait for at shutdown, and does not return a handle. Use _thread.start_joinable_thread() and join the resulting handle when the thread is started successfully. (cherry picked from commit 13b68e1) Co-authored-by: mpage mpage@meta.com Issue: gh-127421
Open Graph Description: Fix race in test_start_new_thread_failed When we succeed in starting a new thread, for example if setrlimit was ineffective, we must wait for the newly spawned thread to exit. Otherwise, we run the...
X Description: Fix race in test_start_new_thread_failed When we succeed in starting a new thread, for example if setrlimit was ineffective, we must wait for the newly spawned thread to exit. Otherwise, we run the...
Opengraph URL: https://github.com/python/cpython/pull/127574
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:7156083e-1195-6396-22c3-93af4a761e85 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | AE70:3F5DD2:293E48:36DC0C:6A57F9D6 |
| html-safe-nonce | 158fdd46e2c4ebe8d79a382df1071fff4909592758dc40137afa76f0f1a20d5f |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBRTcwOjNGNUREMjoyOTNFNDg6MzZEQzBDOjZBNTdGOUQ2IiwidmlzaXRvcl9pZCI6IjQ0MTAxNjk0NDQ2MjgxNjcxMjYiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 90e30ba9cbd18ce0fa0ccb1a04a1c020e26893e0329a4fea2e74d585b430b2dc |
| hovercard-subject-tag | pull_request:2213372979 |
| 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/python/cpython/pull/127574/files |
| twitter:image | https://avatars.githubusercontent.com/u/31488909?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/31488909?s=400&v=4 |
| og:image:alt | Fix race in test_start_new_thread_failed When we succeed in starting a new thread, for example if setrlimit was ineffective, we must wait for the newly spawned thread to exit. Otherwise, we run the... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 49c8c15fabcbf356d607a90ca115c13b273e42ff8b74155de050fd229a9b0121 |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/python/cpython git https://github.com/python/cpython.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 81598961 |
| octolytics-dimension-repository_nwo | python/cpython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 81598961 |
| octolytics-dimension-repository_network_root_nwo | python/cpython |
| 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 | 3fb1f684e7a833eb1b2d01d39875a2b52cb4fe9b |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width