Repository navigation
Conversation
…hutdown La Casa Del Dolor force kills a server that has not stopped 30 s after SIGTERM and reports `Server shutdown` as failed. The generated server configs set `shutdown_wait_unfinished` but only sometimes sample `shutdown_wait_backups_and_restores`, so most runs keep its default `true`. In that mode the server waits in `BackupsWorker::waitAll` for every running backup or restore, with no time limit. BuzzHouse issues `BACKUP`/`RESTORE ... ON CLUSTER` with `backup_restore_keeper_fault_injection_probability` up to 1.0, and a failed operation then spends 76.3 s in `setError` Keeper retries that cannot be cancelled, plus up to 180 s in `waitOtherHostsFinish`. In 3 of the 4 gdb dumps of the red runs the main thread is in that wait; in the amd_debug one the operation ended 1 s before the force kill. Always run the servers with `shutdown_wait_backups_and_restores = 0`, where `shutdown_wait_unfinished` bounds the wait. That mode can wait `shutdown_wait_unfinished` twice: once for the cancelled operations, then again in `waitServersToFinish` for the connection of a synchronous `BACKUP` that is still waiting for its operation. So the cap on `shutdown_wait_unfinished` is halved from 20 to 10 s. Measured on a master debug build, a one-host `BACKUP ... ON CLUSTER` with fault injection 1.0 and SIGTERM 3 s later takes this long to exit: wait mode 153.7 s, bounded mode with 20 s 41.5 s, bounded mode with 10 s 20.1 s, no fault injection 1.9 s. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Internal second-model review: adjudication log (click to expand)Pre-publication review by an independent model (engine: codex; 0 findings) plus an own cold review (0 blockers, 0 majors).
Severity: ❌ blocker / Session id: cron:clickhouse-review-slot-8:20261102-212900 |
Pre-PR validation gate (click to expand)
Session id: cron:clickhouse-impl-slot-7:20261102-210600 |
|
cc @maxknv, could you review this and add the |
|
Workflow [PR], commit [cba80b6] Summary: ✅ AI ReviewSummaryThis PR configures La Casa Del Dolor to cancel running backups and restores during shutdown and caps Final VerdictStatus: ✅ Approve |
|
@groeneai fix conflict |
|
@qoega The conflict comes from #128774 (merged 09:28 UTC), which makes the same change: |
Related: #94148
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
...
Description
Server shutdownfails in La Casa Del Dolor on master (amd_debug, arm_asan_ubsan) and in 2 unrelated PRs. The harness force kills a server that has not stopped 30 s after SIGTERM.The CI job never sets
shutdown_wait_backups_and_restores(it is only among the randomly sampled settings, which the job turns off with--server-settings-prob=0), so the servers keep its defaulttrueand wait inBackupsWorker::waitAllfor every running backup or restore, with no time limit. BuzzHouse runsBACKUP/RESTORE ... ON CLUSTERwithbackup_restore_keeper_fault_injection_probabilityup to 1.0. A failed operation then spends 76.3 s insetErrorKeeper retries, which cannot be cancelled. In 3 of the 4 gdb dumps the main thread is in that wait; in the amd_debug one the operation ended 1 s before the kill.The servers now always run with
shutdown_wait_backups_and_restores = 0, whereshutdown_wait_unfinishedbounds the wait (#115377). That mode can waitshutdown_wait_unfinishedtwice: for the cancelled operations, then for the connection of a synchronousBACKUPstill waiting for its operation. So its cap is halved from 20 to 10 s. The wait mode stays covered bytest_shutdown_wait_backupandtest_shutdown_waits_for_backup. Keeping it fuzzed here would need a longer stop window, and that mode has no finite bound to size one by.Validation on a master debug build: a one-host
BACKUP ... ON CLUSTER(andRESTORE) with fault injection 1.0, SIGTERM 3 s later. Time to exit: wait mode 153.7 s, bounded with 20 s 41.5 s, bounded with 10 s 20.1 s. Of 300 configs generated with every setting sampled, 225 used the wait mode and 149 had a cap above 10 s before the change, and none after.🤖 Generated with Claude Code
Workflow [PR]
Sync PR [sync-upstream/pr/128763]