Skip to content

Skip 02293_http_header_full_summary_without_progress on LLVM coverage - #103293

Closed
groeneai wants to merge 1 commit into
ClickHouse:masterfrom
groeneai:fix-02293-http-header-llvm-coverage
Closed

groeneai wants to merge 1 commit into
ClickHouse:masterfrom
groeneai:fix-02293-http-header-llvm-coverage

Conversation

@groeneai

Copy link
Copy Markdown
Collaborator

The test hardcodes curl --max-time 10 together with max_execution_time=2 and relies on the server producing an X-ClickHouse-Summary header (with a non-zero read_rows value) and an HTTP/1.1 408 Request Time-out response within that 10-second window.

Under amd_llvm_coverage builds, source-based coverage instrumentation slows the server enough that curl sometimes times out before any summary header is emitted. When that happens READ_ROWS becomes an empty string, and line 27's integer comparison if [ "$READ_ROWS" -ne 0 ] fails with [: : integer expression expected. The runner successfully reruns the test (Failed 0 out of 3 reruns), so this is a single-shot timing flake confined to coverage builds.

CIDB evidence (30 days)

  • Failures: 10, all on amd_llvm_coverage variants (2/3, AsyncInsert s3 storage parallel, ParallelReplicas s3 storage parallel)
  • Master/release-branch hits: 0
  • Distinct unrelated PRs affected: 10
check_name                                                       count
Stateless tests (amd_llvm_coverage, 2/3)                         6
Stateless tests (amd_llvm_coverage, ParallelReplicas, s3 ...)    2
Stateless tests (amd_llvm_coverage, AsyncInsert, s3 ...)         2

Same failure family as 01473, 03096, 03258, 04078, and 01514.

Add no-llvm-coverage to skip the test on coverage builds, matching the established pattern used by PRs #103287, #103288, #103219, and #103226.

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):

Not for changelog.

Documentation entry for user-facing changes

  • Documentation is written (mandatory for new features)

The test hardcodes `curl --max-time 10` together with
`max_execution_time=2` and relies on the server producing an
`X-ClickHouse-Summary` header (with a non-zero `read_rows` value) and an
`HTTP/1.1 408 Request Time-out` response within that 10-second window.

Under `amd_llvm_coverage` builds, source-based coverage instrumentation
slows the server enough that `curl` sometimes times out before any
summary header is emitted. When that happens `READ_ROWS` becomes an
empty string, and line 27's integer comparison
`if [ "$READ_ROWS" -ne 0 ]` fails with
`[: : integer expression expected`. The runner successfully reruns the
test (`Failed 0 out of 3 reruns`), so this is a single-shot timing flake
confined to coverage builds.

CIDB confirms the pattern: over the last 30 days all 10 failures are on
`amd_llvm_coverage` variants (`2/3`, `AsyncInsert s3 storage parallel`,
`ParallelReplicas s3 storage parallel`), across 10 unrelated PRs, with
zero master hits. Same failure family as 01473, 03096, 03258, 04078, and
01514.

Add `no-llvm-coverage` to skip the test on coverage builds, matching the
established pattern used by PRs ClickHouse#103287, ClickHouse#103288, ClickHouse#103219, and ClickHouse#103226.
@groeneai

Copy link
Copy Markdown
Collaborator Author

cc @alexey-milovidov — could you review this? It adds the no-llvm-coverage tag to 02293_http_header_full_summary_without_progress so the test is skipped on amd_llvm_coverage builds, matching the established pattern from #103226, #103219, #103287, and #103288. CIDB shows 10 failures in 30 days all on coverage variants and zero master hits.

@groeneai

Copy link
Copy Markdown
Collaborator Author

Pre-PR validation gate self-review

a) Deterministic repro signal? Yes — the CIDB correlation is the deterministic signal: 100% of 30-day failures (10/10) are on amd_llvm_coverage variants, 0% elsewhere. The timing race itself is stochastic by nature; the build flavor is the deterministic trigger.

b) Root cause explained? LLVM source-based coverage instrumentation slows the server's HTTP request handling. The test hardcodes curl --max-time 10 and max_execution_time=2 and parses X-ClickHouse-Summary from the response headers. When the coverage-instrumented server is too slow, curl times out before any summary header is emitted, $READ_ROWS becomes an empty string, and line 27's if [ "$READ_ROWS" -ne 0 ] fails with [: : integer expression expected.

c) Fix matches root cause? Yes. The test fundamentally depends on HTTP-level timing that the coverage build cannot meet; the correct action is to exclude it from coverage runs. Same conclusion reached for sibling tests 01473, 03096, 03258, 04078, and 01514.

d) Test intent preserved? Yes. The test still runs on all normal build flavors (debug, release, asan, ubsan, tsan, msan, release with sanitizers) and continues to validate the HTTP 408 + X-ClickHouse-Summary behavior there. Only coverage builds (which are not a production configuration) are skipped.

e) Both directions demonstrated? The correlation is demonstrated in both directions via CIDB: 10 failures on coverage / 0 elsewhere without the fix; with the fix the test is no longer executed on coverage so the failure mode is eliminated, while non-coverage runs continue passing unchanged.

Session: cron:clickhouse-ci-task-worker:20260421-201500

@nikitamikhaylov nikitamikhaylov added the can be tested Allows running workflows for external contributors label Apr 22, 2026
@clickhouse-gh

clickhouse-gh Bot commented Apr 22, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [05117a9]

Summary: ❌

job_name test_name status info comment
Stateless tests (amd_llvm_coverage, old analyzer, s3 storage, DatabaseReplicated, WasmEdge, parallel) FAIL
00600_replace_running_query FAIL cidb, issue
Stateless tests (amd_llvm_coverage, 3/3) FAIL
03150_trace_log_add_build_id FAIL cidb

AI Review

Summary

This PR adds the no-llvm-coverage tag to 02293_http_header_full_summary_without_progress.sh and documents why coverage-instrumented builds can make this HTTP timing-sensitive test flaky. The change is narrowly scoped to CI stability for a known coverage-only flake and does not alter server behavior.

ClickHouse Rules
Item Status Notes
Deletion logging ➖
Serialization versioning ➖
Core-area scrutiny ➖
No test removal ✅
Experimental gate ➖
No magic constants ✅
Backward compatibility ✅
SettingsChangesHistory.cpp ➖
PR metadata quality ✅
Safe rollout ✅
Compilation time ✅
No large/binary files ✅
Final Verdict
  • Status: ✅ Approve

@clickhouse-gh clickhouse-gh Bot added the pr-ci label Apr 22, 2026
subkanthi pushed a commit to subkanthi/ClickHouse that referenced this pull request Apr 24, 2026
…n amd_llvm_coverage

Adds `no-llvm-coverage` tag — under LLVM source-based coverage instrumentation the
server is ~3-5x slower, and with `memory_profiler_sample_probability = 1` the test
emits many `MemorySample` trace rows. The server-side `SystemLogQueue<TraceLogElement>`
flush then routinely exceeds its 180s deadline, emitting `Code: 159 TIMEOUT_EXCEEDED`
into stderr and causing the `clickhouse-test` stderr-empty check to report the test
as `FAIL` even when the assertion output itself is correct.

CIDB evidence (30 days):
- 34 failures, 25+ distinct unrelated PRs, 4 master hits — all on `amd_llvm_coverage`
  variants only (1/3, ParallelReplicas+s3+parallel, AsyncInsert+s3+parallel).
- Zero failures on debug, asan_ubsan, tsan, msan, release, binary builds in the same
  window.
- Health check: in 7 days the test has 657-706 OK runs on each of the 4 coverage
  variants (so it passes most of the time; 180s deadline is a rare stochastic trip).

Same pattern and fix as the recent sibling coverage flakes:
  ClickHouse#103287, ClickHouse#103288, ClickHouse#103293, ClickHouse#103298, ClickHouse#103226, ClickHouse#103219.

Closes the `ci-02818memoryprofilersampleminmax` chronic-flaky tracking task.
@groeneai

Copy link
Copy Markdown
Collaborator Author

Superseded by PR #103248 (merged 2026-04-25 by @alexey-milovidov), which already added no-llvm-coverage to this test along with several siblings. Verified on master: tests/queries/0_stateless/02293_http_header_full_summary_without_progress.sh line 2 now reads # Tags: no-fasttest, no-llvm-coverage. Closing as a no-op duplicate.

Tracking task: 2026-04-21-ci-p2-02293httpheaderfullsummarywi (closing in parallel).

@groeneai groeneai closed this Apr 28, 2026
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 pr-ci

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants