fuzz: oss-fuzz coverage build is failing #31770

issue fanquake opened this issue on January 31, 2025
  1. fanquake commented at 1:33 PM on January 31, 2025: member

    It first failed on the 25th (https://oss-fuzz-build-logs.storage.googleapis.com/log-7da28be4-dcf5-4e23-a6ca-153f67ad2f60.txt):

    Step [#7](/bitcoin-bitcoin/7/): warning: The file '/usr/evmap.c' isn't covered.
    Step [#7](/bitcoin-bitcoin/7/): error: /workspace/out/libfuzzer-coverage-x86_64/usr/arc4random.c: No such file or directory
    Step [#7](/bitcoin-bitcoin/7/): warning: The file '/usr/arc4random.c' isn't covered.
    Step [#7](/bitcoin-bitcoin/7/): error: /workspace/out/libfuzzer-coverage-x86_64/usr/buffer.c: No such file or directory
    Step [#7](/bitcoin-bitcoin/7/): warning: The file '/usr/buffer.c' isn't covered.
    Step [#7](/bitcoin-bitcoin/7/): error: /workspace/out/libfuzzer-coverage-x86_64/usr/util-internal.h: No such file or directory
    Step [#7](/bitcoin-bitcoin/7/): warning: The file '/usr/util-internal.h' isn't covered.
    Step [#7](/bitcoin-bitcoin/7/): [2025-01-31 07:01:44,276 DEBUG] Finished generating per-file code coverage summary.
    Step [#7](/bitcoin-bitcoin/7/): [2025-01-31 07:01:44,277 DEBUG] Generating file view html index file as: "/workspace/out/libfuzzer-coverage-x86_64/report/linux/file_view_index.html".
    Step [#7](/bitcoin-bitcoin/7/): Traceback (most recent call last):
    Step [#7](/bitcoin-bitcoin/7/):   File "/opt/code_coverage/coverage_utils.py", line 829, in <module>
    Step [#7](/bitcoin-bitcoin/7/):     sys.exit(Main())
    Step [#7](/bitcoin-bitcoin/7/):   File "/opt/code_coverage/coverage_utils.py", line 823, in Main
    Step [#7](/bitcoin-bitcoin/7/):     return _CmdPostProcess(args)
    Step [#7](/bitcoin-bitcoin/7/):   File "/opt/code_coverage/coverage_utils.py", line 780, in _CmdPostProcess
    Step [#7](/bitcoin-bitcoin/7/):     processor.PrepareHtmlReport()
    Step [#7](/bitcoin-bitcoin/7/):   File "/opt/code_coverage/coverage_utils.py", line 577, in PrepareHtmlReport
    Step [#7](/bitcoin-bitcoin/7/):     self.GenerateFileViewHtmlIndexFile(per_file_coverage_summary,
    Step [#7](/bitcoin-bitcoin/7/):   File "/opt/code_coverage/coverage_utils.py", line 450, in GenerateFileViewHtmlIndexFile
    Step [#7](/bitcoin-bitcoin/7/):     self.GetCoverageHtmlReportPathForFile(file_path),
    Step [#7](/bitcoin-bitcoin/7/):   File "/opt/code_coverage/coverage_utils.py", line 422, in GetCoverageHtmlReportPathForFile
    Step [#7](/bitcoin-bitcoin/7/):     assert os.path.isfile(
    Step [#7](/bitcoin-bitcoin/7/): AssertionError: "/usr/arc4random.c" is not a file.
    Step [#7](/bitcoin-bitcoin/7/): ********************************************************************************
    Step [#7](/bitcoin-bitcoin/7/): Code coverage report generation failed.
    Step [#7](/bitcoin-bitcoin/7/): To reproduce, run:
    Step [#7](/bitcoin-bitcoin/7/): python infra/helper.py build_image bitcoin-core
    Step [#7](/bitcoin-bitcoin/7/): python infra/helper.py build_fuzzers --sanitizer coverage bitcoin-core
    Step [#7](/bitcoin-bitcoin/7/): python infra/helper.py coverage bitcoin-core
    Step [#7](/bitcoin-bitcoin/7/): ********************************************************************************
    Finished Step [#7](/bitcoin-bitcoin/7/)
    ERROR
    ERROR: build step 7 "gcr.io/oss-fuzz-base/base-runner" failed: step exited with non-zero status: 1
    

    See also: https://issues.oss-fuzz.com/issues/391974928.

  2. davidgumberg commented at 3:30 AM on February 1, 2025: contributor

    Bisected to https://github.com/bitcoin/bitcoin/commit/5691fa93c48c5b2c767f19aad5e972e4d760414a (#31661),

    Can reproduce doing something like:

    # setup 
    git clone --depth 1 https://github.com/google/oss-fuzz.git
    git clone https://github.com/bitcoin/bitcoin oss-fuzz/bitcoin
    git clone --depth 1 https://github.com/bitcoin-core/qa-assets oss-fuzz/bitcoin/assets
    cd oss-fuzz
    python infra/helper.py build_image bitcoin-core
    
    # check out a commit hash for the local copy
    BAD_COMMIT=5691fa93c4
    GOOD_COMMIT=8fc7140846
    cd bitcoin && git checkout $BAD_COMMIT && cd ..
    
    python infra/helper.py build_fuzzers --sanitizer coverage bitcoin-core bitcoin/
    python infra/helper.py coverage bitcoin-core --fuzz-target psbt
    

    Probably related to using -ffile-prefix-map (https://github.com/bitcoin/bitcoin/pull/31661#discussion_r1923896475)

  3. fanquake added this to the milestone 29.0 on Feb 1, 2025
  4. hebasto commented at 2:57 PM on February 5, 2025: member

    A fix has been proposed in #31800.

  5. fanquake closed this on Feb 7, 2025

  6. fanquake referenced this in commit 81eb6cc2c6 on Feb 7, 2025
  7. bitcoin locked this on Feb 7, 2026

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-05-02 15:13 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me