René's URL Explorer Experiment


Title: `_remote_debugging`: unbounded memory growth when recording binary and the thread is sleeping · Issue #151378 · python/cpython · GitHub

Open Graph Title: `_remote_debugging`: unbounded memory growth when recording binary and the thread is sleeping · Issue #151378 · python/cpython

X Title: `_remote_debugging`: unbounded memory growth when recording binary and the thread is sleeping · Issue #151378 · python/cpython

Description: Bug report Bug description: When recording binary files, pending RLEs are flushed when the stack is changed: cpython/Modules/_remote_debugging/binary_io_writer.c Lines 1014 to 1018 in 29a920e /* Stack changed - flush any pending RLE firs...

Open Graph Description: Bug report Bug description: When recording binary files, pending RLEs are flushed when the stack is changed: cpython/Modules/_remote_debugging/binary_io_writer.c Lines 1014 to 1018 in 29a920e /* St...

X Description: Bug report Bug description: When recording binary files, pending RLEs are flushed when the stack is changed: cpython/Modules/_remote_debugging/binary_io_writer.c Lines 1014 to 1018 in 29a920e /* St...

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

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"`_remote_debugging`: unbounded memory growth when recording binary and the thread is sleeping","articleBody":"# Bug report\n\n### Bug description:\n\nWhen recording binary files, pending RLEs are flushed when the stack is changed:\n\nhttps://github.com/python/cpython/blob/29a920e80e21490b5bdb7178373f80fe606a4403/Modules/_remote_debugging/binary_io_writer.c#L1014-L1018\n\nor on finalize:\n\nhttps://github.com/python/cpython/blob/29a920e80e21490b5bdb7178373f80fe606a4403/Modules/_remote_debugging/binary_io_writer.c#L1077-L1083\n\nSo, a sleeper can cause a memory leak:\n\nhttps://github.com/python/cpython/blob/29a920e80e21490b5bdb7178373f80fe606a4403/Modules/_remote_debugging/binary_io_writer.c#L996-L1012\n\n# Reproduction\n\nAnother one found under \"let's keep recording binary for a while and see what happens\", but the very minimal repro is:\n\n```\n2026-06-11T20:13:39.406750000+0200 maurycy@gimel /Users/maurycy/work/cpython (main d2e27ac?) % ./python.exe -c \"\nimport time\ntime.sleep(3600)\n\" & TARGET=$!\n\nsudo ./python.exe -m profiling.sampling attach --binary -r 1000khz -d 300 -o /tmp/rle.bin $TARGET &\nsleep 2; PROF=$(pgrep -fn \"profiling.sampling attach\")\nfor i in $(seq 5); do printf \"t=%2dmin  RSS=%d MB\\n\" $i $(($(ps -o rss= -p $PROF|tr -d ' ')/1024)); sleep 60; done\n[1] 62736\n[2] 62737\nt= 1min  RSS=46 MB\nt= 2min  RSS=348 MB\nt= 3min  RSS=645 MB\nt= 4min  RSS=945 MB\nt= 5min  RSS=1246 MB\nCaptured 98,200,648 samples in 300.00 seconds\nSample rate: 327,335.49 samples/sec\nError rate: 0.00\n  Binary Encoding:\n    Records:          1\n      RLE repeat:     0 (0.0%) [0 samples]\n      Full stack:     1 (100.0%)\n      Suffix match:   0 (0.0%)\n      Pop-push:       0 (0.0%)\n  Frame Efficiency:\n    Frames written:   1\n    Frames saved:     0 (0.0%)\n    Bytes (pre-zstd): 18 B\nWarning: missed 201799353 samples from the expected total of 300000001 (67.27%)\nBinary profile written to /tmp/rle.bin (98200648 samples)\n[2]  + done       sudo ./python.exe -m profiling.sampling attach --binary -r 1000khz -d 300 -o \n2026-06-11T20:18:42.018130000+0200 maurycy@gimel /Users/maurycy/work/cpython (main d2e27ac?) % \n```\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-152089\n* gh-153047\n\u003c!-- /gh-linked-prs -->\n","author":{"url":"https://github.com/maurycy","@type":"Person","name":"maurycy"},"datePublished":"2026-06-11T18:27:03Z","url":"https://github.com/python/cpython/issues/151378"}

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:e5d475dd-4717-7c0e-c901-51f3c6a80f14
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idA506:2E9D3B:A4C8E4:CF45DB:6B022F6D
html-safe-nonce85e02be9909e40676a03f2f6dd0192ebfface0a513a00eae7ce3db35d1bb3423
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBNTA2OjJFOUQzQjpBNEM4RTQ6Q0Y0NURCOjZCMDIyRjZEIiwidmlzaXRvcl9pZCI6IjI5NTY2NzIyMzg3MzQxNTk3MjUiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmacec22c3590107fdfe576e69127c665e36fc6b4b041e81745c3dbfee4a3b9748cf
hovercard-subject-tagissue:4643153280
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/151378/issue_layout
twitter:imagehttps://opengraph.githubassets.com/9fc64c165d015b6ab1fa283545147b52166f2c45991899af8eaac0f8aa9a1c96/python/cpython/issues/151378
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/9fc64c165d015b6ab1fa283545147b52166f2c45991899af8eaac0f8aa9a1c96/python/cpython/issues/151378
og:image:altBug report Bug description: When recording binary files, pending RLEs are flushed when the stack is changed: cpython/Modules/_remote_debugging/binary_io_writer.c Lines 1014 to 1018 in 29a920e /* St...
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/151378#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fissues%2F151378
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%2F151378
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/151378
Reloadhttps://github.com/python/cpython/issues/151378
Reloadhttps://github.com/python/cpython/issues/151378
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/151378
New issuehttps://github.com/login?return_to=https://github.com/python/cpython/issues/151378
#152089https://github.com/python/cpython/pull/152089
_remote_debugging: unbounded memory growth when recording binary and the thread is sleepinghttps://github.com/python/cpython/issues/151378#top
#152089https://github.com/python/cpython/pull/152089
https://github.com/maurycy
extension-modulesC modules in the Modules dirhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22extension-modules%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 11, 2026https://github.com/python/cpython/issues/151378#issue-4643153280
cpython/Modules/_remote_debugging/binary_io_writer.chttps://github.com/python/cpython/blob/29a920e80e21490b5bdb7178373f80fe606a4403/Modules/_remote_debugging/binary_io_writer.c#L1014-L1018
29a920ehttps://github.com/python/cpython/commit/29a920e80e21490b5bdb7178373f80fe606a4403
cpython/Modules/_remote_debugging/binary_io_writer.chttps://github.com/python/cpython/blob/29a920e80e21490b5bdb7178373f80fe606a4403/Modules/_remote_debugging/binary_io_writer.c#L1077-L1083
29a920ehttps://github.com/python/cpython/commit/29a920e80e21490b5bdb7178373f80fe606a4403
cpython/Modules/_remote_debugging/binary_io_writer.chttps://github.com/python/cpython/blob/29a920e80e21490b5bdb7178373f80fe606a4403/Modules/_remote_debugging/binary_io_writer.c#L996-L1012
29a920ehttps://github.com/python/cpython/commit/29a920e80e21490b5bdb7178373f80fe606a4403
gh-151378: Fix unbounded memory growth when recording binary and the thread is sleeping #152089https://github.com/python/cpython/pull/152089
[3.15] gh-151378: Fix unbounded memory growth when recording binary and the thread is sleeping (GH-152089) #153047https://github.com/python/cpython/pull/153047
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 11, 2026https://github.com/python/cpython/issues/151378#event-26640466517
https://github.com/maurycy
maurycyhttps://github.com/maurycy
on Jun 11, 2026https://github.com/python/cpython/issues/151378#issuecomment-4683732088
@pablogsalhttps://github.com/pablogsal
StanFromIrelandhttps://github.com/StanFromIreland
maurycyhttps://github.com/maurycy
on Jun 11, 2026https://github.com/python/cpython/issues/151378#event-26645713456
StanFromIrelandhttps://github.com/StanFromIreland
extension-modulesC modules in the Modules dirhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22extension-modules%22
on Jun 11, 2026https://github.com/python/cpython/issues/151378#event-26645719621
johnslavikhttps://github.com/johnslavik
on Jun 24, 2026https://github.com/python/cpython/issues/151378#event-27168333839
pablogsalhttps://github.com/pablogsal
on Jul 4, 2026https://github.com/python/cpython/issues/151378#event-27561723492
gh-151378: Fix unbounded memory growth when recording binary and the …https://github.com/python/cpython/commit/639a5525fb1b54973dcf55a636efc10be4042239
gh-151378https://github.com/python/cpython/issues/151378
639a552https://github.com/python/cpython/commit/639a5525fb1b54973dcf55a636efc10be4042239
pablogsalhttps://github.com/pablogsal
completedhttps://github.com/python/cpython/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
#152089https://github.com/python/cpython/pull/152089
on Jul 4, 2026https://github.com/python/cpython/issues/151378#event-27561723496
pablogsalhttps://github.com/pablogsal
on Jul 4, 2026https://github.com/python/cpython/issues/151378#event-27562136757
[3.15] gh-151378: Fix unbounded memory growth when recording binary a…https://github.com/python/cpython/commit/9f82c25eca14fe484fc9a2d8662f47174372d6f7
gh-151378https://github.com/python/cpython/issues/151378
9f82c25https://github.com/python/cpython/commit/9f82c25eca14fe484fc9a2d8662f47174372d6f7
tonghuaroothttps://github.com/tonghuaroot
on Aug 18, 2026https://github.com/python/cpython/issues/151378#event-29612985852
Drop the now-redundant emit_batch trim and fix the review nitshttps://github.com/tonghuaroot/cpython/commit/70a2e418346ac3d53e94c6016cf85ab29a9c6b27
70a2e41https://github.com/tonghuaroot/cpython/commit/70a2e418346ac3d53e94c6016cf85ab29a9c6b27
pablogsalhttps://github.com/pablogsal
on Oct 5, 2026https://github.com/python/cpython/issues/151378#event-32517945051
gh-152721: Fix quadratic RLE replay time in the profiling binary read…https://github.com/python/cpython/commit/e4a24732eb5829302461069f7b005b2e1cb6f76b
gh-152721https://github.com/python/cpython/issues/152721
e4a2473https://github.com/python/cpython/commit/e4a24732eb5829302461069f7b005b2e1cb6f76b
Sign up for freehttps://github.com/signup?return_to=https://github.com/python/cpython/issues/151378
Sign in to commenthttps://github.com/login?return_to=https://github.com/python/cpython/issues/151378
maurycyhttps://github.com/maurycy
extension-modulesC modules in the Modules dirhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22extension-modules%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.