Skip to content

Scale the cancellation-latency bounds of 04648_geohashes_in_box_cancellation for sanitizer builds - #113923

Closed
alexey-milovidov wants to merge 2 commits into
masterfrom
fix/deflake-04648-geohashes-cancellation
Closed

alexey-milovidov wants to merge 2 commits into
masterfrom
fix/deflake-04648-geohashes-cancellation

Conversation

@alexey-milovidov

@alexey-milovidov alexey-milovidov commented Aug 8, 2026 •

Copy link
Copy Markdown
Member

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

Deflake the test 04648_geohashes_in_box_cancellation: scale the cancellation-latency bounds for sanitizer and coverage builds, and extend the readiness window of the KILL case for slow runners.

After the earlier deflake in #112823, the remaining failures of this test (~24 in the last 14 days, across master and unrelated PRs) fall into two modes:

  1. Bound overruns on sanitizer builds. The KILL ... SYNC latency reached 4464–4882 ms against the 4000 ms bound under TSan/MSan, e.g. this report (expanding kill blocked 4882ms), and query_duration_ms reached 5355–7167 ms against the same 4000 ms bound on the ASan/UBSan Azure runner (float64 throw ran 7167ms past a 1000ms limit). The bound is now scaled 3x on sanitizer and coverage builds, following the existing pattern of 04722_count_substrings_cancellation / 04650_replace_cancellation: those builds stretch the work in flight when the cancellation check fires, but stretch the unfixed path (a block that runs for tens of seconds) at least as much, so the scaled bound of 12000 ms still separates the fixed behavior from the unfixed one. On release builds the bound stays 4000 ms.

  2. Readiness-poll timeouts on busy runners (expanding kill: query never reached the row loop, the dominant mode: 11 failures on arm_binary and 6 on amd_debug). The readiness poll of run_kill_case was a fixed 500 iterations of 20 ms, and on a busy runner the query start alone can outlast those ten seconds. The window is not part of the fixed/unfixed oracle — it only waits for setup — so it is now sixty seconds on every build, with an early exit when the client process dies so a genuine startup failure still reports promptly instead of outwaiting the window.

The test still passes locally on a release build (byte-for-byte against the reference).

Closes: #113922

…ellation` for sanitizer and coverage builds

After the earlier deflake (#112823), the remaining failures of this test are
bound overruns on sanitizer builds only: the `KILL ... SYNC` latency reached
4464-4882 ms against the 4000 ms bound under TSan/MSan, and `query_duration_ms`
reached 5355-7167 ms against the same bound on the ASan/UBSan Azure runner
(e.g. https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=110613&sha=e23d6eeccd2a175a5535fbfece080af0db7e9525&name_0=PR&name_1=Stateless%20tests%20%28amd_msan%2C%20WasmEdge%2C%20parallel%2C%203%2F3%29).
Scale the bound 3x on sanitizer and coverage builds, following the pattern of
`04722_count_substrings_cancellation`: those builds stretch the unfixed path
(tens of seconds) at least as much as the fixed one, so 12000 ms still separates.

Closes: #113922

Co-Authored-By: Claude Fable 5 <[email protected]>
@clickhouse-gh

clickhouse-gh Bot commented Aug 8, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [0db938e]

Summary: ✅


AI Review

Summary

This PR deflakes 04648_geohashes_in_box_cancellation by scaling its cancellation-latency bounds on sanitizer and coverage builds, and by extending the KILL readiness window for slow runners. I did not find any remaining correctness or test-contract issues in the current head; the earlier readiness-gap review thread is addressed and the current CI report for this PR is all green.

Final Verdict

✅ No blocking review findings.

@clickhouse-gh clickhouse-gh Bot added the pr-ci label Aug 8, 2026
…er slow runners

The readiness poll of `run_kill_case` was a fixed 500 iterations of 20 ms, and
#113922 shows this as the dominant
failure mode (`expanding kill: query never reached the row loop`, 11 failures on
`arm_binary` and 6 on `amd_debug` in 14 days): on a busy runner the query start
alone can outlast ten seconds. The window is not part of the fixed/unfixed oracle -
it only waits for setup - so it is now sixty seconds on every build, with an early
exit when the client process dies so a genuine startup failure still reports
promptly instead of outwaiting the window.
@clickhouse-gh

clickhouse-gh Bot commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

Build profile diff (arm_release)

Comparing 0db938e6d with master 4641beb50 (stripped binary size, per-symbol sizes and ThinLTO time; compile times per translation unit against the most recent warmup build that recompiled it).

✅ No significant changes.

Binary sizes
Binary Master PR Δ
programs/clickhouse-stripped 690.42 MiB 687.39 MiB -3.03 MiB (-0.44%)

Only the stripped binary is compared: the official master build keeps debug symbols while PR builds strip them, so the other binaries differ by construction.

Compile time of recompiled translation units

40 translation units recompiled, 29 s compile time in total, 6 of them have a recent master baseline.

Job report

@alexey-milovidov alexey-milovidov left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@alexey-milovidov alexey-milovidov self-assigned this Aug 9, 2026
@alexey-milovidov
alexey-milovidov added this pull request to the merge queue Aug 9, 2026
@PedroTadim

Copy link
Copy Markdown
Member

I am going to remove the test myself

@PedroTadim
PedroTadim removed this pull request from the merge queue due to a manual request Aug 9, 2026
@PedroTadim PedroTadim closed this Aug 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Flaky test 04648_geohashes_in_box_cancellation: cancellation-latency bounds exceeded on slow/busy runners

2 participants