Skip to content

fuzz: Use serial task runner to increase fuzz stability

Leaking a scheduler with a non-empty queue from the fuzz initialization phase into the fuzz target execution phase is problematic, because it messes with coverage data. This in turn is problematic, because it leads to:

  • Decrease in fuzz target execution stability (non-determinism when running the fuzz target).
  • Decrease in fuzz input merge stability (non-determinism when selecting a minimum set of fuzz input to reach maximum coverage), which leads to qa-assets bloat.

Fix one such issue. Tracking issue: https://github.com/bitcoin/bitcoin/issues/29018

Can be tested via https://github.com/bitcoin/bitcoin/pull/31836: RUST_BACKTRACE=1 cargo run --manifest-path ./contrib/devtools/deterministic-fuzz-coverage/Cargo.toml -- $PWD/bld-cmake $PWD/../b-c-qa-assets/fuzz_corpora/ partially_downloaded_block.

The failure is non-deterministic (obviously) and will show coverage in validation signals such as UpdatedBlockTip before this change and will have this one fixed after this change.

Merge request reports

Loading