Include full sanitizer report in CI failure reports#102151
Include full sanitizer report in CI failure reports#102151alexey-milovidov merged 3 commits intomasterfrom
Conversation
The `get_sanitizer_stack_trace` parser was only extracting `#N` stack frame lines, discarding the description (e.g., what kind of undefined behavior), origin chains (e.g., "Uninitialized value was created by a heap allocation"), and intermediate context (e.g., "freed by thread T0 here:"). Now it captures the full sanitizer report from the header line through the SUMMARY line, including all stack trace sections, descriptions, and origin chains. This makes the information available both in the CI report and in `test_context_raw` in CIDB. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
Workflow [PR], commit [e0988fd] Summary: ✅ AI ReviewSummaryThis PR updates ClickHouse Rules
Final Verdict
|
| # Pattern to remove ANSI escape codes (colors from tools like ripgrep) | ||
| ansi_escape = re.compile(r"\x1b\[[0-9;]*m") | ||
| sanitizer_start = re.compile( | ||
| r"(==\d+==\s*)?(ERROR|WARNING): \w+Sanitizer:|: runtime error: " |
There was a problem hiding this comment.
sanitizer_start also matches UBSan : runtime error: lines, but the loop has no reliable stop condition for this path when no SUMMARY: ...Sanitizer: line is present.
For UBSan runtime errors, stderr can continue with regular log lines without blank separators, so this will keep appending unrelated lines to stack_trace. That can pollute STID grouping and the failure context in CI reports.
Please add a second termination condition for runtime-error mode (for example: stop when the next line matches a regular ClickHouse log prefix, or when another sanitizer report header starts), while still keeping full capture for report-style sanitizers.
|
Needs #102149 |
UBSan `: runtime error:` reports may not emit a `SUMMARY:` line, and ClickHouse log lines on stderr can follow immediately without blank-line separators. This caused the parser to over-capture unrelated log lines into `stack_trace`, degrading `STID` grouping. In runtime-error mode, now also stop capturing when encountering a ClickHouse log line (timestamp pattern) or a new sanitizer report. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The
get_sanitizer_stack_traceparser was only extracting#Nstack frame lines, discarding the description (e.g., what kind of undefined behavior), origin chains (e.g., "Uninitialized value was created by a heap allocation"), and intermediate context (e.g., "freed by thread T0 here:").Now it captures the full sanitizer report from the header line through the SUMMARY line, including all stack trace sections, descriptions, and origin chains. This makes the information available both in the CI HTML report and in
test_context_rawin CIDB.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