Fuzz lock-step interleavings of two threads in the HugePageFiller and HPAA fuzzers. - #1034
Closed
copybara-service[bot] wants to merge 1 commit into
Closed
copybara-service[bot] wants to merge 1 commit into
copybara-service[bot] wants to merge 1 commit into
Conversation
… 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
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.
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.