Skip to content

Optimize fuzzing runs for memory - #680

Merged
alejandro-vaz merged 1 commit into
servo:v2from
pedrodesu:allow_longer_fuzzing
Sep 28, 2026
Merged

alejandro-vaz merged 1 commit into
servo:v2from
pedrodesu:allow_longer_fuzzing

Conversation

@pedrodesu

@pedrodesu pedrodesu commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

As observed in #677, the fuzzer currently runs OOM before the expected 30 minutes. This PR intends to fix this problem: It lets the fuzzer use 4GB of memory instead of the default 2GB (the default GitHub actions runner gives us about 7GB to work with, so this should be acceptable) and divides the 30 minutes of fuzzing between 6 consecutive batches of 5 minute runs. This is because ASan often times doesn't actually free memory but instead marks it as available (and indeed, the log shows big chunks of memory being kept allocated. This shouldn't be a fuzzing problem as we clamp all operations and arrays to a max of 255 elements). With this PR, everything is freed periodically and the fuzzer has double the memory to work with, which should mean the 30 minutes are ran without problems.

@pedrodesu

Copy link
Copy Markdown
Contributor Author

I'm guessing that if this is approved and works, it'll probably be a good idea to also migrate it to v1.

@pedrodesu pedrodesu changed the title ci: fuzzing now runs in 6 5-minute batches with more allowed memory Optimize fuzzing runs for memory Sep 28, 2026
@alejandro-vaz

Copy link
Copy Markdown
Collaborator

yeah let's migrate this to v1 @bolshoytoster

thanks @pedrodesu

@alejandro-vaz
alejandro-vaz added this pull request to the merge queue Sep 28, 2026
Merged via the queue into servo:v2 with commit aa2537f Sep 28, 2026
8 checks passed
bolshoytoster added a commit to bolshoytoster/rust-smallvec that referenced this pull request Sep 28, 2026
@pedrodesu
pedrodesu deleted the allow_longer_fuzzing branch September 28, 2026 10:22
alejandro-vaz pushed a commit that referenced this pull request Sep 28, 2026
* Port new fuzzer to v1

* Just copy the workflows from v2 (probably won't work)

* Add iai-callgrind as a dev-dependency

* Add callgrind profile

* Add callgrind benches

* Change fuzz back to edition = "2018"

* Update the right version this time

* Change fuzz edition back to 2018

* Remove callgrind benches

* Fix tests on MSRV

* Didn't mean to commit that

* Port #680

* Change fuzz dependency syntax
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.

2 participants