Repository navigation
More fuzzing in CI - #131994
More fuzzing in CI#131994
Conversation
|
Workflow [PR], commit [174d412] Summary: ✅
AI ReviewSummaryThe PR expands BuzzHouse and AST mutation coverage, adds streaming integrations to Casa, moves server-side AST fuzzing after query completion, and improves oracle filtering. Request changes for one remaining restart-hash false positive. No new inline findings were identified; the remaining concern belongs to an existing author-resolved thread. Findings
Tests
Missing context / blind spots
Final VerdictStatus: Make restart-hash write detection account for partition-local block numbers and verify the queued-insert case above. |
The master merge brought in the repo-wide `modernize-use-nodiscard`, `readability-container-contains` and `clang-analyzer` tidy checks with `WarningsAsErrors: '*'`, which the BuzzHouse changes on this branch had not accounted for: - Add `[[nodiscard]]` to the const value-returning methods in `FuzzConfig.cpp` (7) and `SQLCatalog.h` (118). - Use `String::contains` instead of `find(...) == String::npos` in `SQLTable.cpp` and `StatementGenerator.cpp`. - Add a `chassert(nsubtype)` in `ArrayType::PostgreSQLtypeName` to express the non-null invariant after removing the `INT[]` fallback, silencing `clang-analyzer-core.CallAndMessage`. CI tidy report: https://github.com/ClickHouse/ClickHouse/actions/runs/43870935199 PR: #131994 Co-Authored-By: Claude Opus 4.8 <[email protected]>
Two violations surfaced once the tidy build stopped dropping the Style job: - `FuzzConfig.cpp`: the `cpp` paren-spacing rule false-positived on a raw string literal whose SQL fragment began with `( AND`. Switch that one fragment to a plain string literal (no SQL change). - `SQLProtoStr.cpp`: the abbreviation rule flagged `kModifySqlSecurity`, which is protobuf-generated from the `modify_sql_security` field and cannot be spelled with `SQL` in caps. Add it to the existing exclusion list in `check_cpp.sh`, alongside `SqlInfo` / `CommandGetSqlInfo`. PR: #131994 Co-Authored-By: Claude Opus 4.8 <[email protected]>
Build profile diff (arm_release)Comparing ✅ No significant changes. Binary sizes
The official master build is compiled with Object file sizes6 object files changed (+135.63 KiB total), 0 added.
716 more object files are built by the master warmup baseline only (it builds every object-file target, a pull request build only Compile time of recompiled translation units599 translation units recompiled, 3928 s compile time in total, 599 of them have a recent master baseline. |
`clone` of `ASTExistsDatabaseQuery`, `ASTShowCreateDatabaseQuery`, `ASTCreateIndexQuery`, `ASTDropIndexQuery`, `ASTHypotheticalObjectQuery`, `ASTUpdateQuery` and `ASTDeleteQuery` cleared `children` but did not call `cloneOutputOptions`. The clone kept the original's `out_file`, `format_ast` and `settings_ast` pointers outside its own `children`, so it shared those nodes with the original and hashed differently. The server-side AST fuzzer then failed with `AST subtree not found in children` when removing `INTO OUTFILE` from a cloned `SHOW DATABASE`. `UPDATE` and `DELETE` cloned `settings_ast` by hand; `cloneOutputOptions` now does it, and the `UPDATE` clone follows the parser's children order. CI report: https://s3.amazonaws.com/clickhouse-test-reports/praktika.html?PR=131994&sha=4923e626ef1496323e70e737ee0b0cc34dc11d96&name_0=PR PR: ClickHouse#131994 Co-Authored-By: Claude Opus 5.5 <[email protected]>
- `fuzzQueryText` and `fuzzStructure` fuzzed a freshly parsed AST, where the parser shares the `BETWEEN` subject between both comparisons, so the loop check aborted. `clone` it first, as the main fuzz paths do. - The dolor HTTP server listens on IPv4 only, while BuzzHouse resolves `localhost` through `DNSResolver`, which picks `::1` or `127.0.0.1` at random per request, so `/sparkupdate` was sometimes refused. Bind it to `127.0.0.1`. https://s3.amazonaws.com/clickhouse-test-reports/praktika.html?PR=131994&sha=d065775f69ec5c8e87ee929bf4da68554b171059&name_0=PR #131994 Co-Authored-By: Claude Opus 5.5 <[email protected]>
AI review of a later commit does not approve the PR, see the AI Review comment.
PR: #131994 Co-Authored-By: Claude Opus 5.5 <[email protected]>
6b40705 to
d575670
Compare
On the framed HTTP path (`framing_output_format`), the fuzzer ran from `BlockIO::onFinish`, before the framing finalization and the `query_finish_callback` that closes the response and releases the session. Fuzzed queries kept the response open and the session locked, and with `send_logs_level` their logs were streamed as `log` packets of the outer query. Now `executeQuery` runs the fuzzer after `query_finish_callback` on both HTTP paths. Co-Authored-By: Claude Opus 5.5 <[email protected]>
With temporary data only in the distributed cache, merges that use temporary data fail with `DISTRIBUTED_CACHE_ERROR` `no server is available` while the cache servers are not registered in Keeper, e.g. after a restart or a Keeper session loss. The `part_log` health check counted them. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
@groeneai can you investigate this CI failure https://s3.amazonaws.com/clickhouse-test-reports/praktika.html?PR=131994&sha=latest&name_0=PR&name_1=Stress+test+%28arm_msan%29 and come with a fix PR? |
|
Acknowledged. I'm investigating it; I'll follow up here with a PR (or my findings) shortly. What I see so far: the stress run itself never started. In the second |
A debug build checks every segment of each filesystem cache at startup (`FileCache::assertCacheCorrectness` in `loadMetadataImpl`). With 26k tiny segments it took over 3 minutes, so a scheduled restart overran `SERVER_START_WAIT_SECONDS` and ended the run. The load drops segments past `max_elements`, so capping it at 10000 bounds the check. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Follow-up: I opened #133286. I could not reproduce the fault itself: 100,100 runs of the four |
…of the fuzzer log The La Casa Del Dolor job fails the run as `dolor.py exception` when `Traceback (most recent call last):` appears in the last 20000 characters of fuzzer.log (dolor.py's stdout and stderr), whatever dolor.py's exit code. Four handlers in tests/casa_del_dolor/catalogs ignore an error on purpose but called traceback.print_exc() before self.logger.exception(e), so every ignored error also went to stderr as a traceback. Since ClickHouse#131994 enabled RabbitMQ, Kafka and NATS in the job, the two streamingtest.py handlers run in CI, and the fuzzed exchange redeclare with a random type routinely gets 406 PRECONDITION_FAILED from the broker. That made La Casa Del Dolor (amd_debug) red on PR ClickHouse#133383 although dolor.py and the server both exited 0: the last ignored traceback started 14.8 KB before the end of fuzzer.log. logger.exception already writes the message and the traceback to dolor.log (dolor.py routes the root logger to --log-path only), so print_exc() was a duplicate. Remove it at all four sites (streamingtest.py create_table/update_table, tablecheck.py check_table, datagenerator.py update_table; the last two are Spark-only and not run in CI yet) together with the then unused `import traceback`. The safety net is unchanged and still reports an exception nobody caught. Validated locally by calling the four real handlers with the error injected and the job's check applied to their output: on master all four trip it, with the change stderr stays empty and dolor.log keeps the traceback. No test for the test infrastructure. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ueue La Casa Del Dolor (arm_asan_ubsan) on PR 133339 (sha 6e867ce) drew `fcache0` as SLRU with `use_split_cache=1`, `split_cache_ratio=0.99`, `slru_size_ratio=0.01` and `max_elements=1000`. `SplitFileCachePriority` gives the data part lround(1000 * 0.01) = 10 elements, its protected SLRU queue gets lround(10 * 0.01) = lround(0.1) = 0, and the `SLRUFileCachePriority` constructor rejects a queue without elements: "Cannot have zero max elements after ratio is applied" (BAD_ARGUMENTS), so the server exits with code 36 and the run ends before any fuzzing. 174d412 ("Cap `max_elements` of the Dolor filesystem caches", in ClickHouse#131994) lowered the generator floor of `max_elements` from 10000 to 1000. With 10000 the worst case, both ratios at an extreme, was 10000 * 0.01 * 0.01 = 1; with 1000 it rounds to 0. `normalize_cache_properties` already computes the smallest SLRU queue of each split part with the server's rounding, to fit the file segment into it. Factor that into `get_smallest_queue` and apply it to `max_elements` too: raise it until every SLRU queue gets at least one element, staying within `MAX_CACHE_ELEMENTS`. For the generated ratios (0.01 to 0.99) the worst case needs 4950, by the server's `std::lround` and by the harness rounding alike. The size logic is unchanged. Measured with an oracle that re-implements the server's check with libm `lround`: master's generator yields 1022 unstartable caches in 200000 seeded draws, this one 0; on 100000 seeds of both `filesystem_caches` entries and cache disks, 1042 configs differ and every difference is only `max_elements` of a cache master left unstartable. A master debug server exits with code 36 on the CI cache block (protected queue 0 elements) and starts with the normalized block (`max_elements` 4950; smallest queue 1 element). Co-Authored-By: Claude Opus 5.5 <[email protected]>
…l Dolor paused La Casa Del Dolor (amd_debug) failed with `dolor.py exception` on unrelated PRs: `docker compose ... unpause postgres1` returned "Container ... is not paused". Docker reports a paused container that has a healthcheck as unhealthy (pausing closes its health monitor) and keeps that status after the unpause until the next probe, which runs only after `interval` (10 s for postgres1). The postgres compose file labels postgres1 `autoheal=true` and runs the willfarrell/autoheal sidecar, which restarts every labelled unhealthy container every 5 s after a 600 s start period (ClickHouse#79360). La Casa runs 15 minutes and pauses integrations since ClickHouse#131994, so a postgres pause after minute 10 is restarted by the sidecar: the restart resumes the container and the unpause fails. The dockerd debug logs of both failing runs show pause, the sidecar's `health=unhealthy` query, `restart?t=10`, then the failed unpause. When dolor pauses postgres1 it now pauses the sidecar first, and resumes it once postgres1 is healthy again. Resuming it right after the unpause is not enough, because the status is still unhealthy until the first probe. The wait is bounded at 60 s, after which the sidecar is resumed anyway, so a postgres that stays unresponsive after a pause is still healed (the reason ClickHouse#79360 added the sidecar). Not chosen: pausing with SIGSTOP (`docker kill --signal`) freezes only the postmaster, so established connections keep answering and clients see no hang, which defeats the purpose of the pause; stopping the sidecar for the whole run drops the recovery; making `unpause` tolerate a running container would hide that the pause turned into an unscheduled restart. Validated locally (no committed test: fuzzer harness change): with the current sequence `unpause` fails 5/5; with the new one 5/5 runs have no restart and no error, and postgres is healthy about 10 s after the unpause. A temporary integration test on the real compose file reproduced the CI exception after the 600 s start period and ran the new sequence 3/3 cleanly. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Extended the BuzzHouse and AST fuzzers and
casa_del_dolor:DEFAULTandMATERIALIZEDexpressions in table-function column structures and more extreme literal values, broader streaming-engine coverage (Kafka,S3Queue,NATS,RabbitMQ) with settings fixes, moreJOINkinds andWHERE/ONpredicate shapes, and more dictionary, hive-partitioning, disk, data-lake and table-swap coverage,INSERT INTO FUNCTION ... PARTITION BYfor thefile,urland object-storage table functions (with{_partition_id}in the path), along with new settings and statements. The server-side AST fuzzer now runs after the query finishes, so the query'squery_logentry and HTTP response no longer include the fuzzing, and thefuzzQuerytable function takes a new seed on each read unlessrandom_seedis set. The stress test randomizes allocation failures inside merges and mutations. Thecasa_del_dolorrestart-hash oracle skips tables with pending mutations, with inserts that land between the two hashes, or with lossy codecs (SZ3,Quantized), which BuzzHouse also keeps off deterministic tables. Other oracle false positives are avoided, and theTrivialmerge selector is not used with the private binary.Workflow [PR]
Sync PR [sync-upstream/pr/131994]
Version info
26.12.1.86-master(included in26.12and later)