oss-fuzz icon indicating copy to clipboard operation
oss-fuzz copied to clipboard

infra: print log data when Python fuzz_target fails

Open correctmost opened this issue 1 year ago • 1 comments

This will make it easier to debug coverage failures that are not reproducible locally.

The failure that I am trying to debug:

  • https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=62231
    • https://oss-fuzz-build-logs.storage.googleapis.com/log-c420cf0c-f073-4c42-b75c-422971ef272e.txt
Step #5: Already have image (with digest): gcr.io/oss-fuzz-base/base-runner
Step #5: Entering python fuzzing
Step #5: Error happened getting coverage of fuzz_parse
Step #5: This is likely because Atheris did not exit gracefully

Similar log data is displayed in other blocks: https://github.com/google/oss-fuzz/blob/f7165902492d5cff5ee23c018875395061a3bd2b/infra/base-images/base-runner/coverage#L101-L105

https://github.com/google/oss-fuzz/blob/f7165902492d5cff5ee23c018875395061a3bd2b/infra/base-images/base-runner/coverage#L149-L153

https://github.com/google/oss-fuzz/blob/f7165902492d5cff5ee23c018875395061a3bd2b/infra/base-images/base-runner/coverage#L206-L210

https://github.com/google/oss-fuzz/blob/f7165902492d5cff5ee23c018875395061a3bd2b/infra/base-images/base-runner/coverage#L255-L260

correctmost avatar Aug 26 '24 20:08 correctmost

/gcbrun trial_build.py python --sanitizer coverage address --fuzzing-engine atheris

DonggeLiu avatar Aug 26 '24 23:08 DonggeLiu

It looks like my branch name is causing issues:

ERROR: (gcloud.builds.submit) INVALID_ARGUMENT: invalid build: invalid build tag "testing-cm/display-coverage-log": must match format "^[\\w][\\w.-]{0,127}$"

I recreated the PR with a different branch name: https://github.com/google/oss-fuzz/pull/12502

correctmost avatar Sep 15 '24 19:09 correctmost