Repository navigation
Conversation
`clickhouse stop --force` SIGKILLs the server, the child of the watchdog, and the watchdog logs it with the same `<Fatal> ... Child process was terminated by signal 9 (KILL) ... the possible cause is OOM Killer` record as a kernel OOM kill. `stress_job.py` sets `is_oom` on that record and turns any failed result into `OK` + `OOM error (allowed in stress tests)`. The harness force-kills exactly when something hung, so the hung checks, shutdown deadlocks and sanitizer reports of those runs went green: 32 of the 36 runs with a shutdown deadlock or stateful-prep timeout in 30 days, e.g. master f5b8c2c `Stress test (arm_tsan)` and 175f851 `Stress test (azure, amd_tsan)` (TSan heap-use-after-free, STID 1938-332e). The few red ones ran with `logger.async=1`, which can lose the record because the watchdog `_exit`s right after logging it. `kill_server` kills the watchdog instead (a fork of the same binary, the server's parent). The server dies with it through `PR_SET_PDEATHSIG` and nothing logs the record. `clickhouse stop --force` still runs afterwards, as the fallback when there is no watchdog and to wait until the pid is gone; the runner script is PID 1 of the container and reaps the orphan. The helper writes a `Server killed by the harness` OK row, the same pattern as `Warning: server did not stop yet`. All four forced stops (both branches of `stop_server`, `run_prep_statement`, the upgrade check's tables-count block) use it. The watchdog's record was also what made `stress_job.py` run the log parser for these runs, which is how their sanitizer reports got a row. A killed server now runs the parser too, keeping only the failures the logs name, so a tolerated kill with nothing else wrong stays green. Genuine OOM kills (the kernel kills the server, the watchdog logs it) and the crashed path are unchanged. Validated in `clickhouse/stress-test` with the script as PID 1, on master and 26.10.2.103 binaries, and by replaying `run_stress_test` on the uploaded artifacts of the two master jobs above and of the genuine memcg OOM in ClickHouse#127014. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…erver A killed server now runs the log parser, whose last class names any `(total) memory limit exceeded` line in the err log. Before, the watchdog record pre-empted it, and `clickhouse-test` retries that line as noise, so a tolerated slow stop must not go red on it. Drop it on the killed path only. 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; 3 findings, 0 on the re-review of the fix) plus my own review (2 nits).
Severity: ❌ blocker / Session id: cron:clickhouse-review-slot-8:20261102-224400 |
Pre-PR validation gate (click to expand)
Session id: cron:clickhouse-impl-slot-7:20261102-213000 |
|
cc @leshikus, could you review this and add the |
|
Workflow [PR], commit [78e4a07] Summary: ✅ AI ReviewSummaryThe PR distinguishes server termination by the stress harness from a kernel OOM kill and parses server logs after harness kills to preserve hang and sanitizer failures. No actionable findings at Final VerdictStatus: ✅ Approve |
CI finish ledger - f1f29b3Every failure below has an owner: a fixing PR (mine or external), or a full-effort fix task
Session id: cron:our-pr-ci-monitor:20261103-023003 |
…ill-not-oom Resolve the conflict in tests/docker_scripts/stress_tests.lib: keep kill_server and take master's removal of wait_server_port_free (replaced by wait_server_ports_free). Co-Authored-By: Claude Opus 5.5 <[email protected]>
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
...
Description
Stress test (*)andUpgrade check (*)go green withOOM error (allowed in stress tests)whenever the harness itself has to SIGKILL a server that would not stop, and that clears every other failure of the run. Over 30 days, 32 of the 36 runs with a shutdown deadlock or a stateful-prep timeout were green, 18 of them with a ThreadSanitizer report. Two master jobs:Stress test (arm_tsan)on f5b8c2c15a58: hung check + shutdown deadlock, green.Stress test (azure, amd_tsan)on 175f851476e1: the same plus a TSan heap-use-after-free (STID 1938-332e), green.clickhouse stop --forcekills the server, and the watchdog logs it with the same<Fatal>record as a kernel OOM kill.stress_job.pyreads that record as OOM.kill_serverinstress_tests.libkills the watchdog instead. The server dies with it (PR_SET_PDEATHSIG), nothing is logged, andclickhouse stop --forcestill runs afterwards. It also writes aServer killed by the harnessOK row. All four kill sites use it. For a killed server,stress_job.pynow runs the log parser and keeps only the defects it names (not a query's(total) memory limit exceeded), so a TSan report keeps its row. Genuine OOM kills are handled as before.Validation, in the CI image with the script as PID 1, on master and 26.10.2.103 binaries: the server and watchdog are gone, with no zombie and no record, and the restart works. Master's harness and a direct server kill do log the record. I replayed
run_stress_teston both jobs above: they now fail with those findings named. A tolerated slow stop stays green, and the genuine memcg OOM of #127014 is unchanged.Not changed here: the AST fuzzer reads a
clickhouse stopSIGKILL as a sanitizer OOM too (1 of 16 such runs in 30 days).Workflow [PR]
Sync PR [sync-upstream/pr/128778]