Repository navigation
Revert "Temporarily disable server-side AST fuzzer in Stress Test and BuzzHouse [2]" - #101354
Conversation
|
Workflow [PR], commit [184fe40] Summary: ✅
AI ReviewSummaryThis PR re-enables the server-side AST fuzzer in the regular Stress, AST Fuzzer, and BuzzHouse jobs, removes the now-duplicate dedicated Final VerdictStatus: ✅ Approve |
|
The Stress test (arm_msan) failure is fixed by #101239, which should be merged first. After it is merged, please update the branch to include the fix. |
…disable-ast-fuzzer-stress-buzzhouse
|
The MSan stress test failure (MemorySanitizer: use-of-uninitialized-value, STID 4179-5154 or 4148-3044) is a known pre-existing issue unrelated to this PR. Fix: #102158 |
…disable-ast-fuzzer-stress-buzzhouse
…t-100490-revert-100439-disable-ast-fuzzer-stress-buzzhouse
…disable-ast-fuzzer-stress-buzzhouse
…t-100490-revert-100439-disable-ast-fuzzer-stress-buzzhouse # Conflicts: # tests/docker_scripts/stress_tests.lib
Since this PR re-enables the AST fuzzer globally for stress and BuzzHouse jobs, the conditional `ENABLE_SERVER_FUZZER` / `SERVER_FUZZER_ENABLED` opt-in path and the dedicated `experimental, serverfuzz, ...` job parametrizations are now redundant. Drop them along with the auto-generated workflow YAML entries. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
…t-100490-revert-100439-disable-ast-fuzzer-stress-buzzhouse
The check that resets the fuzzer's working AST back to the original query when the fuzzed text grows too long was comparing the *configured* length limit against the constant 500, instead of the *fuzzed text size* against the configured limit. With the default `max_query_length = 500`, the condition was always false, so the AST kept growing across iterations and each subsequent `formatForErrorMessage` call became progressively more expensive — producing hangs in stress tests that exercise `fuzzQuery` with the server-side AST fuzzer enabled (`ast_fuzzer_runs > 0`, `ast_fuzzer_any_query = 1`), as observed in CI: https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=101354&sha=52e5fa626ce929f39bbc4e171def47bacaf6a504&name_0=PR&name_1=Stress%20test%20%28arm_release%29 PR: #101354 Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
The previous `serverfuzz` opt-in path enabled both `ast_fuzzer_runs` and `ast_fuzzer_any_query` together. Removing that path and only adding `ast_fuzzer_runs` to `query-fuzzer-tweaks-users.xml` left the AST Fuzzer job covering only read-only queries. Add `ast_fuzzer_any_query` so DDL and `INSERT` queries are also fuzzed, matching the original coverage. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
…t-100490-revert-100439-disable-ast-fuzzer-stress-buzzhouse
The previous `if (config.max_query_length > 500)` check was independent of `fuzzed_text.size()`: for `max_query_length <= 500` the cap was never enforced (rows could grow unbounded), and for `max_query_length > 500` the loop always restarted from the original query without producing any rows. Address review feedback on #101354
…t-100490-revert-100439-disable-ast-fuzzer-stress-buzzhouse
`max_query_length = 0` would otherwise drive `FuzzQuerySource::createColumn` into an infinite loop: every non-empty fuzzed AST exceeds the cap, the loop resets to the original query, and `row_num` never increments past `block_size`. Validate the value in `StorageFuzzQuery::getConfiguration` and throw `BAD_ARGUMENTS`. Add a regression test alongside the existing length-cap test. Address review feedback on #101354 Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
…t-100490-revert-100439-disable-ast-fuzzer-stress-buzzhouse
|
@groeneai, investigate the hung check failure, and send a fix as a separate PR. |
|
@alexey-milovidov, root cause and fix posted as a separate PR per your request: #103742. The hung query (https://s3.amazonaws.com/clickhouse-test-reports/PRs/101354/5da866fbdbe5ef63d3498b9030b65987626e9dce/stress_test_arm_tsan/hung_check.log) is The same hang shape exists on master HEAD without your PR: PR #103742 is orthogonal to this one — whichever lands first, the other becomes a small rebase. |
Folds in the source-code changes from PR ClickHouse#101354 in response to the bot review on PR ClickHouse#103742 ("wasted attempts at max_query_length > 500"). Two combined changes: 1. Replace the lazy `if (config.max_query_length > 500)` guard with the precise `if (fuzzed_text.size() > config.max_query_length)` check. The old guard was a coarse heuristic: it triggered the reset branch whenever the cap was larger than 500, regardless of the actual fuzzed AST size. With the 100-attempt cap added in 614df1d the source no longer hangs, but every row in the `cap > 500` case still does 100 full fuzz-and-format cycles before falling back to the unfuzzed query — `O(max_attempts_per_row * block_size)` wasted work per scan. The precise check resets only when the produced fuzzed text actually exceeds the cap. For the common case `cap > 500` with a small input query, the loop now produces a row on the first attempt: SELECT count() FROM (SELECT * FROM fuzzQuery('SELECT 1', 1000, 42) LIMIT 1000); -- 113 ms (vs ~10 s with 100 wasted attempts per row). The 100-attempt cap stays in place as defense-in-depth for genuine oversized-variant cases (e.g. `max_query_length = 1`, where every non-trivial mutation overflows). 2. Reject `max_query_length = 0` in `getConfiguration` with `BAD_ARGUMENTS`. With cap = 0, every non-empty fuzzed AST exceeds the cap by definition, so the source would degrade to emitting the unfuzzed query for every row (after `max_attempts_per_row` retries). That is a no-op fuzzer with extra cost; the user clearly did not mean to ask for it. Both changes were originally proposed in PR ClickHouse#101354 (ClickHouse#101354). With them folded in here, PR ClickHouse#101354 only needs to keep its workflow / CI re-enablement bits. Test: - `04143_fuzz_query_no_infinite_loop` adds a fourth scenario for the `max_query_length = 0` `BAD_ARGUMENTS` rejection. - 50/50 passes via `clickhouse-test --test-runs 50`. - `fuzzQuery('SELECT 1', 1000, 42) LIMIT 1000` returns in 113 ms. - `max_execution_time = 1` exits within ~5 ms of the deadline. Bot review: ClickHouse#103742 (comment) Related: ClickHouse#101354 Co-Authored-By: Claude Opus 4.7 <[email protected]>
…t-100490-revert-100439-disable-ast-fuzzer-stress-buzzhouse
LLVM Coverage Report
Changed lines: Changed C/C++ lines covered by tests: 3/3 (100.00%) | Lost baseline coverage: none · Uncovered code |
…t-100490-revert-100439-disable-ast-fuzzer-stress-buzzhouse # Conflicts: # src/Functions/runningAccumulate.cpp
|
Dear @nikitamikhaylov, you haven't been active on this PR for 30 days. You will be unassigned. Will you continue working on it? If so, please feel free to reassign yourself. |
|
Closing the loop on the This was a real master regression, not flaky: ParallelReplicas was not applying Fixed by PR #104296 ("Disable additional_table_filters with parallel replicas and analyzer and w/o query plan serialization", azat), merged 2026-05-20T12:57:37Z (commit CIDB confirms the fix held: the last failure anywhere was 2026-05-20 16:03 (a couple of PR branches whose merge-base predated the fix), and zero failures on master or any PR in the ~2 weeks since. The CI run that flagged it here was from before the fix landed, so a rebase clears it. |
…t-100490-revert-100439-disable-ast-fuzzer-stress-buzzhouse
|
Merged the latest Notes from the merge:
Verified locally on the merged tree (built clean, server 26.6.1.1):
The previously-flagged failures ( |
Now that `ast_fuzzer_runs` and `ast_fuzzer_any_query` are enabled unconditionally for the regular AST Fuzzer, BuzzHouse and Stress Test jobs (via `query-fuzzer-tweaks-users.xml` and `stress_tests.lib`), the separate `experimental, serverfuzz, ...` job matrices only duplicate the same coverage and waste CI resources without adding signal. Remove the `stress_test_serverfuzz_jobs` and `buzz_fuzzer_serverfuzz_jobs` job configs along with their now-dead plumbing: - `ENABLE_SERVER_FUZZER` in `stress_job.py`, - `SERVER_FUZZER_ENABLED` in `ast_fuzzer_job.py` and `run-fuzzer.sh`. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
…t-100490-revert-100439-disable-ast-fuzzer-stress-buzzhouse
Regenerated from the workflow configs with `python3 -m ci.praktika yaml` after removing the `experimental, serverfuzz, ...` job matrices, so the generated GitHub Actions workflow matches `ci/workflows/master.py`. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
|
Addressed the review feedback and refreshed the branch:
The previous |
|
@groeneai, check the UBSan report and provide the fix. |
|
@alexey-milovidov, the SELECT * FROM url('http://[2001:db8:1::2]:36967/','JSONAsString')This came from Root cause: A fix is already in flight: #104089 ("Improve canceling queries with url() function", rvasin). It adds a Two unrelated failures on this run:
Tracked on our side as |
…t-100490-revert-100439-disable-ast-fuzzer-stress-buzzhouse
|
Merged the latest
Status of the previously-flagged failures:
|
…= 0` Master commit `af74a133dba` removed the `no-stress` tag (it never had any effect: support for it was reverted long ago in `bddead1ea21`) and made `tests/clickhouse-test` raise an error when any test declares it. After merging that into this branch, the three tests here that still carried the tag crashed the test runner during tag parsing, which is why the `Fast test` job failed with "The test runner was terminated unexpectedly" and all downstream jobs were skipped: https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=101354&sha=2514b4c7958098eb21ad2596431b1095d0c6d845&name_0=PR&name_1=Fast%20test Since the tag was a no-op, these stress-test skips were vacuous anyway. Replace them with a mechanism that actually works and keeps the tests running in the Stress test: disable the server-side AST fuzzer only for the specific queries it cannot safely mutate, via a `SETTINGS ast_fuzzer_runs = 0` clause. The fuzz decision in `executeQuery.cpp` reads the setting from the query context after the query-level `SETTINGS` clause is applied, and the stress configuration places no constraint on it, so the per-query opt-out takes effect while every other query in these tests remains fuzzed. PR: #101354 Co-Authored-By: Claude Fable 5 <[email protected]>
|
Fixed the Root cause: master commit Since the tag was a no-op, those stress-test skips were vacuous anyway. Pushed Verified locally: The |
…t-100490-revert-100439-disable-ast-fuzzer-stress-buzzhouse
|
📊 Cloud Performance Report 🟢 AI verdict: This PR removes the experimental serverfuzz CI jobs and refactors the fuzzQuery table-function storage (StorageFuzzQuery.cpp); it does not touch the scan, join, or aggregation paths that the flagged queries run. All four flagged results are improvements that fall outside the changed code, so none can be attributed to this change. Clickbench Q22 (-22.6%) is downgraded to not-sure as off-path variance; Q23 (-33%), TPCH Q7 (-36%) and Q20 (-49%) show deltas large and consistent enough that the gates retain them, but they correspond to no code change here and most likely reflect build/baseline measurement differences — Q20 in particular was measured on a noisy query. Treat these as informational, not as a verified speedup from this PR. clickbench🟢 1 improved · Flagged queries (2 of 43)
q-value = BH-FDR adjusted p; smaller is stronger evidence. MIRAI flags a query when q < fdr_q (default 0.10) — the value the verdict is based on. tpch_adapted_1_official🟢 2 improved Flagged queries (2 of 22)
q-value = BH-FDR adjusted p; smaller is stronger evidence. MIRAI flags a query when q < fdr_q (default 0.10) — the value the verdict is based on. Debug info
|
`isProbablePrime` on `UInt128`/`UInt256` delegated to `boost::multiprecision::miller_rabin_test`, which has no cancellation hook. Under heavy sanitizer + ThreadFuzzer instrumentation, a single round can stretch into minutes; combined with the server-side AST fuzzer mutating the `rounds` literal, the function hangs the stress test's `hung_check` for the full 30-minute window. This commit: - Adapts Boost's Miller-Rabin loop locally and calls `QueryStatus::checkTimeLimit` between rounds, so `KILL QUERY` and `max_execution_time` both interrupt the function. - Rejects `rounds > 256` with `BAD_ARGUMENTS`. `4^-256 < 10^-150` already, so larger values add no meaningful confidence and only widen the worst-case runtime under the AST fuzzer. See CI report on the AST-fuzzer-re-enablement PR: ClickHouse#101354 https://s3.amazonaws.com/clickhouse-test-reports/PRs/101354/f0038d26f27dc2d179136ae371e632746bab3c30/stress_test_arm_tsan/hung_check.log Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Reverts #101274
As soon as we are ready.
Version info
26.6.1.791