-
Notifications
You must be signed in to change notification settings - Fork 2.2k
perf(fuzz): parallel stateless fuzzing #11842
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
yash-atreya
wants to merge
31
commits into
yash/shared-corpus
Choose a base branch
from
yash/parallel-fuzz
base: yash/shared-corpus
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
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
…tore the workers id that found the failure
…cally to prevent going over max_runs
…when not in tokio
…t_shrink_fuzz_failure
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.
Motivation
Stacked on #11769
Solution
SharedFuzzState
which consists of global values of runs, timer, fail_fast and rejects to determine whether the fuzz testshould_continue
using theSharedFuzzState::should_continue
SharedFuzzState
timeout
specified infoundry.toml
is applied to each worker as-is to fit as many runs as possible i.e,timeout
value is NOT divided by number of workers.fuzz.runs
config value is divided by the number of workers i.e,worker_runs = fuzz.runs / num_worker
— reducing the time required for the campaignfuzz.seed
set in config is altered per worker so that the workers are covering different inputs. Forworker0 / master
worker, the provided seed is used as is. For workers withWorkerID > 0
, the seed is set tokeccak256(fuzz.seed || WorkerID)
SYNC_INTERVAL
is naively set to1000
, we can adjust this after some more empirical feedbackTODO
max_rejects
inSharedFuzzState
to track total rejects across workers and fail accordingly 40263fdrun_worker
viaSharedState::try_claim_failure
- This will intercept other workers as well and stop fuzzing entirely e4c6060sync_interval
for theWorkerCorpus
and callWorkerCorpus::sync
ed234d8GlobalCorpusMetrics
and sync worker corpus metrics d973b79--jobs
e991826fn fuzz
and run workers usingrayon::IntoParallelIterator
Benchmarks
With coverage-guided fuzzing enabled:
PR Checklist