Title: Failed assertion in `Python/legacy_tracing.c:431` on a free-threading build · Issue #127235 · python/cpython · GitHub
Open Graph Title: Failed assertion in `Python/legacy_tracing.c:431` on a free-threading build · Issue #127235 · python/cpython
X Title: Failed assertion in `Python/legacy_tracing.c:431` on a free-threading build · Issue #127235 · python/cpython
Description: Crash report What happened? It's possible to cause an abort on !_PyMem_IsPtrFreed(tstate) while running with PYTHON_GIL=0 by calling the following code: import threading def errback(*args, **kw): raise ValueError('error') for x in range(...
Open Graph Description: Crash report What happened? It's possible to cause an abort on !_PyMem_IsPtrFreed(tstate) while running with PYTHON_GIL=0 by calling the following code: import threading def errback(*args, **kw): r...
X Description: Crash report What happened? It's possible to cause an abort on !_PyMem_IsPtrFreed(tstate) while running with PYTHON_GIL=0 by calling the following code: import threading def errback(*args, **kw...
Opengraph URL: https://github.com/python/cpython/issues/127235
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Failed assertion in `Python/legacy_tracing.c:431` on a free-threading build","articleBody":"# Crash report\n\n### What happened?\n\nIt's possible to cause an abort on `!_PyMem_IsPtrFreed(tstate)` while running with `PYTHON_GIL=0` by calling the following code:\n```python\nimport threading\n\ndef errback(*args, **kw):\n raise ValueError('error')\n\nfor x in range(200):\n threading._start_joinable_thread(errback)\n try:\n threading.setprofile_all_threads(\"\")\n except:\n pass\n```\nAbort message:\n```\npython: Python/legacy_tracing.c:431: is_tstate_valid: Assertion `!_PyMem_IsPtrFreed(tstate)' failed.\nAborted\n```\nNot sure this isn't an expected failure mode.\nFound using [fusil](https://github.com/devdanzin/fusil) by @vstinner.\n\n### CPython versions tested on:\n\n3.13, 3.14, CPython main branch\n\n### Operating systems tested on:\n\nLinux\n\n### Output from running 'python -VV' on the command line:\n\nPython 3.14.0a2+ experimental free-threading build (heads/main-dirty:a13e94d84bf, Nov 23 2024, 07:16:19) [GCC 11.4.0]","author":{"url":"https://github.com/devdanzin","@type":"Person","name":"devdanzin"},"datePublished":"2024-11-24T18:51:30.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":10},"url":"https://github.com/127235/cpython/issues/127235"}
| 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:a2de8a48-ee69-a994-bfca-1f2f4c1c40f9 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | BCD6:3026A5:29CC008:3C345AF:6A57BDEF |
| html-safe-nonce | e644656ec07a8d4d33b6a4c462f97c78c2ffae62c9c7dbe37b2f7c84c9cd9cd3 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCQ0Q2OjMwMjZBNToyOUNDMDA4OjNDMzQ1QUY6NkE1N0JERUYiLCJ2aXNpdG9yX2lkIjoiMjAyMzQxNjE4MzYzNTAzMzU4MyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | d2a7738612574b4c2615b22dbdd633bb7cb3eac49e2dc6e68b10a5b597faf6a8 |
| hovercard-subject-tag | issue:2688205102 |
| 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/127235/issue_layout |
| twitter:image | https://opengraph.githubassets.com/1fa739d983eb2fd540851a73529bc35cdd824f06da16a65152801bc86cd2dd4e/python/cpython/issues/127235 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/1fa739d983eb2fd540851a73529bc35cdd824f06da16a65152801bc86cd2dd4e/python/cpython/issues/127235 |
| og:image:alt | Crash report What happened? It's possible to cause an abort on !_PyMem_IsPtrFreed(tstate) while running with PYTHON_GIL=0 by calling the following code: import threading def errback(*args, **kw): r... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | devdanzin |
| hostname | github.com |
| expected-hostname | github.com |
| None | 5bf9f84655de1d0e9aa064cd3b2bc9703556c68ae53b94e21b872b7e9f1f7cc1 |
| 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 | 9e5a4d2583d61726264f5ec9440b26ec7a94eb3f |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width