Repository navigation
Update llvm-project to fix a data race on LLT::ExtendedLLT - #131685
Conversation
`AArch64TargetMachine` constructor writes the process-global `LLT::ExtendedLLT` flag, which raced with `CHJIT` instances created concurrently on other threads (ThreadSanitizer report in `Stress test (arm_tsan)`). The fork now makes the flag a relaxed `std::atomic<bool>`. The update also brings the Clang CFI fixes from the fork (ClickHouse/llvm-project#152). Related: ClickHouse/llvm-project#154 Related: #117346 Related: llvm/llvm-project#219517 Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Workflow [PR], commit [d740899] Summary: ✅
AI ReviewSummaryReviewed #131685 at Final VerdictStatus: ✅ Approve |
Build profile diff (arm_release)Comparing ✅ No significant changes. Binary sizes
The official master build is compiled with Object file sizes457 object files changed (+71.11 KiB total), 0 added.
711 more object files are built by the master warmup baseline only (it builds every object-file target, a pull request build only Compile time of recompiled translation units11302 translation units recompiled, 40408 s compile time in total, 11302 of them have a recent master baseline. Symbol sizes
|
|
🕵 The The LLVM bump brings in the XRay change from ClickHouse/llvm-project#152 ("xray: Keep the handler pointers read-only"). It puts each XRay handler pointer on its own 64 KiB page (
The bases differ by 16 KiB, so the code keeps the same alignment within 4 KiB pages; only the alignment at 16 KiB and above changes. A performance comparison cannot run for this PR, because the reference and the candidate can never be at the same address while only one of them has the 64 KiB-aligned segment. Merging with this failure does not affect other PRs:
|
What was it for? Should we relax this? |
|
🕵 The perf check that keeps |
With ASLR disabled, the kernel loads a PIE executable at a fixed address rounded down to the largest `p_align` of its `PT_LOAD` segments. When a change raises that alignment in only one of the two binaries, the reference and the candidate get different bases even though both servers were started correctly with `setarch -R`, and `check_executable_base.py` fails the whole `Performance Comparison` job. This happens in ClickHouse#131685: the `llvm-project` bump puts the XRay handler pointers on their own 64 KiB pages, so its binary has a writable segment aligned to `0x10000` where master's has `0x1000`, and the bases are `0x555555550000` and `0x555555554000`. Such a pull request could never pass the check, so `Mergeable Check` stayed red. The check exists to notice a launcher that does not disable ASLR. Compare the bases after rounding them down to the largest segment alignment of all the binaries (read from the program headers of `/proc/<pid>/exe`): a random base still differs from the fixed one in the bits above any segment alignment, so a server started with ASLR enabled is still detected. Checked locally with two PIE binaries linked with `-z max-page-size=4096`, one of them with a 64 KiB aligned global: the old check fails on the pair started with `setarch -R`, the new one passes, and both fail when either process is started with ASLR enabled. Related: ClickHouse#131685 Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
… fix for illumos Advances the submodule to the tip of `ClickHouse/release-23.x`, which initializes the secret with `getentropy` on non-Linux platforms (ClickHouse/llvm-project#155, ClickHouse/llvm-project#157) and includes an `InstCombine` fix (ClickHouse/llvm-project#156). Co-Authored-By: Claude Opus 5.5 <[email protected]>
Follow-up to the
clang-23update. With LLVM 23, theAArch64TargetMachineconstructor writes the process-globalLLT::ExtendedLLTflag, which races withCHJITinstances created concurrently on other threads.Stress test (arm_tsan)reported it as a data race inLLT::setUseExtended. The fork now makes the flag a relaxedstd::atomic<bool>, as suggested upstream.The submodule is updated to the tip of
ClickHouse/release-23.x, which also includes the Clang CFI fixes from ClickHouse/llvm-project#152, thethread_localdestructor secret initialization on non-Linux platforms such as illumos (ClickHouse/llvm-project#155, ClickHouse/llvm-project#157), and anInstCombinefix for0.0 / xfolds (ClickHouse/llvm-project#156).Related: #117346
Related: ClickHouse/llvm-project#154
Related: llvm/llvm-project#219517
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Fix a data race in the embedded LLVM when JIT compilation runs on several threads on AArch64.
🤖 Generated with Claude Code
Workflow [PR]
Sync PR [sync-upstream/pr/131685]
Version info
26.11.1.2538-master(included in26.11and later)