Skip to content

Update contrib/llvm-project to pick up the libunwind ppc64le unw_getcontext fix - #129808

Merged
PedroTadim merged 1 commit into
ClickHouse:masterfrom
jsc0218:update-llvm-project-libunwind-ppc64le
Nov 12, 2026
Merged

PedroTadim merged 1 commit into
ClickHouse:masterfrom
jsc0218:update-llvm-project-libunwind-ppc64le

Conversation

@jsc0218

@jsc0218 jsc0218 commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Changelog category (leave one):

  • Build/Testing/Packaging Improvement

Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):

Fix a ppc64le bug where the bundled libunwind's unw_getcontext left callee-saved vector registers byte-swapped, which could make clickhouse-server fail to start intermittently.

Documentation entry for user-facing changes

  • Documentation is written (mandatory for new features)

Closes #127366.

Bumps contrib/llvm-project to 31938f7 (ClickHouse/release-22.x), which includes ClickHouse/llvm-project#142, a backport of llvm/llvm-project@6b0a46958c.

On little-endian ppc64le, PPC64_STVS(n) in libunwind/src/UnwindRegistersSave.S did xxswapd n, n; stxvd2x n, 0, 4 and never swapped back, so unw_getcontext returned with v20-v31 and f14-f31 byte-swapped. Compiled code that keeps a vector constant in one of those registers across a stack trace capture then used corrupted data; the server failed to start in about 10-19% of runs under qemu-user (UNKNOWN_TABLE, "Both table name and UUID are empty").

Not tested on native POWER hardware.


Workflow [PR]
Sync PR [sync-upstream/pr/129808]

Version info

  • Merged into: 26.11.1.2070-master (included in 26.11 and later)
  • Backported to: 26.10.12.5, 26.9.37.10, 26.8.45.9, 26.3.71.2

@clickhouse-gh clickhouse-gh Bot added the comp-external-dependencies Third-party deps updates in contrib/, vendored code, and platform base libraries. label Nov 6, 2026
@jsc0218
jsc0218 marked this pull request as ready for review November 6, 2026 19:13
@alexey-milovidov alexey-milovidov added the can be tested Allows running workflows for external contributors label Nov 6, 2026
@clickhouse-gh

clickhouse-gh Bot commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Workflow [PR], commit [ad6ed75]

Summary: ✅


AI Review

Summary

This PR updates contrib/llvm-project to fix callee-saved VSX register corruption in unw_getcontext on little-endian PowerPC64. The complete submodule comparison contains only the four-line upstream patch, with no unrelated source changes. No actionable findings. The register-preservation and server-start reproductions in the linked issue, including an independent reproduction, provide focused regression evidence for this backport.

Missing context / blind spots
  • ⚠️ Runtime evidence is from QEMU; native POWER hardware was not tested. I did not rerun the reproductions locally because this checkout has no PowerPC-capable compiler. A native run of the register-preservation reproducer would close that remaining platform-validation gap.
Final Verdict

Status: ✅ Approve. No inline findings to post.

@clickhouse-gh clickhouse-gh Bot added pr-build Pull request with build/testing/packaging improvement submodule changed At least one submodule changed in this PR. labels Nov 6, 2026
@clickhouse-gh

clickhouse-gh Bot commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

Build profile diff (arm_release)

Comparing ad6ed7577 with master c4912eaaf (stripped binary size, per-symbol sizes and ThinLTO time; compile times per translation unit against the most recent warmup build that recompiled it).

✅ No significant changes.

Binary sizes

programs/clickhouse-stripped: smaller than the master baseline by the known offset between the two builds, so the difference is not shown. A delta that differs from the offset by more than 50% of it is shown, in either direction.

The official master build is compiled with -g and a pull request build is not, and XRay counts debug instructions towards its instrumentation threshold, so master instruments thousands of functions more and its binary is ~0.4% larger no matter what the pull request does.

Compile time of recompiled translation units

6 translation units recompiled, 4 s compile time in total, 6 of them have a recent master baseline.

Job report

@jsc0218

jsc0218 commented Nov 7, 2026

Copy link
Copy Markdown
Contributor Author

It needs backports to different versions, as in our side the bug happens in both 26.3 and 26.8.

@PedroTadim
PedroTadim added this pull request to the merge queue Nov 12, 2026
Merged via the queue into ClickHouse:master with commit d5f98ca Nov 12, 2026
190 checks passed
@robot-clickhouse robot-clickhouse added the pr-synced-to-cloud The PR is synced to the cloud repo label Nov 12, 2026
@jsc0218

jsc0218 commented Nov 20, 2026

Copy link
Copy Markdown
Contributor Author

@PedroTadim is it possible to do a backport for 26.3 lts and 26.8 lts at least?

@robot-ch-test-poll robot-ch-test-poll added the pr-must-backport-synced The `*-must-backport` labels are synced into the cloud Sync PR label Nov 23, 2026
PedroTadim added a commit that referenced this pull request Nov 23, 2026
…etcontext` fix

Backport of #129808: the libunwind fix cherry-picked onto the LLVM commit this release already uses.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
PedroTadim added a commit that referenced this pull request Nov 23, 2026
…etcontext` fix

Backport of #129808: the libunwind fix cherry-picked onto the LLVM commit this release already uses.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
PedroTadim added a commit that referenced this pull request Nov 23, 2026
…etcontext` fix

Backport of #129808: the libunwind fix cherry-picked onto the LLVM commit this release already uses.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
PedroTadim added a commit that referenced this pull request Nov 23, 2026
…etcontext` fix

Backport of #129808: the libunwind fix cherry-picked onto the LLVM commit this release already uses.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
PedroTadim added a commit that referenced this pull request Nov 23, 2026
Cherry pick #129808 to 26.3: Update `contrib/llvm-project` to pick up the libunwind ppc64le `unw_getcontext` fix
PedroTadim added a commit that referenced this pull request Nov 23, 2026
Cherry pick #129808 to 26.8: Update `contrib/llvm-project` to pick up the libunwind ppc64le `unw_getcontext` fix
PedroTadim added a commit that referenced this pull request Nov 23, 2026
Cherry pick #129808 to 26.9: Update `contrib/llvm-project` to pick up the libunwind ppc64le `unw_getcontext` fix
PedroTadim added a commit that referenced this pull request Nov 23, 2026
Cherry pick #129808 to 26.10: Update `contrib/llvm-project` to pick up the libunwind ppc64le `unw_getcontext` fix
robot-clickhouse added a commit that referenced this pull request Nov 23, 2026
…e libunwind ppc64le `unw_getcontext` fix
robot-clickhouse added a commit that referenced this pull request Nov 23, 2026
…e libunwind ppc64le `unw_getcontext` fix
robot-clickhouse added a commit that referenced this pull request Nov 23, 2026
…e libunwind ppc64le `unw_getcontext` fix
robot-clickhouse added a commit that referenced this pull request Nov 23, 2026
…he libunwind ppc64le `unw_getcontext` fix
@robot-ch-test-poll robot-ch-test-poll added the pr-backports-created Backport PRs are successfully created, it won't be processed by CI script anymore label Nov 23, 2026
clickhouse-gh Bot added a commit that referenced this pull request Nov 23, 2026
Backport #129808 to 26.10: Update `contrib/llvm-project` to pick up the libunwind ppc64le `unw_getcontext` fix
clickhouse-gh Bot added a commit that referenced this pull request Nov 23, 2026
Backport #129808 to 26.9: Update `contrib/llvm-project` to pick up the libunwind ppc64le `unw_getcontext` fix
clickhouse-gh Bot added a commit that referenced this pull request Nov 23, 2026
Backport #129808 to 26.8: Update `contrib/llvm-project` to pick up the libunwind ppc64le `unw_getcontext` fix
PedroTadim added a commit that referenced this pull request Nov 23, 2026
Backport #129808 to 26.3: Update `contrib/llvm-project` to pick up the libunwind ppc64le `unw_getcontext` fix
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

can be tested Allows running workflows for external contributors comp-external-dependencies Third-party deps updates in contrib/, vendored code, and platform base libraries. external Author is not a member of the ClickHouse organization manual approve Manual approve required to run CI pr-backports-created Backport PRs are successfully created, it won't be processed by CI script anymore pr-build Pull request with build/testing/packaging improvement pr-must-backport-synced The `*-must-backport` labels are synced into the cloud Sync PR pr-synced-to-cloud The PR is synced to the cloud repo submodule changed At least one submodule changed in this PR. v26.3-must-backport

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ppc64le: bundled libunwind unw_getcontext leaves callee-saved vector registers byte-swapped (fixed in LLVM main, not backported)

5 participants