Repository navigation
Flush crash_log first in handleCrash to fix flaky test_crash_log_synchronous - #100378
Merged
Merged
Conversation
…_synchronous` In `SystemLogs::handleCrash`, logs are flushed sequentially in declaration order. `QueryLog` (index 0) was flushed before `CrashLog` (index 5). When both have `flush_on_crash=true` and the `sleep_in_logs_flush` failpoint is active (adding 30s per flush), the combined time of stack symbolization (250s+ on loaded ARM CI) plus query_log flush (30s) plus crash_log flush (30s) can exceed the signal handler's 303-second timeout, killing the process before `crash_log` is written. Fix by flushing `crash_log` first since it is the most important log during a crash. Also wrap each log's `handleCrash` in try/catch so that a timeout in one log does not prevent flushing others. https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=100290&sha=7bbc2a132b1aaf5e4b723c00b1c3b7db5badc6ad&name_0=PR&name_1=Integration%20tests%20%28arm_binary%2C%20distributed%20plan%2C%204%2F4%29 Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Contributor
|
Workflow [PR], commit [849e7d1] Summary: ✅ AI ReviewSummaryThis PR updates Missing context
ClickHouse Rules
Final Verdict
|
1 task
Member
Author
Algunenano
approved these changes
Mar 23, 2026
Algunenano
left a comment
Member
There was a problem hiding this comment.
LGTM. And I see you fixed the sync problem with Coordination::setCurrentComponent. Nice
Contributor
LLVM Coverage Report
Changed lines: 0.00% (0/26) · Uncovered code |
alexey-milovidov
left a comment
Member
Author
There was a problem hiding this comment.
Yes, this is a good change.
This was referenced Apr 8, 2026
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.
In
SystemLogs::handleCrash, logs are flushed sequentially in declaration order.QueryLog(index 0) was flushed beforeCrashLog(index 5). When both haveflush_on_crash=trueand thesleep_in_logs_flushfailpoint is active (adding 30s per flush), the combined time of stack symbolization (250s+ on loaded ARM CI) plusquery_logflush (30s) pluscrash_logflush (30s) can exceed the signal handler's 303-second timeout, killing the process beforecrash_logis written.Fix by flushing
crash_logfirst since it is the most important log during a crash. Also wrap each log'shandleCrashin try/catch so that a timeout in one log does not prevent flushing others.CI report: https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=100290&sha=7bbc2a132b1aaf5e4b723c00b1c3b7db5badc6ad&name_0=PR&name_1=Integration%20tests%20%28arm_binary%2C%20distributed%20plan%2C%204%2F4%29
#100290
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
...
Documentation entry for user-facing changes
Version info
26.4.1.386