google / google/oss-fuzz

Envoy Gateway: Help needed - Coverage build is failing after using `compile_native_go_fuzzer_v2`

Open
#14,263 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
Shell
Stars
12.6k
Forks
2.9k
Avg merge
2d 2h
Merged PRs (30d)
62

Description

After using the `compile_native_go_fuzzer_v2`, we encountered some issues with the fuzzing build. These were resolved using the suggestion provided here: [google/oss-fuzz#14190](https://github.com/google/oss-fuzz/issues/14190). Thanks for the help to resolve that! However, the coverage build is still failing.

**Reference:** [Build logs](https://oss-fuzz-build-logs.storage.googleapis.com/log-0d2856ed-1cbf-42cb-a096-c2951a771f1b.txt)

**Relevant log excerpt:**
```
Step #4: gcr.io/oss-fuzz-base/base-runner:latest
Finished Step #4
Starting Step #5
Step #5: Already have image (with digest): gcr.io/oss-fuzz-base/base-runner
Step #5: [/corpus/FuzzGatewayAPIToXDS.zip]
Step #5: End-of-central-directory signature not found. Either this file is not
Step #5: a zipfile, or it constitutes one disk of a multi-part archive. In the
Step #5: latter case the central directory and zipfile comment will be found on
Step #5: the last disk(s) of this archive.
Step #5: unzip: cannot find zipfile directory in one of /corpus/FuzzGatewayAPIToXDS.zip or
Step #5: /corpus/FuzzGatewayAPIToXDS.zip.zip, and cannot find /corpus/FuzzGatewayAPIToXDS.zip.ZIP, period.
Step #5: Failed to unpack the corpus for FuzzGatewayAPIToXDS. This usually means that corpus backup for a particular fuzz target does not exist. If a fuzz target was added in the last 24 hours, please wait one more day. Otherwise, something is wrong with the fuzz target or the infrastructure, and corpus pruning task does not finish successfully.

```

It appears that the coverage build is looking for a ZIP file for the corpus that does not exist.
We are currently using the `FuzzGatewayAPIToXDS_seed_corpus.zip` [naming pattern for the seed corpus file](https://github.com/envoyproxy/gateway/blob/2067f4cd3e418f245262719ad332862d4b144d04/test/fuzz/oss_fuzz_build.sh#L26), which previously worked without issues.

Looking for guidance on the possible cause of this problem.

Contributor guide

Open the contributing guide

Research direction

Start with the referenced coverage build log and test/fuzz/oss_fuzz_build.sh, especially the seed-corpus naming pattern for FuzzGatewayAPIToXDS. Trace why coverage requests a different corpus path, then verify that the expected corpus is produced or located and that the coverage build completes successfully.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, shell
Domain
build-system, testing
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.