gh-157660: Refresh cached TLBC arrays after growth - #157732
Open
liuzhijie-0614 wants to merge 3 commits into
Open
liuzhijie-0614 wants to merge 3 commits into
liuzhijie-0614 wants to merge 3 commits into
Conversation
Author
|
This is ready for review. The TLBC regression test passes locally, including repeated runs with frame caching enabled and disabled. The two failing CI jobs appear unrelated to this change, as noted above. |
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
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix persistent
Invalid tlbc_indexerrors when an existing thread grows a code object's TLBC array without changingtlbc_generation(#157660).When an index exceeds the cached capacity, refresh that entry once using direct remote reads, then retain the existing bounds checks and fallback. Ordinary cache loads continue to use paged reads.
The regression test uses
RemoteUnwinder.get_stack_trace()with all worker threads created before sampling. It verifies recovery with the same unwinder, correct line numbers, and both frame-cache settings.Validated on upstream main (
e2ff498), Linux x86-64, with a free-threaded debug build:./python -m test test_external_inspection --timeout=180: passed; 41 tests, 2 skipped.