Title: JIT executor invalidation is called in unsafe ways which may deadlock · Issue #141658 · python/cpython · GitHub
Open Graph Title: JIT executor invalidation is called in unsafe ways which may deadlock · Issue #141658 · python/cpython
X Title: JIT executor invalidation is called in unsafe ways which may deadlock · Issue #141658 · python/cpython
Description: Bug report Bug description: We invalidate executors in the following code: static int force_instrument_lock_held(PyCodeObject *code, PyInterpreterState *interp) AND _PyMonitoring_SetEvents(int tool_id, _PyMonitoringEventSet events) In th...
Open Graph Description: Bug report Bug description: We invalidate executors in the following code: static int force_instrument_lock_held(PyCodeObject *code, PyInterpreterState *interp) AND _PyMonitoring_SetEvents(int tool...
X Description: Bug report Bug description: We invalidate executors in the following code: static int force_instrument_lock_held(PyCodeObject *code, PyInterpreterState *interp) AND _PyMonitoring_SetEvents(int tool...
Opengraph URL: https://github.com/python/cpython/issues/141658
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"JIT executor invalidation is called in unsafe ways which may deadlock","articleBody":"# Bug report\n\n### Bug description:\n\nWe invalidate executors in the following code:\n```\nstatic int\nforce_instrument_lock_held(PyCodeObject *code, PyInterpreterState *interp)\n\nAND\n\n_PyMonitoring_SetEvents(int tool_id, _PyMonitoringEventSet events)\n```\n\nIn the above functions, the world is stopped/the runtime lock is acquired. However, the JIT can invalidate executors. If the pending executors list becomes full, executors will be finalized. This in turn means arbitrary code can run which may try to acquire the runtime lock and cause a deadlock.\n\nI discovered this while working on FT JIT.\n\n\n### CPython versions tested on:\n\n3.15, 3.14, CPython main branch\n\n### Operating systems tested on:\n\n_No response_\n\n\u003c!-- gh-linked-prs -->\n### Linked PRs\n* gh-142329\n\u003c!-- /gh-linked-prs -->\n","author":{"url":"https://github.com/Fidget-Spinner","@type":"Person","name":"Fidget-Spinner"},"datePublished":"2025-11-17T12:32:36Z","url":"https://github.com/python/cpython/issues/141658"}
| 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 | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:0a4ca1e4-7b00-4df9-4e1e-c3380f3afe03 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D828:16AB79:47E8E52:5B34264:6B024732 |
| html-safe-nonce | eb4cd80e7d1e0ca54379417b8e09f7e2bba42a6f40bf8279a8ce0af6effff483 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEODI4OjE2QUI3OTo0N0U4RTUyOjVCMzQyNjQ6NkIwMjQ3MzIiLCJ2aXNpdG9yX2lkIjoiNDg0NDgwNzA4MjU4ODkxNTUwNiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 62fbf7727ee942ac7fc8d06c568725dc265f7d08153969bd801b07559775e819 |
| hovercard-subject-tag | issue:3633147775 |
| github-keyboard-shortcuts | repository,issues,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/_view_fragments/issues/show/python/cpython/141658/issue_layout |
| twitter:image | https://opengraph.githubassets.com/6eb110a44595dfe78312fa419a89a1a527f77a67b0e3f5f6b90e01da373e03a9/python/cpython/issues/141658 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/6eb110a44595dfe78312fa419a89a1a527f77a67b0e3f5f6b90e01da373e03a9/python/cpython/issues/141658 |
| og:image:alt | Bug report Bug description: We invalidate executors in the following code: static int force_instrument_lock_held(PyCodeObject *code, PyInterpreterState *interp) AND _PyMonitoring_SetEvents(int tool... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | Fidget-Spinner |
| hostname | github.com |
| expected-hostname | github.com |
| None | 87e774ee7c6b3bee0490394e4d3e57ec9dbc956f74b87ea685dc8996c1676456 |
| turbo-cache-control | no-preview |
| 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 | false |
| 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 |
| react-app-name | issues |
Links:
Viewport: width=device-width