Repository navigation
gh-160986: Sample popped frames only after leaf() is running - #160990
timurzvural wants to merge 2 commits into
Conversation
38c1ea6 to
ba60c58
Compare
test_popping_python_frame_is_not_native attached as soon as the child process could be read, then took a fixed 10,000 samples. On a slow startup those samples all landed before leaf(), so the test observed zero frames.
ba60c58 to
77f83ef
Compare
|
Thank you for your interest in contributing to Python. This is a community-driven project, and we want it to be a welcoming place to learn and collaborate. Contributors are responsible for reviewing and understanding what they submit, checking its claims, and being able to explain changes in their own words. This helps reviewers focus on the contribution and leaves more time to support other contributors. This contribution appears to have been authored with AI assistance. Please explain your contribution in your own words and describe how you checked its correctness. Please read our guidelines for using AI tools. |
NekoAsakura
left a comment
There was a problem hiding this comment.
Thanks! Please keep the change minimal and focused, and it doesn't need a NEWS entry.
|
Thanks — updated. I removed the NEWS entry and left only the test change in What was wrong: The test attached What the test change does: After attaching, it polls How I checked it: Compared against the race described in #160986: the failure mode was "samples finish before |
|
Thank you for your interest in contributing to Python. This is a community-driven project, and we want it to be a welcoming place to learn and collaborate. Contributors are responsible for reviewing and understanding what they submit, checking its claims, and being able to explain changes in their own words. This helps reviewers focus on the contribution and leaves more time to support other contributors. We believe this contribution does not meet our guidelines for using AI tools, so we're closing it. If you think we've misunderstood your contribution, please let us know. You're welcome to explain your approach or ask questions about the guidelines. Please read our guidelines for using AI tools. |
Fixes #160986.
test_popping_python_frame_is_not_nativecreatedRemoteUnwinderas soon as the child process could be read, then took a fixed 10,000 samples. On a slow startup those samples all landed during interpreter startup, beforeleaf()existed, so the test observed zero frames and failed. It now waits untilleafis on the stack, then takes the sample window. The check that a poppingleafframe is never reported as<native>is unchanged.Per review feedback, this PR only changes the test (no NEWS entry).
This pull request was prepared with Cursor Agent.