Force Arena growth in UsageHint kMetadata test. - #940
Draft
copybara-service[bot] wants to merge 1 commit into
Draft
copybara-service[bot] wants to merge 1 commit into
copybara-service[bot] wants to merge 1 commit into
Conversation
copybara-service
Bot
force-pushed
the
test_982541454
branch
12 times, most recently
from
September 17, 2026 02:37
91a19ce to
73bf9ce
Compare
Root Cause: VerifyUsageHintkMetadataTest installed a fresh region factory, allocated 2 GiB with operator new, and asserted that the last region created carried UsageHint::kMetadata. That relied on the pagemap growth for the new range (64 leaves, 2.6 MB) forcing the Arena back to the system allocator. The Arena can already hold that much: an aligned per-CPU slab allocation goes through SystemAllocator::Allocate with the slab alignment and the returned actual_size includes the alignment slop, which becomes free_avail_. Exercise the intended path directly: after SetRegionFactory, request bytes_unallocated + 1 from the Arena, which cannot be satisfied by the current free area or any freelist block and therefore must obtain a new region with UsageHint::kMetadata. Drop the 2 GiB user allocation, the leak suppression and the now unused leak_check dependency. Before: 8/3000 and 12/3000 failures. After: 3000/3000 pass. PiperOrigin-RevId: 982541454
copybara-service
Bot
force-pushed
the
test_982541454
branch
from
September 17, 2026 02:47
73bf9ce to
40cc25f
Compare
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.
Force Arena growth in UsageHint kMetadata test.
Root Cause: VerifyUsageHintkMetadataTest installed a fresh region factory,
allocated 2 GiB with operator new, and asserted that the last region created
carried UsageHint::kMetadata. That relied on the pagemap growth for the new
range (64 leaves, 2.6 MB) forcing the Arena back to the system allocator. The
Arena can already hold that much: an aligned per-CPU slab allocation goes
through SystemAllocator::Allocate with the slab alignment and the returned
actual_size includes the alignment slop, which becomes free_avail_.
Exercise the intended path directly: after SetRegionFactory, request
bytes_unallocated + 1 from the Arena, which cannot be satisfied by the current
free area or any freelist block and therefore must obtain a new region with
UsageHint::kMetadata. Drop the 2 GiB user allocation, the leak suppression and
the now unused leak_check dependency.
Before: 8/3000 and 12/3000 failures. After: 3000/3000 pass.