Title: bpo-30038: fix race condition in signal delivery + wakeup fd by njsmith · Pull Request #1082 · python/cpython · GitHub
Open Graph Title: bpo-30038: fix race condition in signal delivery + wakeup fd by njsmith · Pull Request #1082 · python/cpython
X Title: bpo-30038: fix race condition in signal delivery + wakeup fd by njsmith · Pull Request #1082 · python/cpython
Description: Before, it was possible to get the following sequence of events (especially on Windows, where the C-level signal handler for SIGINT is run in a separate thread): SIGINT arrives trip_signal is called trip_signal writes to the wakeup fd the main thread wakes up from select()-or-equivalent the main thread checks for pending signals, but doesn't see any the main thread drains the wakeup fd the main thread goes back to sleep trip_signal sets is_tripped=1 and calls Py_AddPendingCall to notify the main thread the it should run the Python-level signal handler the main thread doesn't notice because it's asleep This has been causing repeated failures in the Trio test suite: python-trio/trio#119
Open Graph Description: Before, it was possible to get the following sequence of events (especially on Windows, where the C-level signal handler for SIGINT is run in a separate thread): SIGINT arrives trip_signal is call...
X Description: Before, it was possible to get the following sequence of events (especially on Windows, where the C-level signal handler for SIGINT is run in a separate thread): SIGINT arrives trip_signal is call...
Opengraph URL: https://github.com/python/cpython/pull/1082
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:47ac4e57-1c79-4c27-2a86-142c2892a8d5 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | AC38:19B879:93912C:C79BF1:6A542442 |
| html-safe-nonce | aebad9bd532e723b2a0e59d124511f99f2e541fb1edb8c5f4fc40ae5aa960c19 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBQzM4OjE5Qjg3OTo5MzkxMkM6Qzc5QkYxOjZBNTQyNDQyIiwidmlzaXRvcl9pZCI6Ijg1NDA5NzU1ODI5NzE5NjI0MzQiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 458fe61715dcb6a68c66bedfac7a350233e459101e5ceb27eb07fec18d3f72bc |
| hovercard-subject-tag | pull_request:115282699 |
| 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/1082/files |
| twitter:image | https://avatars.githubusercontent.com/u/609896?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/609896?s=400&v=4 |
| og:image:alt | Before, it was possible to get the following sequence of events (especially on Windows, where the C-level signal handler for SIGINT is run in a separate thread): SIGINT arrives trip_signal is call... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | b9a586c06a05a7a86fc7e3f4dbd03e42f6869085879aa184aa6369456dbd50fb |
| 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 | 07a982c1d40157c619b364352b704c3ce66bb332 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width