Title: PyRefTracer_SetTracer and PyRefTracer_GetTracer are not thread safe in the free threading build · Issue #137992 · python/cpython · GitHub
Open Graph Title: PyRefTracer_SetTracer and PyRefTracer_GetTracer are not thread safe in the free threading build · Issue #137992 · python/cpython
X Title: PyRefTracer_SetTracer and PyRefTracer_GetTracer are not thread safe in the free threading build · Issue #137992 · python/cpython
Description: Setting and getting the current ref tracer should be done while all the threads are stopped to avoid races. This is because users cannot ever safely free the old ref tracer's user data in a free threaded build, because is not possible to...
Open Graph Description: Setting and getting the current ref tracer should be done while all the threads are stopped to avoid races. This is because users cannot ever safely free the old ref tracer's user data in a free th...
X Description: Setting and getting the current ref tracer should be done while all the threads are stopped to avoid races. This is because users cannot ever safely free the old ref tracer's user data in a fre...
Opengraph URL: https://github.com/python/cpython/issues/137992
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"PyRefTracer_SetTracer and PyRefTracer_GetTracer are not thread safe in the free threading build","articleBody":"Setting and getting the current ref tracer should be done while all the threads are stopped to avoid races. This is because users cannot ever safely free the old ref tracer's user data in a free threaded build, because is not possible to ever be sure that no other thread is in the middle of calling the ref tracer. Without synchronizing across threads there, one thread can still be trying to use the old tracer while another thinks it has been successfully uninstalled and safe to clean up\n\n\u003c!-- gh-linked-prs -->\n### Linked PRs\n* gh-137994\n* gh-138925\n\u003c!-- /gh-linked-prs -->\n","author":{"url":"https://github.com/pablogsal","@type":"Person","name":"pablogsal"},"datePublished":"2025-08-20T13:15:15Z","url":"https://github.com/python/cpython/issues/137992"}
| 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:afd0a6d1-f22b-407f-dbf2-1b189517e1d2 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8E70:38C5CF:3E2B8A5:4ED5BB3:6B01F0CA |
| html-safe-nonce | 9e6652a516a82cc358433295b450d954c9f44ddedc85ad51425e6f1b5d66da1d |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4RTcwOjM4QzVDRjozRTJCOEE1OjRFRDVCQjM6NkIwMUYwQ0EiLCJ2aXNpdG9yX2lkIjoiNjkyMDgxODE5MjcwMTA1OTI3NCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | e34e79b92b5b9777d791b3d1b2064b206cbd51f77bc26b4faf55b97c05fe79ae |
| hovercard-subject-tag | issue:3338105963 |
| 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/137992/issue_layout |
| twitter:image | https://opengraph.githubassets.com/a9a1231dd3a065474bbb4441af49eda99ca95c305088af848c8989361f56886a/python/cpython/issues/137992 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/a9a1231dd3a065474bbb4441af49eda99ca95c305088af848c8989361f56886a/python/cpython/issues/137992 |
| og:image:alt | Setting and getting the current ref tracer should be done while all the threads are stopped to avoid races. This is because users cannot ever safely free the old ref tracer's user data in a free th... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | pablogsal |
| 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