Repository navigation
Conversation
Co-Authored-By: Claude Fable 5 <[email protected]>
|
Workflow [PR], commit [2a79b33] Summary: ❌
AI ReviewSummaryThis PR adds diagnostic sanitizer defaults and test configuration to amplify an ASan heap corruption reproducer. The diagnostic scope is too broad: it changes global compiled ASan defaults and installs thread trimming across every sanitizer build, so failures or OOMs become ambiguous rather than proving the intended hypothesis. Missing context / blind spots
Findings
Tests
Final VerdictStatus: Minimum required actions: scope the ASan quarantine and thread trimming to the intended repro run or ASan-only environment, and provide a targeted ASan report showing the diagnostic signal. |
| return "halt_on_error=1 abort_on_error=1"; | ||
| /// Large quarantine keeps freed memory poisoned longer so a wild write is reported as | ||
| /// heap-use-after-free with full stacks instead of corrupting recycled allocations silently. | ||
| return "halt_on_error=1 abort_on_error=1 quarantine_size_mb=2048 malloc_context_size=30"; |
There was a problem hiding this comment.
__asan_default_options is linked into every ASan ClickHouse executable, so this makes a 2 GiB quarantine the default for all ASan processes, not just the diagnostic CI run. In stateless/flaky/integration jobs this can affect the server, clickhouse-client, clickhouse-local, and bridge/helper processes; retaining up to 2 GiB of freed chunks per process can turn the intended heap-use-after-free reproduction into cgroup OOM failures without a sanitizer report, which weakens the PR's diagnostic signal. Please keep this opt-in through the repro job's ASAN_OPTIONS or another targeted CI knob instead of changing the global compiled default.
| } | ||
| if is_sanitizer_build; then | ||
| ln -sf $SRC_PATH/config.d/trace_log_no_symbolize.xml $DEST_SERVER_PATH/config.d/ | ||
| ln -sf $SRC_PATH/config.d/thread_pool_trim.xml $DEST_SERVER_PATH/config.d/ |
There was a problem hiding this comment.
This installs thread_pool_trim.xml for every -fsanitize= build, but the PR contract is an ASan allocator-corruption reproducer. Lowering max_thread_pool_free_size forces extra OS-thread teardown under TSan/MSan/UBSan too, where the overhead and failure modes are different; failures there will not distinguish the ASan heap-corruption hypothesis from unrelated sanitizer noise. Please make this predicate ASan-specific, e.g. check for sanitize=address, or gate the trim config behind an explicit repro flag.
Co-Authored-By: Claude Fable 5 <[email protected]>
Related: #107122
Changelog category (leave one):
Draft, never to be merged: a CI reproduction setup for the ASan heap corruption (
sanitizer_allocator_secondary.h:200CHECK) that #107122 attributed to the distributed-query infrastructure. CI history suggests the corruption predates #106020: similar reports exist from Nov 2025 (AST fuzzer on master), March 2026 (an unrelated PR), and May 2026 (the Parquet-parallelism PR) — all without the distributed feature.This PR is plain master without the distributed-query feature, plus two settings that make the corruption more likely to fire and easier to diagnose:
max_thread_pool_free_size = 16for sanitizer test configs — destroys idle threads much more aggressively than the value that triggered the June 10 failures.quarantine_size_mb=2048) with deeper stack capture — freed memory stays poisoned longer, so a stray write into it produces aheap-use-after-freereport with full stacks instead of silently corrupting reused memory.There is a second PR with the same two settings on top of the #107146 branch (with the distributed feature). If sanitizer jobs crash in both PRs, the corruption lives in shared infrastructure and #106020 is exonerated. If they crash only in the other PR, the feature is implicated — and the quarantine setting should produce a report naming the buggy code, which the #107122 reports could not.
🤖 Generated with Claude Code