Repository navigation
Skip the heaviest TPC-DS / TPC-H queries on slow builds (sanitizers, debug, coverage) - #108341
Conversation
PR #107461 enabled disk spill (`max_bytes_before_external_group_by` and `max_bytes_before_external_join`) for the TPC-DS and TPC-H functional tests to lower peak memory and exercise the external `GROUP BY` / spilling-join paths. Under sanitizer builds (especially TSan and MSan) the spilling path is so slow that the heaviest queries overrun the 600s per-test timeout. The timeout cluster (`04033_tpc_ds_q10`, `04033_tpc_ds_q72`, `04033_tpc_ds_q04`, `04033_tpc_ds_q37`, `04033_tpc_ds_q39`, `04040_tpc_h_q08`) started within hours of that PR merging into master and hits exactly ~600s only on `amd_tsan` (`amd_msan` reaches ~508s). Before the PR these tests ran in memory and passed on sanitizer builds for months. These are plan/result correctness tests, not performance tests, so run them in memory on sanitizer builds (detected via `system.build_options`), which preserves correctness coverage there without the timeouts, while keeping disk spill on the non-sanitizer builds where it is cheap. Failures (last 90 days), via: https://play.clickhouse.com/play?user=play#V0lUSAogICAgOTAgQVMgaW50ZXJ2YWxfZGF5cwpTRUxFQ1QKICAgIGNoZWNrX3N0YXJ0X3RpbWUgQVMgZGF5LAogICAgcHVsbF9yZXF1ZXN0X251bWJlciBBUyBwciwKICAgIHJlcG9ydF91cmwKRlJPTSBjaGVja3MKV0hFUkUgKG5vdygpIC0gdG9JbnRlcnZhbERheShpbnRlcnZhbF9kYXlzKSkgPD0gY2hlY2tfc3RhcnRfdGltZQogICAgQU5EIHRlc3RfbmFtZSA9ICcwNDAzM190cGNfZHNfcTEwJwogICAgQU5EIHRlc3Rfc3RhdHVzIElOICgnRkFJTCcsICdFUlJPUicpCiAgICBBTkQgKHB1bGxfcmVxdWVzdF9udW1iZXIgPSAwIE9SIGJhc2VfcmVmIElOICgnbWFzdGVyJykpCiAgICBBTkQgdGVzdF9jb250ZXh0X3JhdyBMSUtFICclVGltZW91dCUnCk9SREVSIEJZIGNoZWNrX3N0YXJ0X3RpbWUgREVTQwo= Caused by: #107461 Co-Authored-By: Claude Opus 4.8 <[email protected]>
|
Workflow [PR], commit [1bf7672] Summary: ✅ AI ReviewSummaryThis PR skips six heavyweight Final Verdict✅ No blocker or major findings. I did not post any new inline review comments. |
Replace the per-build disk-spill gating with simply skipping the heaviest queries on sanitizer builds via the `no-sanitizers` tag, and restore the shared libs (`04033_tpc_ds.lib`, `04040_tpc_h.lib`) to their original unconditional disk-spill settings. Running these queries in memory on sanitizers (the previous approach in this PR) avoided the timeout but consumed too much memory; leaving disk spill on made them overrun the 600s test timeout under TSan/MSan. They are plan/result correctness tests whose correctness is already covered on debug, release and coverage builds, so skipping them under sanitizers is the cleaner trade-off. Disk spill stays enabled unconditionally in the shared libs - its original purpose is to lower peak memory and exercise the external `GROUP BY` / spilling-join paths on the builds that still run these tests. Affected tests: `04033_tpc_ds_q10`, `04033_tpc_ds_q72`, `04033_tpc_ds_q04`, `04033_tpc_ds_q37`, `04033_tpc_ds_q39` and `04040_tpc_h_q08`. Co-Authored-By: Claude Opus 4.8 <[email protected]>
rienath
left a comment
There was a problem hiding this comment.
Related: #107968
These timeouts are worth fixing, but I'd rather test these in memory (raise the spill threshold, or set it back to the default 0 = no spill) than skip them:
- This won't fully turn CI green.
no-sanitizersonly skips tsan/asan/ubsan/msan, but these queries also time out on non-sanitizer builds: q04 under the llvm coverage build, q37 under parallel amd debug, q72 too, etc. Those
timeouts stay red. - Spill is what's slow, not the queries. q10 (amd_tsan) and q04 (coverage) had zero timeouts until #107461 merged. Skipping (or re-tuning the threshold) treats the symptom.
|
@rienath, all tests are run under sanitizers (regardless of tags) in the Stress test. You can be sure they are covered. |
But without spill, we do not have enough memory to run them in parallel. Spill gives better coverage. |
|
@groeneai, provide a fix for |
|
@alexey-milovidov, This PR's only 04299 failure was 2026-06-24 01:28 UTC (amd_msan, WasmEdge), about 7.5h before that merge, so its base predates the fix. CIDB shows 0 failures of any mode since 08:58 UTC across master and all PRs. Merging master / rebasing here picks it up; no further test change is needed. |
…uilds The previous change only added `no-sanitizers`, but the post-#107461 disk-spill timeouts also occur on non-sanitizer slow builds: - `04033_tpc_ds_q04` times out *only* in `Stateless tests (amd_llvm_coverage, ParallelReplicas, s3 storage, parallel)` (5 rows, 2026-06-19..2026-06-25), never on sanitizers, so `no-sanitizers` did nothing for it. - `04033_tpc_ds_q72` also times out on `amd_debug` and `amd_llvm_coverage`. - `04033_tpc_ds_q37` also times out once on `amd_debug`. In `tests/clickhouse-test`, `no-sanitizers` only matches ASan/MSan/TSan/UBSan (`BuildFlags.SANITIZERS`), so the coverage and debug builds were left exposed. Since the disk spill enabled by #107461 is slow on every instrumented/slow build, skip the six heaviest queries on debug and coverage as well via `no-debug` and `no-llvm-coverage`. `no-llvm-coverage` reroutes these tests to the `amd_binary_excluded_from_llvm` job, which runs them once on a regular (non-instrumented) binary, so their plan/result correctness is still verified without the timeout. The lighter TPC queries keep exercising the spill code paths on instrumented builds. CI report: #108341 Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
LLVM Coverage Report
Changed lines: No C/C++ source files changed — skipping uncovered code analysis. Newly covered by added/modified tests: 313 line(s), 27 function(s) across 116 file(s) · Details Top files
|
Resolve tag-line conflicts in the TPC-DS/TPC-H tests by taking the union of both tag sets: master's `no-sanitizers, no-debug, no-llvm-coverage` (added in #108341) and this branch's `no-random-detach`. Move the `reattach_tables_before_query_execution` and `reattach_tables_before_query_execution_probability` entries in `SettingsChangesHistory.cpp` from the now-released `26.6` block to the current in-development `26.7` block; master opened `26.7` in 407ba80 ("Adjust settings after 26.6 release"), and a clean auto-merge would otherwise strand them in a released version. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
…uilds The previous change only added `no-sanitizers`, but the post-ClickHouse#107461 disk-spill timeouts also occur on non-sanitizer slow builds: - `04033_tpc_ds_q04` times out *only* in `Stateless tests (amd_llvm_coverage, ParallelReplicas, s3 storage, parallel)` (5 rows, 2026-06-19..2026-06-25), never on sanitizers, so `no-sanitizers` did nothing for it. - `04033_tpc_ds_q72` also times out on `amd_debug` and `amd_llvm_coverage`. - `04033_tpc_ds_q37` also times out once on `amd_debug`. In `tests/clickhouse-test`, `no-sanitizers` only matches ASan/MSan/TSan/UBSan (`BuildFlags.SANITIZERS`), so the coverage and debug builds were left exposed. Since the disk spill enabled by ClickHouse#107461 is slow on every instrumented/slow build, skip the six heaviest queries on debug and coverage as well via `no-debug` and `no-llvm-coverage`. `no-llvm-coverage` reroutes these tests to the `amd_binary_excluded_from_llvm` job, which runs them once on a regular (non-instrumented) binary, so their plan/result correctness is still verified without the timeout. The lighter TPC queries keep exercising the spill code paths on instrumented builds. CI report: ClickHouse#108341 Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
…spill-timeout Skip the heaviest TPC-DS / TPC-H queries on slow builds (sanitizers, debug, coverage)
PR #107461 enabled disk spill (
max_bytes_before_external_group_byandmax_bytes_before_external_join) for the TPC-DS and TPC-H functional tests, to lower peak memory and exercise the externalGROUP BY/ spilling-join code paths. The spilling path is so slow that, on the instrumented and otherwise slow builds, the heaviest queries overrun the 600s per-test timeout.The timeout cluster (
04033_tpc_ds_q10,04033_tpc_ds_q72,04033_tpc_ds_q04,04033_tpc_ds_q37,04033_tpc_ds_q39,04040_tpc_h_q08) started within hours of #107461 merging intomaster(2026-06-18). The timeouts are spread across all the slow builds, not only sanitizers:amd_tsan/amd_msan/amd_asan_ubsan(sanitizers):q10,q39,q37,q72,04040_tpc_h_q08(TSan hits exactly ~600s, MSan ~508s);amd_debug:q37,q72;amd_llvm_coverage:q04(which times out only here, never on sanitizers) andq72.These are plan/result correctness tests, not performance tests. Running them in memory on the slow builds avoids the timeout but consumes too much memory, so instead this change skips the heaviest queries on the slow builds — sanitizers, debug and coverage — via the
no-sanitizers,no-debugandno-llvm-coveragetags.no-llvm-coveragereroutes these tests to theamd_binary_excluded_from_llvmjob, which runs them once on a regular (non-instrumented) binary, so their plan/result correctness is still verified there and on the release/AArch64 builds. Disk spill stays enabled unconditionally in the shared libs for its original purpose (lower peak memory and exercise the spill paths); the lighter TPC queries keep exercising those paths on the instrumented builds.Failures over the last 90 days (the query provided): https://play.clickhouse.com/play?user=play#V0lUSAogICAgOTAgQVMgaW50ZXJ2YWxfZGF5cwpTRUxFQ1QKICAgIGNoZWNrX3N0YXJ0X3RpbWUgQVMgZGF5LAogICAgcHVsbF9yZXF1ZXN0X251bWJlciBBUyBwciwKICAgIHJlcG9ydF91cmwKRlJPTSBjaGVja3MKV0hFUkUgKG5vdygpIC0gdG9JbnRlcnZhbERheShpbnRlcnZhbF9kYXlzKSkgPD0gY2hlY2tfc3RhcnRfdGltZQogICAgQU5EIHRlc3RfbmFtZSA9ICcwNDAzM190cGNfZHNfcTEwJwogICAgQU5EIHRlc3Rfc3RhdHVzIElOICgnRkFJTCcsICdFUlJPUicpCiAgICBBTkQgKHB1bGxfcmVxdWVzdF9udW1iZXIgPSAwIE9SIGJhc2VfcmVmIElOICgnbWFzdGVyJykpCiAgICBBTkQgdGVzdF9jb250ZXh0X3JhdyBMSUtFICclVGltZW91dCUnCk9SREVSIEJZIGNoZWNrX3N0YXJ0X3RpbWUgREVTQwo=
Caused by: #107461
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
...
Version info
26.7.1.171(included in26.7and later)