Skip to content

ci: fix fuzz workflow - replace missing local-build.sh with fuzz.sh#108

Merged
chrisgleissner merged 4 commits into
mainfrom
fix/ci-fuzz
Mar 18, 2026
Merged

ci: fix fuzz workflow - replace missing local-build.sh with fuzz.sh#108
chrisgleissner merged 4 commits into
mainfrom
fix/ci-fuzz

Conversation

@chrisgleissner

Copy link
Copy Markdown
Owner

Problem

The nightly c64script-fuzz CI workflow (fuzz.yml) failed with:

./local-build.sh: No such file or directory
Exit code: 127

Root Cause Analysis

Six candidate failure modes were investigated:

Candidate Verdict
local-build.sh exists? CONFIRMED ABSENT — has never existed in this repo
Working directory mismatch Ruled out — actions/checkout@v4 uses repo root
Incorrect checkout config Ruled out — no fetch-depth issue
Script permissions Moot — file does not exist
Platform differences Not applicable — ubuntu-latest is Linux
File absent on this branch only Ruled out — never existed on any branch

Primary root cause: The workflow called ./local-build.sh linux which has never existed. The actual build entrypoint is ./build (no .sh extension, no local- prefix). The self-contained fuzz script is ./tests/script/fuzz/fuzz.sh.

Secondary issue: Even if the script name were corrected to ./build, the plain ubuntu-latest runner lacks libobs-dev headers required by cmake for the fuzz target (c64script_fuzz and tests/CMakeLists.txt both link against OBS::libobs).

Fix

Changed .github/workflows/fuzz.yml:

  1. Expanded install step to add libobs-dev, libcurl4-openssl-dev, libsimde-dev, cmake, ninja-build — all required by the fuzz cmake build on a plain ubuntu runner.
  2. Added pre-flight validation step — prints pwd, lists fuzz.sh, asserts it is executable. Fails fast with a clear error if the script is missing.
  3. Replaced ./local-build.sh linux with ./tests/script/fuzz/fuzz.sh — the self-contained fuzz entrypoint that handles cmake configure, build, fuzz run, and artifact collection.
  4. Removed RUN_FUZZ: "1" env var — not consumed by fuzz.sh; the correct vars FUZZ_TIME_SECONDS: "14400" and FUZZ_JOBS: "2" are already set and directly consumed by fuzz.sh.

Verification

  • local-build.sh confirmed absent: find returned no results anywhere in the repo.
  • ./tests/script/fuzz/fuzz.sh confirmed executable: -rwxrwxr-x.
  • libobs-dev confirmed available in ubuntu 24.04 standard apt (universe): version 30.0.2+dfsg-3build1.
  • fuzz.sh confirmed to consume FUZZ_TIME_SECONDS/FUZZ_JOBS env vars (lines 125–126).
  • Only fuzz.yml is modified — no other files changed.

The nightly fuzz workflow called ./local-build.sh which has never existed
in this repository. The actual build entrypoint is ./build (no extension)
and the self-contained fuzz script is tests/script/fuzz/fuzz.sh.

Root cause analysis:
- ./local-build.sh: does not exist, exit 127
- plain ubuntu-latest runner lacks libobs-dev headers required by cmake
  (both c64script_fuzz and tests/CMakeLists.txt link OBS::libobs)

Fix:
- Replace Install clang/LLVM step with Install dependencies that adds
  libobs-dev, libcurl4-openssl-dev, libsimde-dev, cmake, ninja-build
- Add Validate script exists preflight step (pwd, ls, test -x)
- Replace ./local-build.sh linux with ./tests/script/fuzz/fuzz.sh
- Remove RUN_FUZZ=1 env var (not consumed by fuzz.sh; FUZZ_TIME_SECONDS
  and FUZZ_JOBS are passed directly and already correct)
Copilot AI review requested due to automatic review settings March 18, 2026 14:07

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes the nightly c64script-fuzz GitHub Actions workflow by switching it to the repository’s actual fuzzing entrypoint script and installing the required build dependencies so the fuzz target can build on a stock Ubuntu runner.

Changes:

  • Replace the nonexistent ./local-build.sh linux invocation with ./tests/script/fuzz/fuzz.sh.
  • Expand apt dependencies to include CMake/Ninja and required development headers (OBS, curl, simde).
  • Add a pre-flight step to validate that fuzz.sh is present and executable; remove unused RUN_FUZZ env var.

Comment thread .github/workflows/fuzz.yml
Comment thread .github/workflows/fuzz.yml Outdated
chrisgleissner and others added 3 commits March 18, 2026 16:04
- fuzz.sh: accept positional arg ./fuzz.sh [seconds] overriding FUZZ_TIME_SECONDS
- fuzz.sh: tee all libFuzzer output to console AND log (live CI visibility)
- fuzz.sh: add start/end banners with configured and actual durations
- fuzz.sh: add three hard failure guards:
  - empty log (binary produced no output)
  - no libFuzzer markers (no #N/exec/s/INFO: in log)
  - runtime < 50% of expected with no crashes (silent early exit)
- fuzz.yml: add workflow_dispatch input fuzz_time_seconds (default 120s)
- fuzz.yml: schedule runs use 14400s; dispatch uses input value
- fuzz.yml: remove continue-on-error (guards now enforce correctness)
- fuzz.yml: add Inspect fuzz artifacts step (corpus/crash counts, log tail, report)
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@chrisgleissner chrisgleissner merged commit 3d6517d into main Mar 18, 2026
@chrisgleissner chrisgleissner deleted the fix/ci-fuzz branch March 18, 2026 16:26
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.

2 participants