Repository navigation
Split libFuzzer corpus minimization into its own weekly workflow - #117145
Conversation
Every nightly `libFuzzer tests` run first minimizes each corpus with libFuzzer's `-merge=1`, which replays every unit to find the subset that preserves coverage, and only then starts fuzzing. That is a fixed amount of work proportional to the corpus, and it is taken out of the same budget the target then has left. In the 2026-08-30 run it cost `clickhouse_fuzzer` 38 minutes and `execute_query_fuzzer` 25 minutes; those two targets are already the ones that never reach mutation. Meanwhile the corpora it produced were 10845 units out of 10931 and 4436 out of 4445 - about 1% removed, for work that is repeated in full every single night. Minimization now runs in `WeeklyFuzzersCorpus` on Sunday at 13:13 UTC, and the nightly job always runs with `SKIP_MERGE=1`. The two workflows both read-modify-write the corpora in the artifact bucket, so the schedule is chosen to keep them apart: `NightlyFuzzers` starts at 03:13 UTC and is long finished by then. The check script grows a `--minimize-only` mode for the new job: it minimizes, uploads the result and reports the reduction, with no fuzzing phase. Corpus minimization results now also count towards the `OK` total in the job summary, which otherwise would read `OK: 0` for the minimization job.
|
Workflow [PR], commit [41f990f] Summary: ✅ AI ReviewSummaryThis PR splits libFuzzer corpus minimization out of the nightly job into a new weekly workflow and adds a Findings
Final Verdict |
| workflow_dispatch: | ||
|
|
||
| concurrency: | ||
| group: ${{ github.workflow }} |
There was a problem hiding this comment.
This still leaves the corpus with two unsynchronized writers. Generated schedule workflows also expose workflow_dispatch, and concurrency.group: ${{ github.workflow }} only serializes WeeklyFuzzersCorpus with itself, not with NightlyFuzzers. Since both workflows do a full download / mutate / upload of the same fuzzer/corpus/*.zip keys, a delayed nightly run or a manual dispatch on master will race here and the last upload wins, dropping the other run's corpus updates. This needs a cross-workflow lock or shared concurrency group around the corpus read-modify-write, not just separated cron slots.
| ), | ||
| requires=[ArtifactNames.ARM_FUZZERS, ArtifactNames.FUZZERS_CORPUS], | ||
| digest_config=Job.CacheDigestConfig( | ||
| include_paths=["./ci/jobs/libfuzzer_test_check.py"], |
There was a problem hiding this comment.
libfuzzer_test_check.py bind-mounts repo_path/tests and executes /usr/share/clickhouse-test/fuzz/runner.py, but this digest only hashes ./ci/jobs/libfuzzer_test_check.py. A follow-up commit that changes only tests/fuzz/runner.py can therefore reuse a stale cached success and skip this job even though its behavior changed. Please include at least ./tests/fuzz/runner.py in this digest, and mirror the same fix in libfuzzer_job above.
| id: run | ||
| run: | | ||
| . ./ci/tmp/praktika_setup_env.sh | ||
| PYTHONUNBUFFERED=1 python3 -m praktika run 'Dockers Build (amd)' --workflow "WeeklyFuzzersCorpus" --ci --timestamp |
There was a problem hiding this comment.
It is strange that we can't just use the latest build from master and rebuild it again.
|
It will not be triggered in PR CI anyway so we need to check the real one on Sunday. |
…n job After #117145 the nightly fuzzing run sets `SKIP_MERGE=1` and corpus minimization runs in the weekly `libFuzzer corpus minimization` job, so the `MINIMIZATION_TIMEOUT` plumbing in `tests/fuzz/runner.py` no longer has anything to bound. The minimize-only job now simply gets the one-hour cap through `TIMEOUT`, keeping its behavior unchanged while the fuzzing job moves to five hours. The job timeout drops from seven to six hours, because the fuzzing job no longer contains a minimization phase. Six hours does not exceed GitHub's default limit, so the generated `nightly_fuzzers.yml` does not change, which also fixes the `Check Workflows` failure: https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=117143&sha=8f63aa320e7dc99a472dddd42707fbe8108d57d0&name_0=PR&name_1=Config%20Workflow #117143
…_ARTIFACT_BUCKET` Master (#117145) made `main` read `args.minimize_only`, while this branch had dropped the `args` binding as unused, so the textually clean merge would have raised `NameError`. It also moved the corpus location to `Settings.S3_ARTIFACT_BUCKET`; the orphan-corpus warning now names the same bucket.
Every nightly
libFuzzer testsrun first minimizes each corpus with libFuzzer's-merge=1, which replays every unit to find the subset that preserves coverage, and only then starts fuzzing. That is a fixed amount of work proportional to the corpus, and it is taken out of the same budget the target then has left. In the 2026-08-30 run it costclickhouse_fuzzer38 minutes andexecute_query_fuzzer25 minutes; those two targets are already the ones that never reach mutation. Meanwhile the corpora it produced were 10845 units out of 10931 and 4436 out of 4445 - about 1% removed, for work that is repeated in full every single night.Minimization now runs in a new
WeeklyFuzzersCorpusworkflow on Sunday at 13:13 UTC, and the nightly job always runs withSKIP_MERGE=1. The two workflows both read-modify-write the corpora in the artifact bucket, so the schedule is chosen to keep them apart:NightlyFuzzersstarts at 03:13 UTC and is long finished by then.The check script grows a
--minimize-onlymode for the new job: it minimizes, uploads the result and reports the reduction, with no fuzzing phase. Corpus minimization results now also count towards theOKtotal in the job summary, which otherwise would readOK: 0for the minimization job.Related: #117143
Related: #117142
Changelog category (leave one):
Workflow [PR]
Sync PR [sync-upstream/pr/117145]
Version info
26.9.1.461(included in26.9and later)