Report fuzzer runner aborts instead of an opaque status.tsv FileNotFoundError by groeneai · Pull Request #107676 · ClickHouse/ClickHouse · GitHub
Skip to content

Report fuzzer runner aborts instead of an opaque status.tsv FileNotFoundError#107676

Merged
alexey-milovidov merged 3 commits into
ClickHouse:masterfrom
groeneai:groeneai/fix-fuzzer-runner-missing-status-tsv
Jun 22, 2026
Merged

Report fuzzer runner aborts instead of an opaque status.tsv FileNotFoundError#107676
alexey-milovidov merged 3 commits into
ClickHouse:masterfrom
groeneai:groeneai/fix-fuzzer-runner-missing-status-tsv

Conversation

@groeneai

Copy link
Copy Markdown
Contributor

Changelog category (leave one):

  • CI Fix or Improvement (changelog entry is not required)

Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):

...

Description

When the AST/BuzzHouse fuzzer process is killed before it writes status.tsv (job timeout, OOM, or a docker/orchestration failure), run_fuzz_job reported an opaque Unknown error in fuzzer runner script followed by a FileNotFoundError traceback. That gives no hint of the real abort cause and reads like a code crash, even though it is a CI-infrastructure flake that a re-run clears. Over the last 7 days this surfaced as spurious red BuzzHouse (*) / AST fuzzer (*) checks across ~18 unrelated PRs (and master), typically with only one of the four BuzzHouse builds failing on a given SHA while the other three pass on the identical commit.

This change distinguishes the two cases:

  • Missing or empty status.tsv (the runner aborted before reporting): emit an actionable message that says the runner aborted before producing status, explains it is a CI-infrastructure issue rather than a fuzzer finding (a real finding writes status.tsv with a FAIL status and a stack trace), and inlines the tail of the fuzzer.log / server.log / stderr.log artifacts so the underlying abort cause is visible.
  • Malformed status.tsv (a genuine harness bug): keep the traceback for debugging.

The status stays ERROR so the check is still red and a maintainer re-runs it; no auto-retry signal is invented (praktika has no retry path for python-callable jobs).

The parsing and message formatting are extracted into dependency-free helpers (_read_fuzzer_status, _format_status_error, _log_tail) and covered by unit tests in ci/tests/test_e2e.py (valid / missing / empty / malformed status, and the infra-vs-harness message shape).

No related open issue found (searched the status.tsv / ast_fuzzer_job signature on 2026-06-16).

…undError

When the AST/BuzzHouse fuzzer process is killed before it writes status.tsv
(job timeout, OOM, or a docker/orchestration failure), run_fuzz_job used to
fail with an opaque "Unknown error in fuzzer runner script" FileNotFoundError
traceback. That gives no hint of the real abort cause and reads like a code
crash, even though it is a CI-infrastructure flake that a re-run clears.

Distinguish a missing/empty status.tsv (runner aborted early -> infra) from a
malformed status.tsv (a real harness bug) and, for the former, emit an
actionable message that says the runner aborted before reporting and inlines
the tail of the fuzzer/server/stderr logs so the abort cause is visible. The
malformed case keeps the traceback. Status stays ERROR so the check is still
red and a maintainer re-runs it.

The parsing and message formatting are extracted into dependency-free helpers
(_read_fuzzer_status, _format_status_error, _log_tail) and covered by unit
tests in ci/tests/test_e2e.py.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@groeneai

Copy link
Copy Markdown
Contributor Author

@groeneai

Copy link
Copy Markdown
Contributor Author

cc @george-larionov — could you review this? It makes run_fuzz_job report a missing/empty status.tsv as a CI-infra abort (with the fuzzer/server log tails inlined) instead of the opaque FileNotFoundError traceback, while keeping the traceback for a genuinely malformed status.tsv. Refines the early-abort try/except you added in 937f5ff.

@nikitamikhaylov nikitamikhaylov added the can be tested Allows running workflows for external contributors label Jun 17, 2026
@clickhouse-gh

clickhouse-gh Bot commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

@clickhouse-gh clickhouse-gh Bot added the pr-ci label Jun 17, 2026
Comment thread ci/jobs/ast_fuzzer_job.py Outdated
A missing status.tsv does not uniquely mean CI infrastructure. run-fuzzer.sh
runs under 'set -e' and writes status.tsv only at the very end, so any earlier
failure (a server startup failure where the pid file is never created, a
fuzzer-harness error, or an infra timeout/OOM/docker problem) also reaches the
read site. Asserting infra and 'a re-run usually clears it' would hide a real
server-startup or harness regression.

Reword the missing-status branch to list the possible causes neutrally and
direct the reader to the inlined log tails to determine the actual cause,
without claiming infra or suggesting a re-run. The malformed-status branch is
unchanged. Rename the unit test to assert the neutral shape (no infra claim,
no 're-run').

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Comment thread ci/jobs/ast_fuzzer_job.py Outdated
run-fuzzer.sh writes only the three numeric fields (server_died,
server_exit_code, fuzzer_exit_code) to status.tsv. The FAIL verdict and
stack trace are produced later by run_fuzz_job / FuzzerLogParser after a
complete status file is parsed. The diagnostic said a finding "writes
status.tsv with a FAIL status and a stack trace", which mis-described the
contract; reword it to say a finding writes a complete status.tsv that is
then reported as FAIL from the logs.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@alexey-milovidov alexey-milovidov self-assigned this Jun 22, 2026
@alexey-milovidov alexey-milovidov added this pull request to the merge queue Jun 22, 2026
Merged via the queue into ClickHouse:master with commit f376b6f Jun 22, 2026
165 checks passed
@robot-ch-test-poll robot-ch-test-poll added the pr-synced-to-cloud The PR is synced to the cloud repo label Jun 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

can be tested Allows running workflows for external contributors manual approve Manual approve required to run CI pr-ci pr-synced-to-cloud The PR is synced to the cloud repo

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants