Repository navigation
Conversation
The "Stateless tests (amd_llvm_coverage, old analyzer, s3 storage, DatabaseReplicated, WasmEdge, parallel)" job runs the whole stateless suite un-batched under coverage instrumentation. It is the slowest job in CI: the main test run alone takes about 1h40m to 2h10m (DatabaseReplicated forces nproc to 40% of cores, and coverage binaries are 3-5x slower). After the run, the post-run random-settings diagnosis and profdata merge push the total job wall-clock past the runner lease, and the container is torn down mid-job (exit 125, "grpc: the client connection is closing: context canceled"), recorded as a job-level error even though all tests pass. Split this variant into LLVM_FT_OLD_S3_DB_REPL_WASM_NUM_BATCHES (3) batches, matching the existing 3-batch regular coverage FT and 8-batch coverage IT pattern. Each shard runs about 1/3 of the suite and finishes well inside the lease. The coverage aggregator merges *.profdata by glob, so the per-batch profdata files are picked up with no aggregation change. Co-Authored-By: Claude Opus 4.8 <[email protected]>
Pre-PR validation gate (click to expand)
Session id: cron:clickhouse-worker-slot-9:20260630-171600 |
|
cc @maxknv @leshikus — could you review this? It splits the |
|
Workflow [PR], commit [fd755a3] Summary: ✅ AI ReviewSummaryThis PR splits the slow Final VerdictStatus: ✅ Approve |
|
@groeneai, is there a link with the CI report where the problem occurred? If there is a failure in CI, always add a link to the report; it should be available in the CIDB table. |
|
It's ok to split into more batches as the job runs for almost 2h already. But it does not appear to be a root cause of this error. CI does not "reclaim" runners while the job is running. |
|
You're right, and I've dropped the "runner reclaimed mid-job" wording from the description. Re-reading the two representative job logs, the
It isn't the praktika job timeout ( Either way the split stands on its own merit as you noted: shorter per-shard wall-clock means the post-run collection finishes much sooner, well before whatever is closing the connection. |
This parametrization is being killed at the shared 9000s functional-test timeout with tests still unrun, so the job reports error with no failing test and the author sees an unattributable red. Over the 7 days to 2026-08-04 there were 16 such kills, all in a 25s band at 9016-9041s, hitting master twice and 14 PRs by 10 authors, 12 of them from other contributors. The prior 7 days had 5, so the rate is rising. The cause is per-shard volume, not a hang and not one slow test. Successful-run p50 wall time on the slower of the two shards grew from about 5300s (2026-07-04) to about 6800s (2026-08-04). A least-squares fit over those 32 daily p50 values gives about +51s/day, leaving roughly six weeks of headroom on p50 and two on p99 against the cap. Wall time responds to sharding. Fitting wall time against summed per-test time over 1671 successful runs gives wall_s = 255 + 0.08979 * sum_test_s with r = 0.9722, so effective concurrency is about 11x and only about 255s is unshardable setup and teardown. Back-substituting the measured per-shard test-seconds reproduces the measured wall times to within 0.8%. Projected at 3 batches, using the measured crc32 bucket shares, the worst shard lands at a p50 of about 4671s (52% of the cap) and its growth slope falls to about 35s/day. I raised the batch count rather than the timeout: a larger budget lets a genuine hang burn hours, against the fail-fast intent of ClickHouse#106183 and ClickHouse#107602, and it treats the cap instead of the volume. No new mechanism is introduced. Job.ParamSet already emits {batch}/{total_batches} into the job name and ci/jobs/functional_tests.py already forwards --run-by-hash-total and --run-by-hash-num to clickhouse-test. Precedent: ClickHouse#108970 split amd_llvm_coverage the same way, and amd_tsan, s3 storage, parallel already uses 3. The sequential sibling is deliberately left alone: it had 0 runs above 8000s in the same window (p50 5555/6201), so splitting it would spend runners on a problem that does not exist. Partition integrity was verified over all 13230 selectable files in tests/queries/0_stateless using the same crc32(filename) % total predicate as tests/clickhouse-test: 6596 + 6634 at 2 batches, 4461 + 4417 + 4352 at 3. Both sum to 13230 with the union equal to the full set, so no test is lost or duplicated. The no-batch tag is used by 0 test files. The workflow YAML is generated, not hand-edited. Note that praktika yaml runs git add on its output, so a bare git diff reads clean while the generated files have changed; scope must be checked with git diff HEAD. Closes: ClickHouse#113164
…erage-old-analyzer-parallel Split amd_llvm_coverage old-analyzer parallel stateless job into batches
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
...
Description
The
Stateless tests (amd_llvm_coverage, old analyzer, s3 storage, DatabaseReplicated, WasmEdge, parallel)job runs the whole stateless suite un-batched under coverage instrumentation. It is the slowest job in CI: the main test run alone takes about 1h40m to 2h10m (DatabaseReplicatedforcesnprocto 40% of cores, and coverage binaries are 3-5x slower), and with the post-run random-settings diagnosis and log collection the total job wall-clock reaches about 2h20m.These runs are frequently recorded as a job-level error (
exit 125,grpc: the client connection is closing: context canceled, thendocker.sock: EOF) even though every test passes. In the two representative reports below the cancel fires during the post-run log-collection phase, afterAll tests have finished. No queries hung., so there are no individual test FAILs. This is the worst coverage shard by volume: 85 such job-level errors across 81 distinct PRs in the last 30 days, all with the same teardown signature. The exact cause of the context-cancel is under investigation with CI infra; it is not the praktika job timeout (9000s, the job runs under it) and not a GitHub job timeout.This splits the variant into
LLVM_FT_OLD_S3_DB_REPL_WASM_NUM_BATCHES(3) batches via the existing{batch}/{total}parametrization, matching the 3-batch regular coverage FT and 8-batch coverage IT pattern already in use. Each shard runs about 1/3 of the suite. Each batch uploads its own*.profdataartifact; the coverage aggregator (merge_llvm_coverage.sh) merges*.profdataby glob, so no aggregation change is needed. TheLLVM_FT_ARTIFACTS_LIST(which the aggregatorrequires) and the generated workflow YAML are updated accordingly. Thesequentialsibling is unchanged.Representative CI reports (full suite passed, 0 individual test failures, container connection severed during post-run log collection):
Version info
26.7.1.343(included in26.7and later)