Repository navigation
Remove the too tight max_execution_time pin from 02524_fuzz_and_fuss_2 - #112251
Algunenano merged 1 commit into
Conversation
The test pinned max_execution_time = '9' on a one-row INSERT INTO data_a_02187 SELECT * FROM system.one. That setting is a wall-clock deadline, not a work budget: it is registered per query in ProcessList.cpp and enforced by a background thread in CancellationChecker.cpp. On Stateless tests (amd_msan, WasmEdge) the statement was descheduled past its own deadline under load and the test failed with Code: 159. Timeout exceeded: elapsed 11056.432 ms, maximum: 9000 ms. The failing job's server log shows the query logging its last pipeline line, then nothing at all for 9.000839 s, then the cancellation, while 2396 lines from 120 other query ids land in the same window. Nothing in the statement got slower. Removing the pin does not weaken the test. It was added as a test for issue ClickHouse#38729 (Block structure mismatch in Pipes stream), its reference file is empty, it expects no server or client error, and EXPLAIN PIPELINE of the statement is byte-identical with and without the token. The test stays bounded by the harness --timeout of 600 s. Raising the value again was not an option: PR ClickHouse#67867 already raised this same pin from 3 to 9 for the same class of failure. Over the last 30 days this test file takes p50 2170 ms and p95 3210 ms on that flavour, and 24 of 8051 passing runs already exceed 9000 ms for the whole file, so no constant makes a per-statement 9 s cap reliable. Verified with three arms on one binary: as-is rc=0, pin removed rc=0, and as a live control the pin forced to 0.001 rc=159. The test then passes 1/1 through the harness and 50/50 with randomized settings.
Internal second-model review (click to expand)Two independent reviews ran against this diff: a cold read of the resulting tree by a reviewer Gate review: 0 findings. Coverage: the changed test, its reference file, the sibling Cold review: 2 findings, both nits in the pull request text, no code finding. Both are fixed
Carriers the cold review enumerated independently before comparing them against the fix plan,
The cold review also confirmed the verification catch recorded by the implementation: run Numbers in the description were re-derived against the CI database in the review session and Session id: cron:clickhouse-review-slot-8:20260728-091700 |
Pre-PR validation gate (click to expand)
Session id: cron:clickhouse-impl-slot-46:20260728-083300 |
|
cc @vdimir — could you review this? It removes |
|
Workflow [PR], commit [b189619] Summary: ✅ AI ReviewSummaryThis PR removes the scheduler-sensitive Final VerdictStatus: ✅ Approve |
CI finish ledger — b189619Every failure below has an owner: a fixing PR (ours or external), or a full-effort fix task
Session id: cron:our-pr-ci-monitor:20260728-183000 |
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
...
Description
02524_fuzz_and_fuss_2fails onStateless tests (amd_msan, WasmEdge, parallel, 2/2)withReport: https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=111996&sha=45889523a9d342ccecedb8dce69081922db4bee5&name_0=PR&name_1=Stateless%20tests%20%28amd_msan%2C%20WasmEdge%2C%20parallel%2C%202%2F2%29
The 9000 ms is not a CI default and is not randomized. It comes from one token in the test's own
SETTINGSblob, and I remove that token here.Root cause.
max_execution_timeis a wall-clock deadline, not a work budget: it isregistered once per query in
ProcessList.cpp:381and a background thread cancels the querywhen that wall time elapses (
CancellationChecker.cpp:37-44). In the failing job's server log,the query (
114e12ad-cc2d-41e4-9621-449dbdd06530) logs its last pipeline line at15:49:36.864398, then nothing at all for 9.000839 s, then15:49:45.865237 CancellationChecker: Cancelling the task because of the timeout: 9000 ms. Inthat same window the server logged 2396 lines across 120 other query ids. So a one-row
INSERT ... SELECT * FROM system.onewas descheduled past its own deadline under load. Nothingin the statement got slower.
Why removing the pin does not weaken the test. The test was added in 773184d as a
test for #38729 (
Block structure mismatch in Pipes stream: different types), so what itasserts is that this fuzzed statement does not produce a block-structure mismatch. Its
.referencefile is empty, it contains noserverErrororclientErrorexpectation, andEXPLAIN PIPELINEof the statement is byte-identical with and without the token (39-line graph,same md5), so the setting shapes no plan. After the removal the statement runs at the server
default
max_execution_time = 0, so no deadline task is registered at all(
CancellationChecker.cpp:85-89returns early for a non-positive timeout). The test stays boundedfrom outside: the client stops waiting after its own
receive_timeout, which is the client configdefault of 300 s and not the
receive_timeout = '10'in this blob, andclickhouse-testkillsthe test process at
--timeout(600 s). In the flaky check, which runs a test repeatedly, a runlonger than
TEST_MAX_RUN_TIME_IN_SECONDS(180 s) is failed as too long as well.Why not raise it again. #67867 already raised this same pin from 3 to 9 for this same class
of failure. A larger constant would be the third value for one defect and would still be a
wall-clock race. The numbers say no constant is safe here: over passing runs in the last 30
days, this test FILE takes p50 2170 ms / p95 3210 ms on
amd_msan, WasmEdge, and 24 of 8051passing runs on that flavour already exceed 9000 ms for the whole file. A 9 s cap on one
statement inside such a file has no headroom by construction.
Breadth. Over 60 days this test has 5 failures across 5 pull requests and 0 on master. Two
of them are this defect, both on
amd_msan, WasmEdge, both with the same statement and the samemaximum: 9000 ms. The other three are unrelated and belong elsewhere (oneCode: 201 Quota for user default, twoCode: 241 (total) memory limit exceededunder hostmemory pressure).
Verification. Three arms with the same binary: as-is rc=0, pin removed rc=0, and as a live
control the pin forced to
0.001rc=159 (Timeout exceeded: elapsed 2.543 ms, maximum: 1 ms),which shows the guard is detectable and that only this token can produce this failure here. The
test then passes 1/1 through the harness and 50/50 with randomized settings, with no
Code: 159.I kept the rest of the blob untouched, including
max_execution_speed = '1', which cannot fireanyway because
timeout_before_checking_execution_speedis 10 s by default and 300 s in the CIprofile.
Version info
26.8.1.305(included in26.8and later)