Repository navigation
Report a crashed server as Server died in functional tests - #124032
Merged
leshikus merged 3 commits intoNov 20, 2026
Merged
Conversation
A functional-test run whose server crashed was reported as `Server liveness check failed`, a leaf that reads like a harness flake, and Fast test did not show the crash at all (e.g. PR ClickHouse#119389 @ 80040fd: a SIGSEGV in `SerializationDynamic::serializeTextJSON` showed up as one liveness row with 0 failed tests). `probed_server_process` already tells a gone listener (nothing listens on the probed port: the process is dead) from a held one (alive but silent) and from "cannot tell", but `HungCheckMonitor.is_hung` and `probed_server_is_gone` collapsed that into a bool, so every failed probe claimed `HUNG_CHECK_EXIT_CODE`. Now a failed probe with the listener gone or replaced claims `STOP_TESTING_EXIT_CODE` / `FailureReason.SERVER_DIED` (leaf `Server died`); a held listener past the grace and the cannot-tell case keep `HUNG_CHECK_EXIT_CODE` (leaf `Server liveness check failed`). Probe timing, retries and the grace are unchanged. `fast_test.py` now appends the failing rows of `check_fatal_messages_in_logs()` when the run was aborted, as the stateless job does in its error-check stage, so the crash is a row of the report (e.g. `Segmentation fault (STID: ...)` with the stack trace). Related: ClickHouse#119389 Co-Authored-By: Claude Opus 5.5 <[email protected]>
Collaborator
Author
Internal second-model review: adjudication log (click to expand)Pre-publication review by an independent model (engine: claude; 1 finding) plus my own cold review (2 findings).
Severity: ❌ blocker / Session id: cron:clickhouse-review-slot-10:20261005-133100 |
Contributor
|
Workflow [PR], commit [12f1276] Summary: ✅ AI ReviewSummaryDistinguishes confirmed listener loss from failed liveness probes, preserves coordinated shutdown in parallel workers, and adds fatal-log diagnostics to aborted Final VerdictStatus: ✅ Approve. |
1 task done
…-server-verdict Resolve the conflict in ci/jobs/fast_test.py: keep master's `Targeting` import and `fail_slow_new_tests` call next to this PR's `ABORTED_RUN_EXIT_CODES` import and crash-row block. The two only touch different result rows (`fail_slow_new_tests` checks `OK` rows of new tests; the crash rows are failures), so their order does not matter. Co-Authored-By: Claude Opus 5.5 <[email protected]>
The `SERVER_DIED` branch of `run_tests_array` called `stop_tests()` in parallel workers too. Its `killpg` sends SIGTERM to the whole group, including the parent, which then exited 143 (`Terminated`) instead of `STOP_TESTING_EXIT_CODE`. The liveness, max-failures and time-limit branches already skip it in parallel workers and let the parent stop the workers with SIGTERM masked. This branch is now also reached when a worker's probe finds the listener gone, which before this PR went through the liveness branch. With a test that SIGKILLs its server and no --hung-check (one worker), the runner exits 143 without this change and 2 with it, the leaf is `Server died` in both cases. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related: #119389
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
...
Description
Fast teston #119389 @80040fd0(report) shows one failing row,Server liveness check failed, andFailed: 0. The server had died: itsclickhouse-server.err.loghas<Fatal> BaseDaemon: ... Received signal 11inSerializationDynamic::serializeTextJSON. In 30 days 59Fast testruns on 20 PRs ended with this row, none showing the crash; all 5 with readable artifacts were real crashes.Two gaps:
tests/clickhouse-test:probed_server_processtells a gone listener (dead process) from a held one (alive but silent) and from "cannot tell", butHungCheckMonitor.is_hungand the worker-sideprobed_server_is_gonereduced that to a bool, so every stop on a failed probe claimedHUNG_CHECK_EXIT_CODE. Now a failed probe with the listener gone or replaced claimsSTOP_TESTING_EXIT_CODE/SERVER_DIED(rowServer died), and a parallel worker that sees it leaves the stop to the parent like the liveness branch (itsstop_tests()SIGTERMed the parent: exit 143). A listener still held past the grace, or an unknown state (no/proc, a remote server), keepsServer liveness check failed. Probe timing, retries and grace are unchanged.ci/jobs/fast_test.pynever scanned the server logs. On an aborted run it now appends the failing rows ofcheck_fatal_messages_in_logs(), like the stateless job, e.g.Segmentation fault (STID: 3887-3f80)with its stack trace.Validated with throwaway drivers (not committed): a test that SIGKILLs its own server gives exit 5 and
Server liveness check failedon master, exit 2 andServer diedhere, whether the parent or a worker detects it; a SIGSTOPped server (alive, silent) still givesServer liveness check failed; thefast_test.pyblock on the 80040fd server logs adds exactly thatSegmentation faultrow, and nothing without a crash.Not covered (as on master): a server that dies in the last sequential test still ends as
clickhouse-testexit code 1; noFast testrun hit it in 90 days.Workflow [PR]
Sync PR [sync-upstream/pr/124032]
Version info
26.12.1.44-master(included in26.12and later)