René's URL Explorer Experiment


Title: `_remote_debugging`: Missing `last_profiled_frame` updates in coroutines, generators, etc. · Issue #151436 · python/cpython · GitHub

Open Graph Title: `_remote_debugging`: Missing `last_profiled_frame` updates in coroutines, generators, etc. · Issue #151436 · python/cpython

X Title: `_remote_debugging`: Missing `last_profiled_frame` updates in coroutines, generators, etc. · Issue #151436 · python/cpython

Description: Bug report Bug description: Very similar to #151424, but this is not about impossible stack traces but implausible. :-) Found while wrapping my head around #151424 and checking the source code for internals of last_profiled_frame. Mechan...

Open Graph Description: Bug report Bug description: Very similar to #151424, but this is not about impossible stack traces but implausible. :-) Found while wrapping my head around #151424 and checking the source code for ...

X Description: Bug report Bug description: Very similar to #151424, but this is not about impossible stack traces but implausible. :-) Found while wrapping my head around #151424 and checking the source code for ...

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

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"`_remote_debugging`: Missing `last_profiled_frame` updates in coroutines, generators, etc.","articleBody":"# Bug report\n\n### Bug description:\n\nVery similar to #151424, but this is not about impossible stack traces but implausible. :-)\n\nFound while wrapping my head around #151424 and checking the source code for internals of `last_profiled_frame`.\n\n# Mechansim\n\nThe interpr has to advance `tstate->last_profiled_frame` for us. It does so in `_PyEval_FrameClearAndPop`:\n\nhttps://github.com/python/cpython/blob/f4f102027a9b0edc72a048f17b696aa92d2e6893/Python/ceval.c#L1981\n\nBut the helper not always used when a frame is removed from the chain.\n\nNaively:\n\n`_YIELD_VALUE` missed:\n\nhttps://github.com/python/cpython/blob/f4f102027a9b0edc72a048f17b696aa92d2e6893/Python/bytecodes.c#L1863-L1864\n\n`RETURN_GENERATOR` missed:\n\nhttps://github.com/python/cpython/blob/f4f102027a9b0edc72a048f17b696aa92d2e6893/Python/bytecodes.c#L5877\n\n`_gen_throw` missed:\n\nhttps://github.com/python/cpython/blob/f4f102027a9b0edc72a048f17b696aa92d2e6893/Objects/genobject.c#L684\nhttps://github.com/python/cpython/blob/f4f102027a9b0edc72a048f17b696aa92d2e6893/Objects/genobject.c#L704\n\nframe-init fail missed:\n\nhttps://github.com/python/cpython/blob/f4f102027a9b0edc72a048f17b696aa92d2e6893/Python/ceval.c#L2009\n\n# Reproduction\n\n```python\ndef gen():\n    while True:\n        n = yield\n        sum(range(n))\n\ng = gen()\nnext(g)\n\ndef drv_a(): g.send(5000)\ndef drv_b(): g.send(50000)\n\nwhile True:\n    drv_a(); drv_b()\n```\n\n```bash\n2026-06-13T11:41:14.582916000+0200 maurycy@gimel /Users/maurycy/work/cpython-main (main f4f1020?) % sudo ./python.exe -m profiling.sampling run --collapsed -o /tmp/stacks.txt -d  10 genrepro.py&& cat /tmp/stacks.txt\nCaptured 10,000 samples in 10.00 seconds\nSample rate: 999.99 samples/sec\nError rate: 0.01\nCollapsed stack output written to /tmp/stacks.txt\ntid:13788812;\u003cfrozen runpy>:_run_module_as_main:201;\u003cfrozen runpy>:_run_code:87;genrepro.py:\u003cmodule>:13;genrepro.py:drv_b:10;genrepro.py:gen:4 9990\ntid:13788812;\u003cfrozen runpy>:_run_module_as_main:201;\u003cfrozen runpy>:_run_code:87;genrepro.py:\u003cmodule>:13;genrepro.py:drv_b:10;genrepro.py:gen:3 6\ntid:13788812;\u003cfrozen runpy>:_run_module_as_main:201;\u003cfrozen runpy>:_run_code:87;genrepro.py:\u003cmodule>:13 3\n2026-06-13T11:41:27.285300000+0200 maurycy@gimel /Users/maurycy/work/cpython-main (main f4f1020?) %\n```\n\nWhere is `drv_a`? `TOTALLY_GONE`.\n\n### CPython versions tested on:\n\nCPython main branch\n\n### Operating systems tested on:\n\nmacOS\n\n\u003c!-- gh-linked-prs -->\n### Linked PRs\n* gh-151437\n* gh-151612\n\u003c!-- /gh-linked-prs -->\n","author":{"url":"https://github.com/maurycy","@type":"Person","name":"maurycy"},"datePublished":"2026-06-13T09:42:35Z","url":"https://github.com/python/cpython/issues/151436"}

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:c1f70bca-12ee-7e2c-9708-0bcdc3a7bcc1
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idE802:17FB7:3ACDC0A:4A75B06:6B023366
html-safe-nonce0eeae885f3b109d5a64d3b0f3fd3b0f363744407cb58b982a24a3650c9e7296a
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFODAyOjE3RkI3OjNBQ0RDMEE6NEE3NUIwNjo2QjAyMzM2NiIsInZpc2l0b3JfaWQiOiI4NTMxNjMxOTgwNDE1MTY5MzgyIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmacdc4e51d979ebfaa8c9f764b7bebb73dd7a5fadbf71edbd8952ed9b76f6e7e60f
hovercard-subject-tagissue:4655089009
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/151436/issue_layout
twitter:imagehttps://opengraph.githubassets.com/d78db3fb7be3e64e5472c8a9d85ee7ee52921e698d6b56cae8b6cbc5d9ffdbc1/python/cpython/issues/151436
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/d78db3fb7be3e64e5472c8a9d85ee7ee52921e698d6b56cae8b6cbc5d9ffdbc1/python/cpython/issues/151436
og:image:altBug report Bug description: Very similar to #151424, but this is not about impossible stack traces but implausible. :-) Found while wrapping my head around #151424 and checking the source code for ...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamemaurycy
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/151436#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fissues%2F151436
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%2F151436
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/151436
Reloadhttps://github.com/python/cpython/issues/151436
Reloadhttps://github.com/python/cpython/issues/151436
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/151436
New issuehttps://github.com/login?return_to=https://github.com/python/cpython/issues/151436
_remote_debugging: Missing last_profiled_frame updates in coroutines, generators, etc.https://github.com/python/cpython/issues/151436#top
extension-modulesC modules in the Modules dirhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22extension-modules%22
topic-profilinghttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22topic-profiling%22
type-bugAn unexpected behavior, bug, or errorhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22type-bug%22
https://github.com/maurycy
maurycyhttps://github.com/maurycy
on Jun 13, 2026https://github.com/python/cpython/issues/151436#issue-4655089009
#151424https://github.com/python/cpython/issues/151424
#151424https://github.com/python/cpython/issues/151424
cpython/Python/ceval.chttps://github.com/python/cpython/blob/f4f102027a9b0edc72a048f17b696aa92d2e6893/Python/ceval.c#L1981
f4f1020https://github.com/python/cpython/commit/f4f102027a9b0edc72a048f17b696aa92d2e6893
cpython/Python/bytecodes.chttps://github.com/python/cpython/blob/f4f102027a9b0edc72a048f17b696aa92d2e6893/Python/bytecodes.c#L1863-L1864
f4f1020https://github.com/python/cpython/commit/f4f102027a9b0edc72a048f17b696aa92d2e6893
cpython/Python/bytecodes.chttps://github.com/python/cpython/blob/f4f102027a9b0edc72a048f17b696aa92d2e6893/Python/bytecodes.c#L5877
f4f1020https://github.com/python/cpython/commit/f4f102027a9b0edc72a048f17b696aa92d2e6893
cpython/Objects/genobject.chttps://github.com/python/cpython/blob/f4f102027a9b0edc72a048f17b696aa92d2e6893/Objects/genobject.c#L684
f4f1020https://github.com/python/cpython/commit/f4f102027a9b0edc72a048f17b696aa92d2e6893
cpython/Objects/genobject.chttps://github.com/python/cpython/blob/f4f102027a9b0edc72a048f17b696aa92d2e6893/Objects/genobject.c#L704
f4f1020https://github.com/python/cpython/commit/f4f102027a9b0edc72a048f17b696aa92d2e6893
cpython/Python/ceval.chttps://github.com/python/cpython/blob/f4f102027a9b0edc72a048f17b696aa92d2e6893/Python/ceval.c#L2009
f4f1020https://github.com/python/cpython/commit/f4f102027a9b0edc72a048f17b696aa92d2e6893
gh-151436: Fix missing tstate->last_profiled_frame updates #151437https://github.com/python/cpython/pull/151437
[3.15] gh-151436: Fix missing tstate->last_profiled_frame updates (GH-151437) #151612https://github.com/python/cpython/pull/151612
maurycyhttps://github.com/maurycy
type-bugAn unexpected behavior, bug, or errorhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22type-bug%22
on Jun 13, 2026https://github.com/python/cpython/issues/151436#event-26706712461
maurycyhttps://github.com/maurycy
on Jun 13, 2026https://github.com/python/cpython/issues/151436#event-26706746120
maurycyhttps://github.com/maurycy
on Jun 13, 2026https://github.com/python/cpython/issues/151436#event-26707357439
StanFromIrelandhttps://github.com/StanFromIreland
extension-modulesC modules in the Modules dirhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22extension-modules%22
topic-profilinghttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22topic-profiling%22
on Jun 13, 2026https://github.com/python/cpython/issues/151436#event-26708014792
pablogsalhttps://github.com/pablogsal
on Jun 17, 2026https://github.com/python/cpython/issues/151436#event-26875690120
pythongh-151436: Add macro for last_profiled_frame updateshttps://github.com/maurycy/cpython/commit/92e6252046ecf5cb9485444d1f69bf2a626ba6b4
pythongh-151436https://github.com/python/cpython/issues/151436
92e6252https://github.com/maurycy/cpython/commit/92e6252046ecf5cb9485444d1f69bf2a626ba6b4
pythongh-151436: Add macro for last_profiled_frame updateshttps://github.com/maurycy/cpython/commit/215094065743c73c5070075a16e60ce5a717e707
pythongh-151436https://github.com/python/cpython/issues/151436
2150940https://github.com/maurycy/cpython/commit/215094065743c73c5070075a16e60ce5a717e707
pythongh-151436: Add macro for last_profiled_frame updateshttps://github.com/maurycy/cpython/commit/1348756c07ac0501fab5b46700da002ec804d5b7
pythongh-151436https://github.com/python/cpython/issues/151436
1348756https://github.com/maurycy/cpython/commit/1348756c07ac0501fab5b46700da002ec804d5b7
Merge branch 'main' into pythongh-151436https://github.com/maurycy/cpython/commit/21ac917c890053921cb28b9682ef9fabb65961c7
pythongh-151436https://github.com/python/cpython/issues/151436
21ac917https://github.com/maurycy/cpython/commit/21ac917c890053921cb28b9682ef9fabb65961c7
gh-151436: Fix missing `tstate->last_profiled_frame` updates (#151437)https://github.com/python/cpython/commit/a8d74c062fe3c5cb2962dde8bee83704fcfa1bc9
gh-151436https://github.com/python/cpython/issues/151436
#151437https://github.com/python/cpython/pull/151437
a8d74c0https://github.com/python/cpython/commit/a8d74c062fe3c5cb2962dde8bee83704fcfa1bc9
vstinnerhttps://github.com/vstinner
on Jun 19, 2026https://github.com/python/cpython/issues/151436#event-26947990950
[3.15] gh-151436: Fix missing `tstate->last_profiled_frame` updates (G…https://github.com/python/cpython/commit/3135ab811dbe8f72a81aba370b7eb7f08e9913b1
gh-151436https://github.com/python/cpython/issues/151436
G…https://github.com/python/cpython/pull/151437
3135ab8https://github.com/python/cpython/commit/3135ab811dbe8f72a81aba370b7eb7f08e9913b1
https://github.com/maurycy
maurycyhttps://github.com/maurycy
on Jun 20, 2026https://github.com/python/cpython/issues/151436#issuecomment-4759259065
#151437https://github.com/python/cpython/pull/151437
maurycyhttps://github.com/maurycy
completedhttps://github.com/python/cpython/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
on Jun 20, 2026https://github.com/python/cpython/issues/151436#event-26995105304
Sign up for freehttps://github.com/signup?return_to=https://github.com/python/cpython/issues/151436
Sign in to commenthttps://github.com/login?return_to=https://github.com/python/cpython/issues/151436
extension-modulesC modules in the Modules dirhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22extension-modules%22
topic-profilinghttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22topic-profiling%22
type-bugAn unexpected behavior, bug, or errorhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22type-bug%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.