Title: [3.6] bpo-30038: fix race condition in signal delivery + wakeup fd (#1082) by vstinner · Pull Request #2075 · python/cpython · GitHub
Open Graph Title: [3.6] bpo-30038: fix race condition in signal delivery + wakeup fd (#1082) by vstinner · Pull Request #2075 · python/cpython
X Title: [3.6] bpo-30038: fix race condition in signal delivery + wakeup fd (#1082) by vstinner · Pull Request #2075 · 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 (cherry picked from commit 4ae0149)
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/2075
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:fb0b445e-3b8d-7a55-c986-7d6c099fc51c |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | CE72:35D29E:9596FD:C97BA6:6A542446 |
| html-safe-nonce | 02c93a349ab2e94096e342bc7f4a485df39a5aaed1be26226e0194d7a6128f8f |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDRTcyOjM1RDI5RTo5NTk2RkQ6Qzk3QkE2OjZBNTQyNDQ2IiwidmlzaXRvcl9pZCI6IjI1MzEyNjc1NjkyNzg3ODg2NzgiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | ee8c1daa6403f4741914ca18b0f9e465fae9c5289df9f189dd06026316d7fbd6 |
| hovercard-subject-tag | pull_request:124983971 |
| 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/2075/files |
| twitter:image | https://avatars.githubusercontent.com/u/194129?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/194129?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