FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

gh-158574: Stabilize TLBC cache refresh tests by pablogsal · Pull Request #158801 · python/cpython · GitHub

Repository navigation

gh-158574: Stabilize TLBC cache refresh tests - #158801

Merged
pablogsal merged 2 commits into
python:mainfrom
pablogsal:codex/fix-158574-tlbc-tests
Oct 5, 2026
Merged

pablogsal merged 2 commits into
python:mainfrom
pablogsal:codex/fix-158574-tlbc-tests

Conversation

pablogsal commented Oct 4, 2026 •
edited
Loading

Copy link
Copy Markdown
Member

Fixes #158574.

The TLBC cache refresh tests can sample a worker while it is returning from go.wait() and entering leaf(). Reading the thread state and stack at different times can produce an inconsistent frame snapshot, causing invalid memory reads or incorrect line numbers.

Have each worker notify a native SimpleQueue when it reaches its waiting function, then block in a native lock. The sampler waits for those notifications before reading the stacks. Both tests retain the same unwinder across phases and check the expected frames and source lines.

pablogsal added needs backport to 3.14 bugs and security fixes needs backport to 3.15 pre-release feature fixes, bugs and security fixes labels Oct 5, 2026
pablogsal enabled auto-merge (squash) October 5, 2026 01:02
pablogsal merged commit 0e75a05 into python:main Oct 5, 2026
52 checks passed
pablogsal deleted the codex/fix-158574-tlbc-tests branch October 5, 2026 01:03

Copy link
Copy Markdown

Thanks @pablogsal for the PR 🌮🎉.. I'm working now to backport this PR to: 3.14, 3.15.
🐍🍒⛏🤖

Copy link
Copy Markdown

Sorry, @pablogsal, I could not cleanly backport this to 3.14 due to a conflict.

Please backport manually with cherry_picker, see the devguide for more information.

cherry_picker 0e75a0555731b9d7713d473e65b991f77316838c 3.14

bedevere-app Bot commented Oct 5, 2026

Copy link
Copy Markdown

GH-158817 is a backport of this pull request to the 3.15 branch.

bedevere-app Bot removed the needs backport to 3.15 pre-release feature fixes, bugs and security fixes label Oct 5, 2026

bedevere-app Bot commented Oct 5, 2026

Copy link
Copy Markdown

GH-158818 is a backport of this pull request to the 3.14 branch.

bedevere-app Bot removed the needs backport to 3.14 bugs and security fixes label Oct 5, 2026
pablogsal pushed a commit that referenced this pull request Oct 5, 2026
…8817)

Wait for workers to reach stable Python frames before sampling their stacks.
pablogsal added a commit that referenced this pull request Oct 5, 2026
…8818)

[3.14] gh-158574: Stabilize TLBC cache refresh tests (GH-158801)

Wait for workers to reach stable Python frames before sampling their stacks.
Adapt the backport to the 3.14 RemoteUnwinder API.

(cherry picked from commit 0e75a05)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip news tests Tests in the Lib/test dir

Projects

None yet

1 participant


Back | FazBrowse Home | New Git URL