Skip to content

Split coverage and amd_msan integration tests into more batches - #108564

Merged
alexey-milovidov merged 3 commits into
ClickHouse:masterfrom
groeneai:groeneai/coverage-integration-session-timeout
Jun 28, 2026
Merged

alexey-milovidov merged 3 commits into
ClickHouse:masterfrom
groeneai:groeneai/coverage-integration-session-timeout

Conversation

@groeneai

@groeneai groeneai commented Jun 26, 2026 •

Copy link
Copy Markdown
Collaborator

Changelog category (leave one):

  • CI Fix or Improvement (changelog entry is not required)

Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):

...

Description

The Integration tests (amd_llvm_coverage, N/M) jobs intermittently fail with a whole-batch ERROR: session-timeout occurred during test execution (a synthetic Timeout row, no individual test failure). Coverage-instrumented binaries run roughly 3-5x slower, and at 5 batches each batch packs right up to the parallel session-timeout: over 10 days the balanced (sum/3) per-batch time reaches ~7240-7260s for batches 2/3/4 on top of a 7200s budget, so any packing imbalance tips a batch over. The job reports all tests OK; the batch simply runs out of wall-clock and xdist raises session-timeout exceeded.

Per @ maxknv's review request: rather than raise the timeout, keep the per-batch run time tight and increase the batch count so each batch's wall-clock stays comfortably under the budget (less tail latency in the CI pipeline).

  • Coverage integration: 5 -> 8 batches (LLVM_IT_NUM_BATCHES, which also drives the coverage profdata artifact list, so one constant scales both jobs and artifacts). Worst balanced per-batch time drops from ~7260s to ~4500s, ~38% headroom under the unchanged 7200s session-timeout.
  • Integration tests (amd_msan): 6 -> 8 batches, for the same reason.

No test is weakened or skipped.

CI report for the timing-out coverage batch on PR #105905: https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=105905&sha=595fce765ad136596140d6a969b7bb6dff649699&name_0=PR&name_1=Integration%20tests%20%28amd_llvm_coverage%2C%202%2F5%29

Version info

  • Merged into: 26.7.1.199 (included in 26.7 and later)

@groeneai

Copy link
Copy Markdown
Collaborator Author
Pre-PR validation gate (click to expand)
# Question Answer
a Deterministic repro? Yes. CIDB + the batch-2/5 job.log show xdist.dsession.Interrupted: session-timeout: 7200.0 sec exceeded firing at exactly the limit. Greedy LPT packing of the run's 21631s of module time into 3 workers gives a ~7211s tail latency, already over the 7200s --session-timeout even with perfect balancing, before scheduling slack.
b Root cause explained? Yes. The is_llvm_coverage branch set session_timeout_parallel = 7200, identical to the non-coverage default 3600 * 2, so the parallel phase got no extra budget despite coverage binaries running ~3-5x slower (only the sequential phase was actually raised). The batches pack right up to that ceiling, so any slowdown/imbalance tips them over and xdist aborts the whole batch.
c Fix matches root cause? Yes. Raises the coverage parallel session-timeout to 3600 * 3 (10800s), directly fixing the no-op and clearing the observed balanced max (~7260s) with ~50% headroom.
d Test intent preserved? / New tests? Yes. No test is weakened, skipped, or tagged out. The timed-out run was 1256 OK / 4 SKIPPED / 0 FAIL: nothing failed, the batch only ran out of wall-clock. The change just grants enough time to finish.
e Demonstrated both directions? Data-driven. WITHOUT fix: balanced tail latency ~7211s > 7200s limit -> timeout (observed on master commit 4dde9a6 and 12 unrelated PRs). WITH fix: ~7211s < 10800s -> completes. Bounded under the 18000s job ceiling (the timed-out job ran 7343s).
f Fix general, not a narrow patch? N/A (CI-harness timeout-config change, not a code bug). The fix covers all coverage integration batches, not just 2/5.
g Generalizes across inputs/types? N/A (CI-harness timeout-config change, not a code bug).
h Backward compatible? N/A (CI-harness timeout-config change, not a code bug). No user-facing behavior, setting, or format changes.
i Invariants/contracts preserved? Yes. The sequential phase is skipped when the parallel phase errors, so parallel + sequential never stack toward the 18000s job ceiling; worst case stays well under it. The deliberate 5-batch split is unchanged.

Session id: cron:clickhouse-worker-slot-0:20260626-021500

@groeneai

Copy link
Copy Markdown
Collaborator Author

cc @maxknv @leshikus — could you review this? The is_llvm_coverage branch set the parallel session-timeout to 7200, which equals the non-coverage default (3600 * 2), so coverage integration batches got no extra wall-clock despite running ~3-5x slower and intermittently abort the whole batch with session-timeout: 7200.0 sec exceeded. This raises the coverage parallel timeout to 3600 * 3.

@clickhouse-gh

clickhouse-gh Bot commented Jun 26, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [47c5618]

Summary: ✅


AI Review

Summary

This PR splits Integration tests (amd_llvm_coverage, N/M) from 5 to 8 batches and Integration tests (amd_msan, N/M) from 6 to 8 batches, then regenerates the Praktika workflow YAMLs. I found the source definitions, generated job names, coverage artifact list, and aggregate llvm_coverage dependencies consistent with the new batch counts, and I did not find any new review findings.

Final Verdict

Status: ✅ Approve

@clickhouse-gh clickhouse-gh Bot added the pr-ci label Jun 26, 2026
@maxknv

maxknv commented Jun 26, 2026

Copy link
Copy Markdown
Member

@groeneai, instead of raising the timeout, increase the number of job batches. We should try to keep the run time tight to avoid tail latency in the CI pipeline.
Also add 2 more batches for 'Integration tests (amd_msan)' (6 batches -> 8 batches)

The Integration tests (amd_llvm_coverage, N/M) jobs intermittently fail with
a whole-batch "ERROR: session-timeout occurred during test execution" (a
synthetic Timeout row, no individual test failure). Coverage-instrumented
binaries run roughly 3-5x slower, and at 5 batches each batch packs right up
to the parallel session-timeout: over 10 days the balanced (sum/3) per-batch
time reaches ~7240-7260s for batches 2/3/4, on top of a 7200s budget, so any
packing imbalance tips them over. The job reported all tests OK; the batch
simply ran out of wall-clock and xdist raised "session-timeout exceeded".

Rather than raise the timeout, keep the per-batch run time tight and increase
the batch count so each batch's wall-clock stays comfortably under the budget
(less tail latency in the CI pipeline). Going from 5 to 8 coverage batches
cuts the per-batch module set to ~5/8, bringing the worst balanced per-batch
time to ~4500s with ~38% headroom under the unchanged 7200s session-timeout.
The extra batches run in parallel, so this trades a small amount of runner
time for shorter and more reliable batch wall-clock. LLVM_IT_NUM_BATCHES also
drives the coverage profdata artifact list, so the single constant scales both
the jobs and their artifacts.

Also split Integration tests (amd_msan) from 6 to 8 batches for the same
reason.

No test is weakened or skipped.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
@groeneai
groeneai force-pushed the groeneai/coverage-integration-session-timeout branch from 1f986f8 to 591b8b7 Compare June 26, 2026 22:35
@groeneai groeneai changed the title Raise parallel session-timeout for LLVM coverage integration tests Split coverage and amd_msan integration tests into more batches Jun 26, 2026
@groeneai

Copy link
Copy Markdown
Collaborator Author

@maxknv done, pivoted as requested:

  • Reverted the session-timeout change.
  • Coverage integration: 5 -> 8 batches (LLVM_IT_NUM_BATCHES). Worst balanced per-batch time drops ~7260s -> ~4500s, ~38% headroom under the unchanged 7200s budget.
  • Integration tests (amd_msan): 6 -> 8 batches.

No timeout raised; per-batch run time kept tight. Diff is 2 files, +3/-3.

@clickhouse-gh clickhouse-gh Bot added the manual approve Manual approve required to run CI label Jun 26, 2026
@maxknv
maxknv self-requested a review June 27, 2026 11:24
groeneai and others added 2 commits June 27, 2026 11:39
Regenerated .github/workflows/master.yml and pull_request.yml via
'python3 -m ci.praktika yaml' to match the ci/defs batch-count changes
(amd_llvm_coverage 5->8, amd_msan 6->8). Fixes the Config Workflow check.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
…ntegration-session-timeout

# Conflicts:
#	.github/workflows/pull_request.yml
@alexey-milovidov
alexey-milovidov added this pull request to the merge queue Jun 28, 2026
Merged via the queue into ClickHouse:master with commit 58f596e Jun 28, 2026
174 checks passed
@robot-clickhouse-ci-2 robot-clickhouse-ci-2 added the pr-synced-to-cloud The PR is synced to the cloud repo label Jun 28, 2026
zeekay pushed a commit to hanzoai/datastore that referenced this pull request Sep 11, 2026
…integration-session-timeout

Split coverage and amd_msan integration tests into more batches
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

can be tested Allows running workflows for external contributors manual approve Manual approve required to run CI pr-ci 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.

5 participants