René's URL Explorer Experiment


Title: Assertion `_tstate->jit_tracer_state.initial_state.func != NULL` failed in `_PyOptimizer_Optimize` · Issue #143610 · python/cpython · GitHub

Open Graph Title: Assertion `_tstate->jit_tracer_state.initial_state.func != NULL` failed in `_PyOptimizer_Optimize` · Issue #143610 · python/cpython

X Title: Assertion `_tstate->jit_tracer_state.initial_state.func != NULL` failed in `_PyOptimizer_Optimize` · Issue #143610 · python/cpython

Description: Crash report What happened? It's possible to abort a patched JIT build by running the code below. The interpreter must be called from a venv in which lafleur is installed as editable, likely due to that priming the GC into a state suitab...

Open Graph Description: Crash report What happened? It's possible to abort a patched JIT build by running the code below. The interpreter must be called from a venv in which lafleur is installed as editable, likely due to...

X Description: Crash report What happened? It's possible to abort a patched JIT build by running the code below. The interpreter must be called from a venv in which lafleur is installed as editable, likely du...

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

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Assertion `_tstate->jit_tracer_state.initial_state.func != NULL` failed in `_PyOptimizer_Optimize`","articleBody":"# Crash report\n\n### What happened?\n\nIt's possible to abort a patched JIT build by running the code below. The interpreter must be called from a venv in which lafleur is installed as editable, likely due to that priming the GC into a state suitable for the crash.\n\n\n\u003cdetails>\u003csummary>Necessary patch\u003c/summary>\n\u003cp>\n\n\n```diff\ndiff --git a/Include/internal/pycore_backoff.h b/Include/internal/pycore_backoff.h\nindex fadd11f04ec..3e779a141af 100644\n--- a/Include/internal/pycore_backoff.h\n+++ b/Include/internal/pycore_backoff.h\n@@ -125,7 +125,7 @@ trigger_backoff_counter(void)\n // For example, 4095 does not work for the nqueens benchmark on pyperformance\n // as we always end up tracing the loop iteration's\n // exhaustion iteration. Which aborts our current tracer.\n-#define JUMP_BACKWARD_INITIAL_VALUE 4000\n+#define JUMP_BACKWARD_INITIAL_VALUE 63\n #define JUMP_BACKWARD_INITIAL_BACKOFF 6\n static inline _Py_BackoffCounter\n initial_jump_backoff_counter(_PyPolicy *policy)\n@@ -139,7 +139,7 @@ initial_jump_backoff_counter(_PyPolicy *policy)\n  * Must be larger than ADAPTIVE_COOLDOWN_VALUE,\n  * otherwise when a side exit warms up we may construct\n  * a new trace before the Tier 1 code has properly re-specialized. */\n-#define SIDE_EXIT_INITIAL_VALUE 4000\n+#define SIDE_EXIT_INITIAL_VALUE 63\n #define SIDE_EXIT_INITIAL_BACKOFF 6\n\n static inline _Py_BackoffCounter\n```\n\n\u003c/p>\n\u003c/details>\n\nTo install lafleur as editable, first create a venv and activate it, then clone the [lafleur repo](https://github.com/devdanzin/lafleur/) and run `pip install -e /path/to/lafleur/clone`.\n\nThis MRE must be invoked like this:\n\n```\n/path/to/venv/with/editable/lafleur/install/bin/python mre.py\n```\n\n\n\u003cdetails>\u003csummary>MRE\u003c/summary>\n\u003cp>\n\n\n```python\nimport email\nfrom itertools import batched\n\nf = 0.0\ns = \"\"\ni = 0\na: B\n\ndef f1():\n    class P: 1\n\n    for z in range(65): ...\n    i + i\n    i + i\n\n    class A: ...\n\n    class P:\n        def _():\n            if P: i\n\n    i + 1\n    f + f\n    f + f\n\n    class A:\n        def _(): ...\n\n    class C:\n        def _():\n            if C: i\n\n    f + f\n    c = f + f\n    c = f + f\n    s > s\n    s > s\n    s > s\n    z * i\n    z * i\n\n    class a:\n        def c(): i\n\n        def _(): ...\n        def __(): ...\n\n    class A:\n        def _():\n            try:\n                for _ in a: ...\n            except: ...\n\n    z * i\n    1 * i\n    z * i\n    z ^ i\n    i ^ i\n    i ^ i\n    1 ^ i\n    1 ^ i\n    i & 1\n    i & i\n\n    class z:\n        def __init__(C, a):\n            C.A = 0\n\n        def __aiter__(C): return C\n\n        async def __anext__(C):\n            if C.A:\n                raise StopAsyncIteration\n            C.A = 1\n\n    class A:\n        def _(): 0\n\n        async def A():\n            for _ in range(5):\n                async for _ in z(1): ...\n\n        try:\n            a = A()\n            a.send(None)\n        except: ...\n\n    class A:\n        a: ...\n\n    class A:\n        def _(): ...\n\nfor _ in range(300):\n    f1()\n```\n\n\u003c/p>\n\u003c/details>\n\n\u003cdetails>\u003csummary>Backtrace\u003c/summary>\n\u003cp>\n\n```batch\npython: Python/optimizer.c:144: int _PyOptimizer_Optimize(_PyInterpreterFrame *, PyThreadState *): Assertion `_tstate->jit_tracer_state.initial_state.func != NULL' failed.\n\nProgram received signal SIGABRT, Aborted.\n\n#0  __pthread_kill_implementation (threadid=\u003coptimized out>, signo=6, no_tid=0) at ./nptl/pthread_kill.c:44\n#1  __pthread_kill_internal (threadid=\u003coptimized out>, signo=6) at ./nptl/pthread_kill.c:89\n#2  __GI___pthread_kill (threadid=\u003coptimized out>, signo=signo@entry=6) at ./nptl/pthread_kill.c:100\n#3  0x00007ffff7c45e2e in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26\n#4  0x00007ffff7c28888 in __GI_abort () at ./stdlib/abort.c:77\n#5  0x00007ffff7c287f0 in __assert_fail_base (fmt=\u003coptimized out>, assertion=\u003coptimized out>, file=\u003coptimized out>, line=\u003coptimized out>, function=\u003coptimized out>) at ./assert/assert.c:118\n#6  0x00007ffff7c3c19f in __assert_fail (assertion=\u003coptimized out>, file=\u003coptimized out>, line=\u003coptimized out>, function=\u003coptimized out>) at ./assert/assert.c:127\n#7  0x00005555563e5f09 in _PyOptimizer_Optimize (frame=frame@entry=0x7e8ff6de5298, tstate=tstate@entry=0x555556ea42c0 \u003c_PyRuntime+359392>) at Python/optimizer.c:144\n#8  0x0000555555ed6364 in stop_tracing_and_jit (tstate=0x555556ea42c0 \u003c_PyRuntime+359392>, frame=frame@entry=0x7e8ff6de5298) at Python/ceval.c:1464\n#9  0x0000555555e94a95 in _PyEval_EvalFrameDefault (tstate=\u003coptimized out>, frame=\u003coptimized out>, throwflag=\u003coptimized out>) at Python/generated_cases.c.h:11580\n#10 0x0000555555e70c98 in _PyEval_EvalFrame (tstate=0x555556ea42c0 \u003c_PyRuntime+359392>, frame=0x7e8ff6de5220, throwflag=0) at ./Include/internal/pycore_ceval.h:118\n#11 _PyEval_Vector (tstate=\u003coptimized out>, func=\u003coptimized out>, locals=\u003coptimized out>, args=\u003coptimized out>, argcount=\u003coptimized out>, kwnames=0x0) at Python/ceval.c:2542\n#12 0x0000555555e706b5 in PyEval_EvalCode (co=\u003coptimized out>, globals=\u003coptimized out>, locals=0x7c7ff6e86440) at Python/ceval.c:1008\n#13 0x000055555647ae3f in run_eval_code_obj (tstate=tstate@entry=0x555556ea42c0 \u003c_PyRuntime+359392>, co=co@entry=0x7d2ff6e39290, globals=globals@entry=0x7c7ff6e86440,\n    locals=locals@entry=0x7c7ff6e86440) at Python/pythonrun.c:1366\n#14 0x000055555647a00c in run_mod (mod=\u003coptimized out>, filename=\u003coptimized out>, globals=\u003coptimized out>, locals=\u003coptimized out>, flags=\u003coptimized out>, arena=\u003coptimized out>,\n    interactive_src=\u003coptimized out>, generate_new_source=\u003coptimized out>) at Python/pythonrun.c:1469\n#15 0x000055555647460d in pyrun_file (fp=fp@entry=0x7d4ff6e03300, filename=filename@entry=0x7ccff6e2a6a0, start=start@entry=257, globals=globals@entry=0x7c7ff6e86440,\n    locals=locals@entry=0x7c7ff6e86440, closeit=closeit@entry=1, flags=0x7bfff5c3df10) at Python/pythonrun.c:1294\n#16 0x000055555647216d in _PyRun_SimpleFileObject (fp=\u003coptimized out>, filename=\u003coptimized out>, closeit=\u003coptimized out>, flags=\u003coptimized out>) at Python/pythonrun.c:518\n#17 0x00005555564714de in _PyRun_AnyFileObject (fp=fp@entry=0x7d4ff6e03300, filename=filename@entry=0x7ccff6e2a6a0, closeit=closeit@entry=1, flags=flags@entry=0x7bfff5c3df10)\n    at Python/pythonrun.c:81\n#18 0x00005555564ed64b in pymain_run_file_obj (program_name=0x7caff6e80ae0, filename=0x7ccff6e2a6a0, skip_source_first_line=0) at Modules/main.c:410\n#19 pymain_run_file (config=0x555556e6f398 \u003c_PyRuntime+142520>) at Modules/main.c:429\n#20 0x00005555564eb714 in pymain_run_python (exitcode=0x7bfff5c3db00) at Modules/main.c:691\n#21 Py_RunMain () at Modules/main.c:772\n#22 0x00005555564ec617 in pymain_main (args=\u003coptimized out>) at Modules/main.c:802\n#23 0x00005555564ec788 in Py_BytesMain (argc=\u003coptimized out>, argv=0x7fffffffdb98) at Modules/main.c:826\n#24 0x00007ffff7c2a575 in __libc_start_call_main (main=main@entry=0x55555591cc40 \u003cmain>, argc=argc@entry=2, argv=argv@entry=0x7fffffffdb98) at ../sysdeps/nptl/libc_start_call_main.h:58\n#25 0x00007ffff7c2a628 in __libc_start_main_impl (main=0x55555591cc40 \u003cmain>, argc=2, argv=0x7fffffffdb98, init=\u003coptimized out>, fini=\u003coptimized out>, rtld_fini=\u003coptimized out>,\n    stack_end=0x7fffffffdb88) at ../csu/libc-start.c:360\n#26 0x00005555558334f5 in _start ()\n```\n\n\u003c/p>\n\u003c/details>\n\nOutput from running with `PYTHON_LLTRACE=4 PYTHON_OPT_DEBUG=4`:\n[093730_abort_lltrace_opt_debug.txt](https://github.com/user-attachments/files/24529440/093730_abort_lltrace_opt_debug.txt)\n\nFound using [lafleur](https://github.com/devdanzin/lafleur/).\n\n\n\n### CPython versions tested on:\n\nCPython main branch\n\n### Operating systems tested on:\n\nLinux\n\n### Output from running 'python -VV' on the command line:\n\nPython 3.15.0a3+ (heads/main-dirty:6d54b6ac7d5, Jan  9 2026, 11:35:46) [Clang 21.1.2 (2ubuntu6)]","author":{"url":"https://github.com/devdanzin","@type":"Person","name":"devdanzin"},"datePublished":"2026-01-09T14:47:09Z","url":"https://github.com/python/cpython/issues/143610"}

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:2bef1c8f-c43b-df37-2193-f18d6964291a
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idA3AC:24645:2129195:2B8B60A:6B023F3A
html-safe-noncee8cc5ffa0c051f9795429c7aff1c301ac7dd0702ca95a50e70a31d4897fa68b4
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBM0FDOjI0NjQ1OjIxMjkxOTU6MkI4QjYwQTo2QjAyM0YzQSIsInZpc2l0b3JfaWQiOiIzNjUyOTUxNzQ2Njg4NDY2NzQ2IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac7d7161bcc5ea5d804c7656011214d1df973a60cd7329da604c2aef3f7cd79917
hovercard-subject-tagissue:3797212704
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/143610/issue_layout
twitter:imagehttps://opengraph.githubassets.com/f2962bedda8f3fb7f010b0880c69dea3cb4b776b7dbcbce83ed6a839131d9de6/python/cpython/issues/143610
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/f2962bedda8f3fb7f010b0880c69dea3cb4b776b7dbcbce83ed6a839131d9de6/python/cpython/issues/143610
og:image:altCrash report What happened? It's possible to abort a patched JIT build by running the code below. The interpreter must be called from a venv in which lafleur is installed as editable, likely due to...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamedevdanzin
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/143610#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fissues%2F143610
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%2F143610
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/143610
Reloadhttps://github.com/python/cpython/issues/143610
Reloadhttps://github.com/python/cpython/issues/143610
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/143610
New issuehttps://github.com/login?return_to=https://github.com/python/cpython/issues/143610
Assertion _tstate->jit_tracer_state.initial_state.func != NULL failed in _PyOptimizer_Optimizehttps://github.com/python/cpython/issues/143610#top
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/devdanzin
devdanzinhttps://github.com/devdanzin
on Jan 9, 2026https://github.com/python/cpython/issues/143610#issue-3797212704
lafleur repohttps://github.com/devdanzin/lafleur/
093730_abort_lltrace_opt_debug.txthttps://github.com/user-attachments/files/24529440/093730_abort_lltrace_opt_debug.txt
lafleurhttps://github.com/devdanzin/lafleur/
devdanzinhttps://github.com/devdanzin
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 Jan 9, 2026https://github.com/python/cpython/issues/143610#event-21949070966
https://github.com/devdanzin
devdanzinhttps://github.com/devdanzin
on Jan 9, 2026https://github.com/python/cpython/issues/143610#issuecomment-3729217027
devdanzinhttps://github.com/devdanzin
duplicatehttps://github.com/python/cpython/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Aduplicate
JIT: Assertion failure in _PyOptimizer_Optimize #143123https://github.com/python/cpython/issues/143123
on Jan 9, 2026https://github.com/python/cpython/issues/143610#event-21949113983
Sign up for freehttps://github.com/signup?return_to=https://github.com/python/cpython/issues/143610
Sign in to commenthttps://github.com/login?return_to=https://github.com/python/cpython/issues/143610
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.