Skip to content

Fuzz lock-step interleavings of two threads in the HugePageFiller and HPAA fuzzers. - #1034

Closed
copybara-service[bot] wants to merge 1 commit into
masterfrom
test_982885484
Closed

copybara-service[bot] wants to merge 1 commit into
masterfrom
test_982885484

Conversation

@copybara-service

Copy link
Copy Markdown

Fuzz lock-step interleavings of two threads in the HugePageFiller and HPAA fuzzers.

ReentrantSubprogram runs nested inside the operation that dropped
pageheap_lock, so it always finishes before that operation resumes. That
cannot produce two releases with trackers in flight at the same time, or a
release that completes while an earlier one is still parked, which is what
concurrent callers of ReleasePages do once it drops the lock.

Add ConcurrentSubprogram: its instructions run on a helper thread that
alternates with the main thread in lock-step. Whenever the allocator drops
pageheap_lock on one thread, the other runs until it drops the lock in turn or
finishes, so the schedule is deterministic and reproducible from the
instruction list. Model checks that assume nothing is in flight are skipped
while the helper is mid-operation and resume once it finishes.

ConcurrentReleasesOverlap pins this down for the filler: the helper parks
inside the unback of its first candidate, the main thread frees pages on
trackers the helper did not pin, releases them (stepping the helper at each
unback), and then frees every allocation, including those on the helper's
in-flight tracker.

… HPAA fuzzers.

ReentrantSubprogram runs nested inside the operation that dropped
pageheap_lock, so it always finishes before that operation resumes.  That
cannot produce two releases with trackers in flight at the same time, or a
release that completes while an earlier one is still parked, which is what
concurrent callers of ReleasePages do once it drops the lock.

Add ConcurrentSubprogram: its instructions run on a helper thread that
alternates with the main thread in lock-step.  Whenever the allocator drops
pageheap_lock on one thread, the other runs until it drops the lock in turn or
finishes, so the schedule is deterministic and reproducible from the
instruction list.  Model checks that assume nothing is in flight are skipped
while the helper is mid-operation and resume once it finishes.

ConcurrentReleasesOverlap pins this down for the filler: the helper parks
inside the unback of its first candidate, the main thread frees pages on
trackers the helper did not pin, releases them (stepping the helper at each
unback), and then frees every allocation, including those on the helper's
in-flight tracker.

PiperOrigin-RevId: 982885484
@copybara-service copybara-service Bot closed this Sep 23, 2026
@copybara-service
copybara-service Bot deleted the test_982885484 branch September 23, 2026 01:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant