René's URL Explorer Experiment


Title: `_remote_debugging`: `write_sample` advances the timestamp before writing the sample · Issue #158550 · python/cpython · GitHub

Open Graph Title: `_remote_debugging`: `write_sample` advances the timestamp before writing the sample · Issue #158550 · python/cpython

X Title: `_remote_debugging`: `write_sample` advances the timestamp before writing the sample · Issue #158550 · python/cpython

Description: Bug report (found while thinking about how to address the code review from #157228) The timestamp is advanced before the stack is built: https://github.com/python/cpython/blob/b9546455ab0/Modules/_remote_debugging/binary_io_writer.c#L952...

Open Graph Description: Bug report (found while thinking about how to address the code review from #157228) The timestamp is advanced before the stack is built: https://github.com/python/cpython/blob/b9546455ab0/Modules/_...

X Description: Bug report (found while thinking about how to address the code review from #157228) The timestamp is advanced before the stack is built: https://github.com/python/cpython/blob/b9546455ab0/Modules/_...

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

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"`_remote_debugging`: `write_sample` advances the timestamp before writing the sample","articleBody":"### Bug report\n\n(found while thinking about how to address the code review from https://github.com/python/cpython/pull/157228)\n\nThe timestamp is advanced before the stack is built:\n\nhttps://github.com/python/cpython/blob/b9546455ab0/Modules/_remote_debugging/binary_io_writer.c#L952-L953\n\nIf there's a failure, such as:\n\nhttps://github.com/python/cpython/blob/763b6edb0ec959bdfb78f098b76829365de36ca5/Lib/profiling/sampling/sample.py#L180-L184\n\nThen the timestamps for the thread is shifted. That's a hard corruption for a delta-based format.\n\n# Reproduction\n\n```bash\nmaurycy@gimel cpython-315 (main e580c88?) % cat repro.py\nimport _remote_debugging\n\nw = _remote_debugging.BinaryWriter(\"/tmp/o.bin\", 1000, 0)\ntry:\n    w.write_sample([(0, [(1, 0, [(42, None, \"f\", None)])])], 5000)\nexcept TypeError:\n    pass\nw.write_sample([(0, [(1, 0, [(\"a.py\", None, \"f\", None)])])], 6000)\nw.finalize()\n\nclass C:\n    def collect(self, frames, timestamps_us=None, **kw):\n        print(timestamps_us)\n\n_remote_debugging.BinaryReader(\"/tmp/o.bin\").replay(C())\nmaurycy@gimel cpython-315 (main e580c88?) % ./python.exe repro.py\n[1000]\n```\n\nAnother repro could involve `_testcapi.set_nomemory`, incorrect unicode etc.\n\n### CPython versions tested on:\n\nCPython main branch, 3.15\n\n### Operating systems tested on:\n\nmacOS\n\n\u003c!-- gh-linked-prs -->\n### Linked PRs\n* gh-158551\n\u003c!-- /gh-linked-prs -->\n","author":{"url":"https://github.com/maurycy","@type":"Person","name":"maurycy"},"datePublished":"2026-10-01T07:05:47Z","url":"https://github.com/python/cpython/issues/158550"}

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:51f0a091-a13d-e9ec-73b2-22b5fcc857f5
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idE5E8:33444D:3627744:47FAC0C:6B020982
html-safe-nonce155c066e57688c38eda086f41fddf1dc9166a762a5afe828ca8376fec8dabda8
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFNUU4OjMzNDQ0RDozNjI3NzQ0OjQ3RkFDMEM6NkIwMjA5ODIiLCJ2aXNpdG9yX2lkIjoiNjM1MDQ1MTIxMzAxMTY1MDk0NiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmaceefa9c521441a19a4e3cc369c4399878586b469bb1b492c1d50d1cb10ba2ea03
hovercard-subject-tagissue:5658350134
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/158550/issue_layout
twitter:imagehttps://opengraph.githubassets.com/90ae6b761e70d44baaf6c6f6684cff4c555147f976f4a874301db79c5ed9ab9c/python/cpython/issues/158550
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/90ae6b761e70d44baaf6c6f6684cff4c555147f976f4a874301db79c5ed9ab9c/python/cpython/issues/158550
og:image:altBug report (found while thinking about how to address the code review from #157228) The timestamp is advanced before the stack is built: https://github.com/python/cpython/blob/b9546455ab0/Modules/_...
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/158550#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fissues%2F158550
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%2F158550
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/158550
Reloadhttps://github.com/python/cpython/issues/158550
Reloadhttps://github.com/python/cpython/issues/158550
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/158550
New issuehttps://github.com/login?return_to=https://github.com/python/cpython/issues/158550
_remote_debugging: write_sample advances the timestamp before writing the samplehttps://github.com/python/cpython/issues/158550#top
interpreter-core(Objects, Python, Grammar, and Parser dirs)https://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22interpreter-core%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 Oct 1, 2026https://github.com/python/cpython/issues/158550#issue-5658350134
#157228https://github.com/python/cpython/pull/157228
https://github.com/python/cpython/blob/b9546455ab0/Modules/_remote_debugging/binary_io_writer.c#L952-L953https://github.com/python/cpython/blob/b9546455ab0/Modules/_remote_debugging/binary_io_writer.c#L952-L953
cpython/Lib/profiling/sampling/sample.pyhttps://github.com/python/cpython/blob/763b6edb0ec959bdfb78f098b76829365de36ca5/Lib/profiling/sampling/sample.py#L180-L184
763b6edhttps://github.com/python/cpython/commit/763b6edb0ec959bdfb78f098b76829365de36ca5
gh-158550: _remote_debugging: Do not advance prev_timestamp when write_sample fails #158551https://github.com/python/cpython/pull/158551
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 Oct 1, 2026https://github.com/python/cpython/issues/158550#event-32229502371
picnixzhttps://github.com/picnixz
interpreter-core(Objects, Python, Grammar, and Parser dirs)https://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22interpreter-core%22
topic-profilinghttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22topic-profiling%22
on Oct 1, 2026https://github.com/python/cpython/issues/158550#event-32251667264
maurycyhttps://github.com/maurycy
completedhttps://github.com/python/cpython/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
on Oct 5, 2026https://github.com/python/cpython/issues/158550#event-32478348854
maurycyhttps://github.com/maurycy
on Oct 5, 2026https://github.com/python/cpython/issues/158550#event-32484557733
https://github.com/maurycy
maurycyhttps://github.com/maurycy
on Oct 5, 2026https://github.com/python/cpython/issues/158550#issuecomment-5996959162
#152892https://github.com/python/cpython/pull/152892
#158830https://github.com/python/cpython/pull/158830
maurycyhttps://github.com/maurycy
completedhttps://github.com/python/cpython/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
on Oct 5, 2026https://github.com/python/cpython/issues/158550#event-32519247122
Sign up for freehttps://github.com/signup?return_to=https://github.com/python/cpython/issues/158550
Sign in to commenthttps://github.com/login?return_to=https://github.com/python/cpython/issues/158550
interpreter-core(Objects, Python, Grammar, and Parser dirs)https://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22interpreter-core%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.