Skip to content

Conversation

@maflcko
Copy link
Contributor

@maflcko maflcko commented Mar 25, 2025

As per the usual process to avoid wasted CI resources and timeouts when CI runs on large and presumed irrelevant inputs.

Normally, deletion of non-reduced fuzz inputs should happen after feature-freeze on the master Bitcoin Core branch, but before branch-off, so that the latest release branch retains mostly valid fuzz inputs.

Previous: #204

To "reproduce"

Install a fresh VM, as explained in the bash script's doc, and run it:

apt update && apt install curl -y
curl -L -O https://raw.githubusercontent.com/bitcoin-core/bitcoin-maintainer-tools/main/delete_nonreduced_fuzz_inputs.sh
bash delete_nonreduced_fuzz_inputs.sh

To "test"

  • Keep an eye on coverage stats, to ensure it doesn't drop
  • Re-run the script, to ensure it is "reproducible" to some extent
  • Anything else you think is important to test or review

CI

CI should pass, except for a lint failure, which should light up on any changes like this pull request, which delete fuzz inputs.

@maflcko
Copy link
Contributor Author

maflcko commented Mar 25, 2025

Storage device usage (du -sh ./fuzz_corpora/)

5.8G -> 2.7G

Determinism

  • ~125k fuzz input files deleted
git diff --stat origin/main..2b825cd506de7403c69ecf3e8a6f495b8dc1dcad | tail -1
 125400 files changed
  • Cross-diff with a second run of the script: 4k fuzz input files
git -c diff.renameLimit=2007 diff --stat HEAD..2b825cd506de7403c69ecf3e8a6f495b8dc1dcad | tail -1 
 3737 files changed

Coverage

@maflcko
Copy link
Contributor Author

maflcko commented Mar 25, 2025

The coverage run completed, but it looks like the coverage decreases in some lines. Not sure if this happened in the past.

For example, Assert(expect_work) is no longer hit, when comparing https://drahtbot.space/host_reports/DrahtBot/reports/coverage_fuzz/monotree/dfb7d58108daf372/c62dc520e0c7caee/fuzz.coverage/src/test/fuzz/txdownloadman.cpp.gcov.html and https://drahtbot.space/host_reports/DrahtBot/reports/coverage_fuzz/monotree/dfb7d58108daf372/2b825cd506de7403/fuzz.coverage/src/test/fuzz/txdownloadman.cpp.gcov.html

Not sure why this would happen, other than due to bitcoin/bitcoin#29018

@maflcko
Copy link
Contributor Author

maflcko commented Mar 25, 2025

Though, the cross-diff is at a historic low, so the result is one of the most deterministic ones (so far)

@maflcko
Copy link
Contributor Author

maflcko commented Mar 26, 2025

This is ready for review, now that CI passed, except for the expected 'lint' failure.

@marcofleon
Copy link
Contributor

Reviewing this now. About how long is the script expected to take?

@maflcko
Copy link
Contributor Author

maflcko commented Mar 27, 2025

Looking at the commit timestamps, it took around 4 hours, but it could be more or less, depending on your compute, memory and storage.

@marcofleon
Copy link
Contributor

Original: https://marcofleon.github.io/coverage/original_fuzz_corpora/
Reduced: https://marcofleon.github.io/coverage/reduced_fuzz_corpora/

Both coverage reports generated on the most commit in master. Looks generally good to me, there was a little drop in function coverage (e.g. chain.cpp, hash.cpp, rpc/server.cpp) but must just be some instability.

Corpora went from 5.7G to 2.7G.

@dergoegge dergoegge merged commit 12d26e3 into bitcoin-core:main Mar 27, 2025
3 of 4 checks passed
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.

3 participants