René's URL Explorer Experiment


Title: Crash on deallocator of type 'time.struct_time' during finalizing for free-threaded Python · Issue #122527 · python/cpython · GitHub

Open Graph Title: Crash on deallocator of type 'time.struct_time' during finalizing for free-threaded Python · Issue #122527 · python/cpython

X Title: Crash on deallocator of type 'time.struct_time' during finalizing for free-threaded Python · Issue #122527 · python/cpython

Description: Crash report What happened? A simple standalone file: # test1.py import time obj = time.struct_time(range(1, 10)) $ pyenv install 3.14t-dev --debug $ pyenv local 3.14t-dev-debug $ python3 -VV Python 3.14.0a0 experimental free-threading b...

Open Graph Description: Crash report What happened? A simple standalone file: # test1.py import time obj = time.struct_time(range(1, 10)) $ pyenv install 3.14t-dev --debug $ pyenv local 3.14t-dev-debug $ python3 -VV Pytho...

X Description: Crash report What happened? A simple standalone file: # test1.py import time obj = time.struct_time(range(1, 10)) $ pyenv install 3.14t-dev --debug $ pyenv local 3.14t-dev-debug $ python3 -VV Pytho...

Opengraph URL: https://github.com/python/cpython/issues/122527

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Crash on deallocator of type 'time.struct_time' during finalizing for free-threaded Python","articleBody":"# Crash report\r\n\r\n### What happened?\r\n\r\nA simple standalone file:\r\n\r\n```python\r\n# test1.py\r\n\r\nimport time\r\n\r\nobj = time.struct_time(range(1, 10))\r\n```\r\n\r\n```console\r\n$ pyenv install 3.14t-dev --debug\r\n$ pyenv local 3.14t-dev-debug\r\n$ python3 -VV\r\nPython 3.14.0a0 experimental free-threading build (heads/main:bd3d31f, Aug  1 2024, 01:22:33) [Clang 15.0.0 (clang-1500.3.9.4)]\r\n$ python3 test1.py\r\nFatal Python error: _Py_Dealloc: Deallocator of type 'time.struct_time' raised an exception\r\nPython runtime state: finalizing (tstate=0x00000001018ca548)\r\nException ignored in the internal traceback machinery:\r\nImportError: sys.meta_path is None, Python is likely shutting down\r\nTypeError: Missed attribute 'n_fields' of type time.struct_time\r\n\r\nCurrent thread 0x00000001fff70c00 (most recent call first):\r\n  Garbage-collecting\r\n  \u003cno Python frame>\r\n[1]    89377 abort      python3 test1.py\r\n$ python3 -c 'import test1'\r\nFatal Python error: _Py_Dealloc: Deallocator of type 'time.struct_time' raised an exception\r\nPython runtime state: finalizing (tstate=0x00000001040a2548)\r\nException ignored in the internal traceback machinery:\r\nImportError: sys.meta_path is None, Python is likely shutting down\r\nTypeError: Missed attribute 'n_fields' of type time.struct_time\r\n\r\nCurrent thread 0x00000001fff70c00 (most recent call first):\r\n  Garbage-collecting\r\n  \u003cno Python frame>\r\n[1]    89737 abort      python3 -c 'import test1'\r\n```\r\n\r\nIf I remove the assignment for `obj`, the program can exit successfully.\r\n\r\n```python\r\n# test2.py\r\n\r\nimport time\r\n\r\ntime.struct_time(range(1, 10))\r\n```\r\n\r\n```console\r\n$ python3 test2.py           # no output\r\n$ python3 -c 'import test2'  # no output\r\n```\r\n\r\n### CPython versions tested on:\r\n\r\nCPython main branch, CPython 3.13t, CPython 3.14t\r\n\r\n### Operating systems tested on:\r\n\r\nLinux, macOS\r\n\r\n### Output from running 'python -VV' on the command line:\r\n\r\nPython 3.14.0a0 experimental free-threading build (heads/main:bd3d31f, Aug  1 2024, 01:22:33) [Clang 15.0.0 (clang-1500.3.9.4)]\n\n\u003c!-- gh-linked-prs -->\n### Linked PRs\n* gh-122577\n* gh-122625\n* gh-122626\n\u003c!-- /gh-linked-prs -->\n","author":{"url":"https://github.com/XuehaiPan","@type":"Person","name":"XuehaiPan"},"datePublished":"2024-07-31T17:29:15Z","url":"https://github.com/python/cpython/issues/122527"}

react-profiling0
react-import-mapreact,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-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:db5a61e2-28e4-2987-c184-e70139ee72b0
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id89B8:38E318:3C294B4:4C0519C:6B023AA4
html-safe-nonce2e83af822273a73ee841c81b58ac909d2a56877b333f430232aee56cfe6ff262
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4OUI4OjM4RTMxODozQzI5NEI0OjRDMDUxOUM6NkIwMjNBQTQiLCJ2aXNpdG9yX2lkIjoiODcyOTA4ODcxNjY4NzE2MjAyMCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmacbb7930186a6bcc7f7f5882aaae6a97819bf80786b8e2a005e5cc1d75e9152038
hovercard-subject-tagissue:2440547257
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python/cpython/122527/issue_layout
twitter:imagehttps://opengraph.githubassets.com/b1eae76a61bb884ed527ee26a7e4d47ea59bf95562184086f7da177bd5556f97/python/cpython/issues/122527
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/b1eae76a61bb884ed527ee26a7e4d47ea59bf95562184086f7da177bd5556f97/python/cpython/issues/122527
og:image:altCrash report What happened? A simple standalone file: # test1.py import time obj = time.struct_time(range(1, 10)) $ pyenv install 3.14t-dev --debug $ pyenv local 3.14t-dev-debug $ python3 -VV Pytho...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameXuehaiPan
hostnamegithub.com
expected-hostnamegithub.com
None87e774ee7c6b3bee0490394e4d3e57ec9dbc956f74b87ea685dc8996c1676456
turbo-cache-controlno-preview
go-importgithub.com/python/cpython git https://github.com/python/cpython.git
octolytics-dimension-user_id1525981
octolytics-dimension-user_loginpython
octolytics-dimension-repository_id81598961
octolytics-dimension-repository_nwopython/cpython
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id81598961
octolytics-dimension-repository_network_root_nwopython/cpython
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release423dbb54c5e7bfecc838eb387c1435eb3d0e760d
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/python/cpython/issues/122527#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fissues%2F122527
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fissues%2F122527
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=python%2Fcpython
Reloadhttps://github.com/python/cpython/issues/122527
Reloadhttps://github.com/python/cpython/issues/122527
Reloadhttps://github.com/python/cpython/issues/122527
pythonhttps://github.com/python
cpythonhttps://github.com/python/cpython
Codehttps://github.com/python/cpython
Issues5k+ (5k+)https://github.com/python/cpython/issues
Pull requests2.4k (2.4k)https://github.com/python/cpython/pulls
Actionshttps://github.com/python/cpython/actions
Projectshttps://github.com/python/cpython/projects
Security and qualityhttps://github.com/python/cpython/security
Insightshttps://github.com/python/cpython/insights
https://github.com/python/cpython
New issuehttps://github.com/login?return_to=https://github.com/python/cpython/issues/122527
New issuehttps://github.com/login?return_to=https://github.com/python/cpython/issues/122527
Crash on deallocator of type 'time.struct_time' during finalizing for free-threaded Pythonhttps://github.com/python/cpython/issues/122527#top
https://github.com/colesbury
3.13only security fixeshttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%223.13%22
3.14bugs and security fixeshttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%223.14%22
topic-free-threadinghttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22topic-free-threading%22
type-crashA hard crash of the interpreter, possibly with a core dumphttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22type-crash%22
https://github.com/XuehaiPan
XuehaiPanhttps://github.com/XuehaiPan
on Jul 31, 2024https://github.com/python/cpython/issues/122527#issue-2440547257
gh-122527: Fix a crash on deallocation of PyStructSequence #122577https://github.com/python/cpython/pull/122577
[3.13] gh-122527: Fix a crash on deallocation of PyStructSequence (GH-122577) #122625https://github.com/python/cpython/pull/122625
[3.12] gh-122527: Fix a crash on deallocation of PyStructSequence (GH-122577) #122626https://github.com/python/cpython/pull/122626
XuehaiPanhttps://github.com/XuehaiPan
type-crashA hard crash of the interpreter, possibly with a core dumphttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22type-crash%22
on Jul 31, 2024https://github.com/python/cpython/issues/122527#event-13713291462
https://github.com/Eclips4
Eclips4https://github.com/Eclips4
on Jul 31, 2024https://github.com/python/cpython/issues/122527#issuecomment-2261021934
Eclips4https://github.com/Eclips4
topic-free-threadinghttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22topic-free-threading%22
on Jul 31, 2024https://github.com/python/cpython/issues/122527#event-13713375844
colesburyhttps://github.com/colesbury
on Jul 31, 2024https://github.com/python/cpython/issues/122527#event-13713647427
colesburyhttps://github.com/colesbury
3.13only security fixeshttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%223.13%22
3.14bugs and security fixeshttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%223.14%22
on Jul 31, 2024https://github.com/python/cpython/issues/122527#event-13716167437
https://github.com/colesbury
colesburyhttps://github.com/colesbury
on Jul 31, 2024https://github.com/python/cpython/issues/122527#issuecomment-2261446340
4ad8f09https://github.com/python/cpython/commit/4ad8f090cce03c24fd4279ec8198a099b2d0cf97
gh-117376: Partial implementation of deferred reference counting #117696https://github.com/python/cpython/pull/117696
https://github.com/colesbury
colesburyhttps://github.com/colesbury
on Jul 31, 2024https://github.com/python/cpython/issues/122527#issuecomment-2261492627
cpython/Objects/structseq.chttps://github.com/python/cpython/blob/8844197daaeb3aa026cfe1cac6cf9d1b52c2540e/Objects/structseq.c#L116-L131
8844197https://github.com/python/cpython/commit/8844197daaeb3aa026cfe1cac6cf9d1b52c2540e
https://github.com/colesbury
colesburyhttps://github.com/colesbury
on Jul 31, 2024https://github.com/python/cpython/issues/122527#issuecomment-2261508183
colesburyhttps://github.com/colesbury
on Aug 1, 2024https://github.com/python/cpython/issues/122527#event-13731016389
pythongh-122527: Fix a crash on deallocation of `PyStructSequence`https://github.com/colesbury/cpython/commit/e677b2793f7f4261964d8d93493b341134d7964c
pythongh-122527https://github.com/python/cpython/issues/122527
e677b27https://github.com/colesbury/cpython/commit/e677b2793f7f4261964d8d93493b341134d7964c
encukouhttps://github.com/encukou
on Aug 2, 2024https://github.com/python/cpython/issues/122527#event-13744058345
gh-122527: Fix a crash on deallocation of `PyStructSequence` (GH-122577)https://github.com/python/cpython/commit/4b63cd170e5dd840bffc80922f09f2d69932ff5c
gh-122527https://github.com/python/cpython/issues/122527
GH-122577https://github.com/python/cpython/pull/122577
4b63cd1https://github.com/python/cpython/commit/4b63cd170e5dd840bffc80922f09f2d69932ff5c
miss-islingtonhttps://github.com/miss-islington
on Aug 2, 2024https://github.com/python/cpython/issues/122527#event-13744117974
pythongh-122527: Fix a crash on deallocation of `PyStructSequence` (p…https://github.com/miss-islington/cpython/commit/5ff87cc89861a785da6db64ca2dabc7967dee76a
pythongh-122527https://github.com/python/cpython/issues/122527
p…https://github.com/python/cpython/pull/122577
5ff87cchttps://github.com/miss-islington/cpython/commit/5ff87cc89861a785da6db64ca2dabc7967dee76a
brandtbucherhttps://github.com/brandtbucher
on Aug 7, 2024https://github.com/python/cpython/issues/122527#event-13798867537
pythongh-122527: Fix a crash on deallocation of `PyStructSequence` (p…https://github.com/brandtbucher/cpython/commit/26570426fe8f390d7ad97dd54f0efbae299fd37e
pythongh-122527https://github.com/python/cpython/issues/122527
p…https://github.com/python/cpython/pull/122577
2657042https://github.com/brandtbucher/cpython/commit/26570426fe8f390d7ad97dd54f0efbae299fd37e
blhsinghttps://github.com/blhsing
on Aug 22, 2024https://github.com/python/cpython/issues/122527#event-13974050888
pythongh-122527: Fix a crash on deallocation of `PyStructSequence` (p…https://github.com/blhsing/cpython/commit/adf832260488ec8aaf505a85a216ced6d7e3db8b
pythongh-122527https://github.com/python/cpython/issues/122527
p…https://github.com/python/cpython/pull/122577
adf8322https://github.com/blhsing/cpython/commit/adf832260488ec8aaf505a85a216ced6d7e3db8b
Yhg1shttps://github.com/Yhg1s
on Sep 2, 2024https://github.com/python/cpython/issues/122527#event-14101508771
[3.13] gh-122527: Fix a crash on deallocation of `PyStructSequence` (G…https://github.com/python/cpython/commit/57ba3b0c6e87264fc42ecf31780ec7c598380347
gh-122527https://github.com/python/cpython/issues/122527
G…https://github.com/python/cpython/pull/122577
57ba3b0https://github.com/python/cpython/commit/57ba3b0c6e87264fc42ecf31780ec7c598380347
ambvhttps://github.com/ambv
on Sep 6, 2024https://github.com/python/cpython/issues/122527#event-14162421095
[3.12] gh-122527: Fix a crash on deallocation of `PyStructSequence` (G…https://github.com/python/cpython/commit/1bfb58cf2ff273534f7b92e9dc32873b77acec95
gh-122527https://github.com/python/cpython/issues/122527
G…https://github.com/python/cpython/pull/122577
1bfb58chttps://github.com/python/cpython/commit/1bfb58cf2ff273534f7b92e9dc32873b77acec95
ambvhttps://github.com/ambv
completedhttps://github.com/python/cpython/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
on Sep 6, 2024https://github.com/python/cpython/issues/122527#event-14162425934
StanFromIrelandhttps://github.com/StanFromIreland
time.strptime() with lambda/function call triggers GC finalization error in Python 3.12 (struct_time n_fields missing in tp_clear) #148551https://github.com/python/cpython/issues/148551
on Apr 14, 2026https://github.com/python/cpython/issues/122527#event-24493229183
Sign up for freehttps://github.com/signup?return_to=https://github.com/python/cpython/issues/122527
Sign in to commenthttps://github.com/login?return_to=https://github.com/python/cpython/issues/122527
colesburyhttps://github.com/colesbury
3.13only security fixeshttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%223.13%22
3.14bugs and security fixeshttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%223.14%22
topic-free-threadinghttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22topic-free-threading%22
type-crashA hard crash of the interpreter, possibly with a core dumphttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22type-crash%22
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.