Skip to content

Introducing a new fuzzer check in the ClickHouse CI for my dear friend - #94148

Merged
PedroTadim merged 21 commits into
masterfrom
ci_dolor
Nov 2, 2026
Merged

PedroTadim merged 21 commits into
masterfrom
ci_dolor

Conversation

@maxknv

@maxknv maxknv commented Jan 14, 2026 •

Copy link
Copy Markdown
Member

Changelog category (leave one):

  • Not for changelog (changelog entry is not required)

Replace the BuzzHouse CI job with La Casa Del Dolor, in the master and pull_request workflows. BuzzHouse still generates the load, but against a randomized multi-node cluster instead of a single server. The job runs when the fuzzers change, now including programs/client/.

The job (ci/jobs/lacasadeldolor_job.py) runs tests/casa_del_dolor/dolor.py in the integration tests runner, with the same docker-in-docker containment and volume clean-up hook as the integration test jobs. Each run draws:

  • disks, storage policies, filesystem caches, locales and time zones;
  • a parallel replicas cluster;
  • some of Azurite, PostgreSQL, MySQL, SQLite, MongoDB, Redis and nginx;
  • server restarts and kills, which are off on sanitizer builds;
  • the SharedMergeTree disk in private CI.

The servers use ci/jobs/scripts/server_fuzzer/config.xml and share the AST fuzzer's experimental feature gates and its server-side AST fuzzer caps.

Failure detection: the log analysis of ast_fuzzer_job.py moves into a shared analyze_job_logs(), which both jobs use. On top of it, the job:

  • names the failures dolor.py reports itself (a shutdown that hung or had to be forced, a load generator that died);
  • scans the Keeper logs, since the Keepers run the tested binary;
  • collects core dumps;
  • stops a hung run with a wall-clock watchdog.

It attaches every node's logs and the effective randomized configs.

Cluster helpers (tests/integration/helpers/cluster.py): keep the server exec id and its exit code across stops, take a gdb backtrace before force killing a server whose graceful stop hung, and skip the Detect passwords in tests rule for Dolor, whose fuzzed DDL carries the test credentials.

Dolor:

  • A final shutdown that had to be forced fails the run.
  • A logical error, fatal message or sanitizer report in the server logs fails the run, while the watchdog's expected <Fatal> for an intentional kill is ignored.
  • The load generator reconnects across a deliberate restart.
  • Distributed sends are stopped before a shutdown.
  • The generated settings and disk elements are ones the server accepts.

Workflow [PR]
Sync PR [sync-upstream/pr/94148]

Version info

  • Merged into: 26.11.1.1124-master (included in 26.11 and later)

@maxknv maxknv added the do not test disable testing on pull request label Jan 14, 2026
@maxknv
maxknv marked this pull request as draft January 14, 2026 11:15
@clickhouse-gh

clickhouse-gh Bot commented Jan 14, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [ec5d081]

Summary: ✅


AI Review

Summary

This PR replaces the BuzzHouse CI job with La Casa del Dolor, randomizes its environment, and adds restart, shutdown, Keeper, and artifact handling. Request changes: the new job can pass a genuine sanitizer finding when an OOM is also present, and its rotated-log fallback does not recover failures hidden from the current logs. Both concerns overlap existing review threads; no duplicate inline comments were posted. Reviewed head: ec5d0815b457087dbeeee12890c731b8da257d9d.

Missing context / blind spots
  • ⚠️ The full Docker job was not run locally. The fetched La Casa del Dolor CI reports contained zero test results, so they do not establish successful execution of the randomized lifecycle. Completed debug and sanitizer runs with their artifacts would close this gap. Focused reproductions below exercised the actual Python classifiers.
Findings
  • ⚠️ Major: An accepted OOM must not erase an independent sanitizer finding. ci/jobs/ast_fuzzer_job.py:447, ci/jobs/lacasadeldolor_job.py:339. [dismissed by author -- https://github.com/Introducing a new fuzzer check in the ClickHouse CI for my dear friend #94148#discussion_r2919212628]

    Still real on this head: with both runtime error: signed integer overflow and AddressSanitizer: out-of-memory in stderr.log, analyze_job_logs returns OK. Given Dolor's Sanitizer error in instance record, _classify_dolor_failure then returns no failure because passed_as_oom suppresses that record. This was reproduced alongside an OOM-only control. A UBSan finding can therefore pass CI. Before accepting OOM, check for independent failure evidence and preserve that evidence through the wrapper's classification.

  • ⚠️ Major: A failure in a rotated server log must retain its identity. ci/jobs/lacasadeldolor_job.py:742. Existing rotated-log finding.

    _rotated_node_failure runs only when result.results is empty. However, when the current logs contain no report, FuzzerLogParser returns the truthy name Unknown error, which analyze_job_logs adds as a failing subresult. The guard therefore skips the fallback precisely when it is needed. Reproduced with clean current logs and a logical error in server.log.0.gz: the result remains Unknown error, while calling the fallback directly identifies the logical error. This loses the failure's diagnostic identity and grouping after a restart. Treat an unknown result as unclassified and consult rotations before finalizing it.

Final Verdict

⚠️ Request changes. Preserve independent sanitizer failures when accepting OOM, and allow rotated-log classification to replace an unknown current-log result.

@clickhouse-gh clickhouse-gh Bot added the pr-not-for-changelog This PR should not be mentioned in the changelog label Jan 14, 2026
@alexey-milovidov alexey-milovidov changed the title For Pedro Introducing a new fuzzer check in the ClickHouse CI for my dear friend Jan 14, 2026
@PedroTadim PedroTadim removed the do not test disable testing on pull request label Feb 13, 2026
@PedroTadim
PedroTadim marked this pull request as ready for review February 16, 2026 16:33
Comment thread ci/jobs/ast_fuzzer_job.py Resolved
Comment thread tests/casa_del_dolor/generators.py Resolved
Comment thread ci/jobs/lacasadeldolor_job.py Resolved
Comment thread ci/jobs/lacasadeldolor_job.py Resolved
Comment thread ci/jobs/lacasadeldolor_job.py Resolved
Comment thread ci/defs/job_configs.py Resolved
Comment thread tests/casa_del_dolor/dolor.py Resolved
Comment thread ci/jobs/ast_fuzzer_job.py Resolved
Comment thread ci/jobs/lacasadeldolor_job.py Resolved
Comment thread ci/jobs/buzzhouse_job.py Resolved
Comment thread ci/defs/job_configs.py Resolved
Comment thread tests/integration/helpers/cluster.py Resolved
Comment thread ci/jobs/scripts/check_ci.py Resolved
Comment thread ci/jobs/lacasadeldolor_job.py Resolved
Comment thread ci/jobs/scripts/log_parser.py Resolved
Comment thread ci/jobs/scripts/check_ci.py Resolved
Comment thread ci/jobs/ast_fuzzer_job.py Resolved
Comment thread ci/jobs/scripts/check_ci.py Resolved
Comment thread ci/jobs/lacasadeldolor_job.py Resolved
Comment thread ci/jobs/scripts/log_parser.py Resolved
Comment thread ci/jobs/lacasadeldolor_job.py Resolved
Comment thread ci/jobs/scripts/log_parser.py Resolved
Comment thread tests/casa_del_dolor/dolor.py Resolved
Comment thread tests/integration/helpers/cluster.py Resolved
Comment thread tests/casa_del_dolor/dolor.py Resolved
Comment thread ci/jobs/ast_fuzzer_job.py Resolved
Comment thread ci/jobs/scripts/check_ci.py Resolved
Comment thread ci/jobs/lacasadeldolor_job.py Resolved
Comment thread ci/jobs/ast_fuzzer_job.py Resolved
Comment thread tests/casa_del_dolor/dolor.py Resolved
Comment thread ci/jobs/ast_fuzzer_job.py Resolved
Comment thread ci/jobs/ast_fuzzer_job.py Resolved
Comment thread tests/integration/helpers/cluster.py Resolved
Comment thread ci/jobs/lacasadeldolor_job.py Resolved
Comment thread ci/jobs/scripts/log_parser.py Resolved
Comment thread tests/casa_del_dolor/binary.py Resolved
Comment thread tests/casa_del_dolor/dolor.py Resolved
PedroTadim and others added 3 commits October 22, 2026 10:49
# Conflicts:
#	ci/defs/job_configs.py
#	tests/casa_del_dolor/dolor.py
#	tests/casa_del_dolor/properties.py
The only conflict was the generated `.github/workflows/pull_request.yml` (the `needs` list of
`finish_workflow`: the branch's `La Casa Del Dolor` jobs against master's new `fast_test_arm_darwin`).
Regenerated with `python3 -m praktika yaml`.

#94148

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Comment thread ci/jobs/lacasadeldolor_job.py Resolved
PedroTadim and others added 2 commits October 30, 2026 14:51
A Keeper that aborts is restarted by its compose service, and its error log rotates on (100M,
gzip), so the fatal record can survive only in `clickhouse-keeper.err.log.N.gz`. The job copied and
scanned only the current Keeper files, so such a run passed. The Keeper rotations are now copied
with the other logs, and `_keeper_failure` reads the error log with its rotations decompressed in
front of it.

The server logs rotate on every restart. `dolor.py` already greps the rotations and fails the run,
but `analyze_job_logs` names the failure from the current log only, which belongs to the last
server, so a crash before a restart failed the run with no name. When the analysis fails the run
without naming it, the job now parses the server log (then the error log) with its rotations.

#94148

Co-Authored-By: Claude Opus 5.5 <[email protected]>
`DOLOR_RUN_MINUTES` sets both `dolor.py --timeout` and the `time_to_run` of BuzzHouse, which must
match. `generate_buzz_config` takes the run time as an optional argument, so the BuzzHouse job keeps
its 30 minutes (60 on extended runs).

#94148

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Comment thread ci/jobs/lacasadeldolor_job.py Resolved
Dolor starts its servers in the foreground through `docker exec` with no
working directory, and `BaseDaemon` only changes to `core_path` for daemon
launches, so CI's relative `kernel.core_pattern` put a core in the
container's `/`: not writable by the server's user, and gone anyway with
`docker compose down --volumes`. The Keepers ran in `/` too.

- Start the first server and its replacements in
  `/var/log/clickhouse-server/cores`, and the Keepers in
  `/var/log/clickhouse-keeper/cores`, both inside the host-mounted log
  directories. Other clusters keep `/`.
- Run the BuzzHouse client in the workspace, where `collect_cores` already
  looks, instead of the repository root.
- Collect only the `cores` directories instead of every `core.*` under the
  instance directories, which could also match table files.

Addresses the review on #94148

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Comment thread tests/casa_del_dolor/generators.py Resolved
PedroTadim and others added 2 commits October 30, 2026 15:41
…lute

The load generator now runs in `--tmp-files-dir` so its cores are
collected, which broke a relative `--client-binary` (looked up in that
directory instead of the invocation one) and, for a relative
`--tmp-files-dir`, the BuzzHouse config and query log paths built from it.
Make both absolute right after parsing, against the invocation directory.
`absolute`, not `resolve`, keeps a symlink's name, which picks the tool
the binary runs as.

Addresses the review on #94148

Co-Authored-By: Claude Opus 5.5 <[email protected]>
A relative `--with-unity` was looked up from the Unity server's run
directory, and an unmodified relative `--server-config` or `--user-config`
was resolved by `add_instance` against `tests/casa_del_dolor/` rather than
the invocation directory dolor itself parses it from. Make them absolute
together with `--client-binary` and `--tmp-files-dir`.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Comment thread ci/jobs/lacasadeldolor_job.py Resolved
PedroTadim and others added 2 commits October 30, 2026 16:11
…t explain

Once the log analysis passed a run for an OOM, `_classify_dolor_failure`
waived whatever else made `dolor.py` fail, so a teardown failure such as
`docker compose kill` failing was dropped and the job ended green.

Waive only what the OOM explains: a teardown failure now fails the run as
`Cluster shutdown`, unless it is the teardown re-raising the OOM's own
sanitizer report. Other ERROR records, such as HTTP callback errors, never
fail `dolor.py` by themselves and stay ignored.

Addresses the review on #94148

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@PedroTadim
PedroTadim enabled auto-merge November 2, 2026 09:10
…sk can start

The fuzzer could pair `max_single_part_upload_size=0` (every write multipart) with
`max_blocks_in_multipart_upload=1`, which cannot fit even the disk's startup `checkAccess`
probe: the server rejects the disk with `INVALID_CONFIG_PARAMETER` and node0 never starts, so
`dolor.py` times out in `cluster.start`. Give the Azure block a floor of 10, as the S3
`s3_max_part_number` already has for the same reason.

#94148
https://s3.amazonaws.com/clickhouse-test-reports/praktika.html?PR=94148&sha=acaae4f4602862516312ab3e0e7a69ff5b9be177&name_0=PR

Co-Authored-By: Claude Opus 4.8 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp-ci-infrastructure CI/CD pipelines (GitHub Actions, CI scripts, runners). pr-not-for-changelog This PR should not be mentioned in the changelog 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.

7 participants