Repository navigation
Add startup warning when mdraid is being resynchronized - #100941
Conversation
Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
|
Workflow [PR], commit [adfe3ef] Summary: ✅ AI ReviewSummaryThis PR adds startup detection for Linux Missing context
ClickHouse Rules
Final Verdict
|
…load for `addOrUpdateWarningMessage` - Check `/sys/block/mdX/md/array_state` in addition to `sync_action` to warn when an mdraid array is in a non-normal state (degraded, inactive, etc.) - Add `addOrUpdateWarningMessage` overload accepting `std::optional<PreformattedMessage>`: passing `nullopt` removes the warning, enabling future periodic checks to automatically clear stale warnings when conditions resolve. - New warning type `LINUX_MDRAID_IS_DEGRADED`. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
…y_state` values These are valid non-degraded states for read-only arrays, so we should not warn about them. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
|
The Stress test (arm_msan) failure is fixed by #101239, which should be merged first. After it is merged, please update the branch to include the fix. |
|
The failures of "Flaky check" in "functions_bad_arguments" will be fixed by #101994. |
|
The flaky test failures in this PR ( |
Split flaky check and targeted check into separate roles: Flaky check — runs only new/modified tests from the PR with thread fuzzer enabled. Tests run in parallel with themselves (shared queue) to ensure new tests are parallel-safe under randomized thread ordering. Targeted check — runs previously failed and coverage-relevant tests with per-worker partitioning (--no-self-parallel) so the same test never runs concurrently on multiple workers, avoiding conflicts on shared resources (hardcoded users, roles, settings profiles, etc.). Both use --test-runs 50. Changes: - Add --no-self-parallel flag to clickhouse-test: partitions tests by name hash so all copies go to the same worker - Flaky check: only changed tests, thread fuzzer, shared queue - Targeted check: relevant tests, no thread fuzzer, per-worker queues, 50 runs, single clickhouse-test invocation - Restore original thread fuzzer parameters (reverts reductions from 06c945a and 9790435) - Add amd_binary to flaky check, use AMD_LARGE for targeted debug - Targeted check uses --flaky-check --no-self-parallel PRs affected by tests running in parallel with themselves: #102015 #101093 #99653 #101503 #101108 #101884 #100746 #101447 #100941 #101099 #100203 #96130 #102038
Split flaky check and targeted check into separate roles: Flaky check — runs only new/modified tests from the PR with thread fuzzer enabled. Tests can run in parallel with themselves (shared queue) to ensure new tests are parallel-safe. Targeted check — runs previously failed and coverage-relevant tests with per-worker partitioning (--no-self-parallel) so the same test never runs concurrently on multiple workers, avoiding conflicts on shared resources (hardcoded users, roles, settings profiles, etc.). Both use --test-runs 50. Changes: - Add --no-self-parallel flag to clickhouse-test: partitions tests by name hash so all copies go to the same worker - Flaky check: only changed tests, thread fuzzer, shared queue - Targeted check: relevant tests, no thread fuzzer, per-worker partitioning, 50 runs, single clickhouse-test invocation - Restore original thread fuzzer parameters - Change targeted check to arm_asan_ubsan on ARM_LARGE PRs affected by tests running in parallel with themselves: #102015 #101093 #99653 #101503 #101108 #101884 #100746 #101447 #100941 #101099 #100203 #96130
|
@groeneai, fix this BuzzHouse finding and send a separate PR. |
|
@groeneai, fix |
|
@groeneai, investigate the deadlock found in the Stress test, fix it and send a separate PR. |
|
@alexey-milovidov Investigation summary on the stress-test deadlock: Specific PR #100941 hits. Two old hung-check failures appeared in CIDB on this PR's CI runs back on March 29-30 ( Chronic umbrella. "Hung check failed, possible deadlock found" has 473 entries / 30d (98 master, 256 distinct PRs, 26 distinct check variants). It is an umbrella of multiple independent deadlock paths (the hung check itself only reports the failure mode, not which root cause triggered it). Why we cannot identify the root cause from CIDB. if res != 0 and have_long_running_queries:
...
with open(args.output_folder / "test_results.tsv", "w+") as results:
results.write(hung_check_status)
hung_check_log.unlink() # ← evidence destroyedSo every "Hung check failed" row in CIDB has an empty Fix PR. I opened #103551 to (1) keep the log on disk so it survives into the artifact upload, and (2) embed the last 32 KiB (processlist + stacktraces are at the end) into the 4th column of Once #103551 is merged, the next "Hung check failed" master/PR hit will give us the actual stack traces, and we'll be able to file targeted fix PRs per deadlock pattern. Tracking task: |
When the stress-test hung check detects long-running queries after the test run, `clickhouse-test --hung-check --capture-client-stacktrace` collects the processlist and gdb backtraces from every server process into `hung_check.log`. This is the primary diagnostic evidence for any deadlock. `stress.py` was deleting that log on the failure path (`hung_check_log.unlink()`), leaving only the bare row `Hung check failed, possible deadlock found\tFAIL\t\\N\t` in `test_results.tsv`. As a result, every "Hung check failed" entry in CIDB has an empty `test_context_raw`, and the artifact upload picks up nothing useful — investigators have no way to tell which mutex/condvar/processor was stuck. This change keeps the log on disk so the artifact upload includes it, and additionally embeds the last 32 KiB of the captured output as the 4th column of `test_results.tsv`. The tail is the relevant region (processlist + thread stacktraces print at the end). Encoding mirrors the decoder in `read_test_results` (tabs and newlines escaped). The behavior on the success branch is unchanged. Requested by @alexey-milovidov on #100941 Session: cron:clickhouse-ci-task-worker:20260426-121500 Co-Authored-By: Claude Opus 4.7 <[email protected]>
|
@alexey-milovidov done — opened #103600 for the Note that since #102492 merged on 2026-04-19 the test has been clean (~27,000 runs, 0 failures over 8 days). The pre-#102492 chronic mode was |
LLVM Coverage Report
Changed lines: 48.78% (20/41) | lost baseline coverage: 3 line(s) · Uncovered code |
Split flaky check and targeted check into separate roles: Flaky check — runs only new/modified tests from the PR with thread fuzzer enabled. Tests run in parallel with themselves (shared queue) to ensure new tests are parallel-safe under randomized thread ordering. Targeted check — runs previously failed and coverage-relevant tests with per-worker partitioning (--no-self-parallel) so the same test never runs concurrently on multiple workers, avoiding conflicts on shared resources (hardcoded users, roles, settings profiles, etc.). Both use --test-runs 50. Changes: - Add --no-self-parallel flag to clickhouse-test: partitions tests by name hash so all copies go to the same worker - Flaky check: only changed tests, thread fuzzer, shared queue - Targeted check: relevant tests, no thread fuzzer, per-worker queues, 50 runs, single clickhouse-test invocation - Restore original thread fuzzer parameters (reverts reductions from 06c945a and 9790435) - Add amd_binary to flaky check, use AMD_LARGE for targeted debug - Targeted check uses --flaky-check --no-self-parallel PRs affected by tests running in parallel with themselves: ClickHouse#102015 ClickHouse#101093 ClickHouse#99653 ClickHouse#101503 ClickHouse#101108 ClickHouse#101884 ClickHouse#100746 ClickHouse#101447 ClickHouse#100941 ClickHouse#101099 ClickHouse#100203 ClickHouse#96130 ClickHouse#102038
Add a startup sanity check that warns when any Linux mdraid array is currently being checked, repaired, or resynchronized, or has a degraded
array_state. This can significantly degrade disk I/O performance, or indicate that one or more disks in the array are missing or faulty. It is useful to know about when diagnosing slow queries or merges.The check iterates over
/sys/block/md*/md/sync_actionand/sys/block/md*/md/array_state, and warns if the sync action is anything other thanidle, or if the array state is not one ofactive,active-idle,clean,write-pending,readonly,read-auto. The corresponding warnings are exposed insystem.warningsasLINUX_MDRAID_IS_BEING_RESYNCHRONIZEDandLINUX_MDRAID_IS_DEGRADED, and are cleared automatically when the condition is no longer present.Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Add startup warnings (visible in
system.warnings) when a Linux mdraid array is being resynchronized or is in a degraded state, as both can affect disk I/O performance or indicate disk failures.Documentation entry for user-facing changes
Version info
26.5.1.167