Repository navigation
Bump contrib/boost to fix AArch64 MSan fiber-switch false positives (STID 4348-2010) - #110152
Conversation
Pulls two boost-fork commits (a6da369, 24df31b) that fix false-positive MemorySanitizer reports during boost::context fiber switches on AArch64. On AArch64, LLVM loses MSan shadow for struct-padding bytes in return values (llvm/llvm-project#54476). On heap-allocated fiber stacks the dirty shadow accumulates across context switches and propagates via stack-slot reuse, surfacing as a spurious SIGSEGV/use-of-uninitialized at boost::context::fiber::resume() (finish_switch_fiber). This is the STID 4348-2010 arm_msan-only crash in the RemoteQueryExecutorReadContext async read fiber. The fix unpoisons the whole fiber stack after each __msan_finish_switch_fiber, guarded to __aarch64__ MSan builds only. Co-Authored-By: Claude Opus 4.8 <[email protected]>
Pre-PR validation gate (click to expand)
Session id: cron:clickhouse-worker-slot-0:20260712-130600 |
|
Workflow [PR], commit [7156435] Summary: ✅
AI ReviewSummaryThis PR bumps Missing context / blind spots
Final Verdict✅ No new review findings in the current code. The PR looks consistent with its |
|
@groeneai, didn't we fix it a long time ago? What changed? |
|
The April fix answered the general case, not the AArch64 one. Boost PR #45 "Add MSan support for context/fibers" (merged 2026-04-09 as It does not cover the AArch64-specific problem: LLVM loses MSan shadow for struct-padding bytes in return values (llvm/llvm-project#54476), and on heap fiber stacks that dirty shadow accumulates across switches and propagates via stack-slot reuse, faulting at This PR just picks them up: a clean fast-forward of |
|
Confirmed: the unpoison covers the whole resumed fiber stack ( Two things narrow how bad it is in practice:
The alternative today is the hard SIGSEGV at These two commits are @alexey-milovidov's own (boost-fork |
CI finish ledger — 729886aEvery failure below has an owner. This PR is an 18-line
Session id: cron:our-pr-ci-monitor:20260712-210000 |
|
Fixing PR for test_split_topology_rolling_upgrade created: #110184 |
|
Fixing PR for amd_asan_ubsan distributed-plan host-OOM created: #110185 |
…-msan-fiber-aarch64-unpoison
3bf011a
…t-msan-fiber-aarch64-unpoison Bump contrib/boost to fix AArch64 MSan fiber-switch false positives (STID 4348-2010)
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Fix false-positive MemorySanitizer reports (spurious crash at
boost::context::fiber::resume) during boost fiber context switches on AArch64.Description
Bumps
contrib/boostfromf05991cto24df31b, a clean fast-forward pulling two boost-fork commits authored by @ alexey-milovidov on branchfix-msan-fiber-aarch64-padding:a6da369Unpoison fiber stack after context switch on AArch6424df31bAdd missing__msan_unpoisondeclaration to externc.hppDiff is 18 lines, entirely inside
#if defined(BOOST_USE_MSAN)+#if defined(__aarch64__), so it affects only AArch64 MSan builds; all other builds are byte-identical.Root cause: on AArch64 LLVM loses MSan shadow for struct-padding bytes in return values (llvm/llvm-project#54476). On heap-allocated fiber stacks the dirty shadow accumulates across
boost::contextswitches and propagates via stack-slot reuse, producing spurious "use-of-uninitialized" faults inside unrelated code at__msan_finish_switch_fiber/boost::context::fiber::resume(). The fix unpoisons the whole fiber stack after each switch.This is the
arm_msan-exclusiveSegmentation fault (STID: 4348-2010)in theRemoteQueryExecutorReadContextasync read fiber that @ alexey-milovidov asked to investigate on #110073. CIDB: 11 hits over 90 days, all onStress test (arm_msan)(master 2026-06-10 plus 10 unrelated PRs), zero on any other arch/sanitizer, matching the AArch64-MSan-only mechanism above. Investigation and cross-arch verification are tracked in #110124.Report: https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=110073&sha=f75f6b4383cd713bb07ad345f879953ae276e50e&name_0=PR&name_1=Stress%20test%20%28arm_msan%29
The fix commits are @ alexey-milovidov's own; this PR only lands them by bumping the submodule pin. Verification is via
arm_msanCI (no local aarch64-MSan repro environment is available on x86 runners).Closes #110124
Version info
26.7.1.1235(included in26.7and later)