Skip to content

Update PGO+BOLT toolchain to 9ba77fe6 - #109864

Merged
murphy-4o merged 2 commits into
masterfrom
update-toolchain-9ba77fe6
Jul 17, 2026
Merged

murphy-4o merged 2 commits into
masterfrom
update-toolchain-9ba77fe6

Conversation

@clickhouse-gh

@clickhouse-gh clickhouse-gh Bot commented Jul 9, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Changelog category (leave one):

  • Build/Testing/Packaging Improvement

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

  • Use PGO+BOLT optimized clang toolchain for CI builds

Version info

  • Merged into: 26.7.1.1092 (included in 26.7 and later)

@CLAassistant

CLAassistant commented Jul 9, 2026 •

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.

✅ murphy-4o
❌ Ubuntu


Ubuntu seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

@clickhouse-gh

clickhouse-gh Bot commented Jul 9, 2026 •

Copy link
Copy Markdown
Contributor Author

Workflow [PR], commit [7a0c3ea]

Summary: ❌

job_name test_name status info comment
Integration tests (amd_msan, 7/8) FAIL
test_replicated_database/test.py::test_replicated_table_structure_alter FAIL cidb, issue

AI Review

Summary

This PR updates ci/docker/binary-builder/Dockerfile to point TOOLCHAIN_COMMIT at the newer PGO+BOLT toolchain artifacts. I did not find a code-level issue in the hash bump itself: the referenced amd64 and aarch64 archives exist, clickhouse/binary-builder is covered by the Docker build jobs, and both Dockers Build checks succeeded on the current head.

Missing context / blind spots
  • ⚠️ The full PR status for commit 7a0c3eacf9b358a87a6b4eb1b74871c765c51486 was still pending while I reviewed, with Build (arm_tidy) and the aggregate PR report not finished yet. Final confirmation that the broader cold-build matrix stays green depends on those checks completing.
Final Verdict

Status: ✅ Approve

@clickhouse-gh clickhouse-gh Bot added the pr-build Pull request with build/testing/packaging improvement label Jul 9, 2026
@murphy-4o murphy-4o self-assigned this Jul 9, 2026
@murphy-4o

murphy-4o commented Jul 10, 2026 •

Copy link
Copy Markdown
Member

Build (arm_fuzzers) hits OOM error when compiling all HashJoin files parallelly:

  • compiling single file takes about 4.9GB RSS, with 32 parallelism, total RSS would be ~156GB, more than container limit 117GB
sccache: Compiler killed by signal 9
[5080/16570] Building CXX object src/Functions/CMakeFiles/clickhouse_functions_obj.dir/isNotDistinctFrom.cpp.o
[5081/16570] Building CXX object src/CMakeFiles/dbms.dir/Interpreters/HashJoin/LeftHashJoinAny.cpp.o
[5082/16570] Building CXX object src/CMakeFiles/dbms.dir/Interpreters/HashJoin/InnerHashJoinRightAny.cpp.o
[5083/16570] Building CXX object src/CMakeFiles/dbms.dir/Interpreters/HashJoin/FullHashJoinAnti.cpp.o
[5084/16570] Building CXX object src/Functions/CMakeFiles/clickhouse_functions_obj.dir/less.cpp.o
[5085/16570] Building CXX object src/CMakeFiles/dbms.dir/Interpreters/HashJoin/FullHashJoinAny.cpp.o
[5086/16570] Building CXX object src/CMakeFiles/dbms.dir/Interpreters/HashJoin/FullHashJoinAsof.cpp.o
[5087/16570] Building CXX object src/CMakeFiles/dbms.dir/Interpreters/HashJoin/InnerHashJoinRightAnyMapsAll.cpp.o
[5088/16570] Building CXX object src/CMakeFiles/dbms.dir/Interpreters/HashJoin/LeftHashJoinAnyMapsAll.cpp.o
[5089/16570] Building CXX object src/CMakeFiles/dbms.dir/Interpreters/HashJoin/LeftHashJoinAnti.cpp.o
[5090/16570] Building CXX object src/CMakeFiles/dbms.dir/Interpreters/HashJoin/LeftHashJoinSemiMapsAll.cpp.o
[5091/16570] Building CXX object src/CMakeFiles/dbms.dir/Interpreters/HashJoin/LeftHashJoinAsof.cpp.o
[5092/16570] Building CXX object src/CMakeFiles/dbms.dir/Interpreters/HashJoin/LeftHashJoinRightAny.cpp.o
[5093/16570] Building CXX object src/CMakeFiles/dbms.dir/Interpreters/HashJoin/RightHashJoinAnti.cpp.o
[5094/16570] Building CXX object src/CMakeFiles/dbms.dir/Interpreters/HashJoin/LeftHashJoinAntiMapsAll.cpp.o
[5095/16570] Building CXX object src/CMakeFiles/dbms.dir/Interpreters/HashJoin/InnerHashJoinAnyMapsAll.cpp.o
[5096/16570] Building CXX object src/CMakeFiles/dbms.dir/Interpreters/HashJoin/RightHashJoinRightAny.cpp.o
[5097/16570] Building CXX object src/CMakeFiles/dbms.dir/Interpreters/HashJoin/FullHashJoinRightAny.cpp.o
[5098/16570] Building CXX object src/CMakeFiles/dbms.dir/Interpreters/HashJoin/InnerHashJoinAny.cpp.o
[5099/16570] Building CXX object src/CMakeFiles/dbms.dir/Interpreters/HashJoin/LeftHashJoinSemi.cpp.o
[5100/16570] Building CXX object src/CMakeFiles/dbms.dir/Interpreters/HashJoin/RightHashJoinAny.cpp.o
[5101/16570] Building CXX object src/CMakeFiles/dbms.dir/Interpreters/HashJoin/RightHashJoinSemi.cpp.o
[5102/16570] Building CXX object src/CMakeFiles/dbms.dir/Interpreters/HashJoin/LeftHashJoinAll.cpp.o
[5103/16570] Building CXX object src/CMakeFiles/dbms.dir/Interpreters/HashJoin/RightHashJoinAll.cpp.o
[5104/16570] Building CXX object src/CMakeFiles/dbms.dir/Interpreters/HashJoin/FullHashJoinAll.cpp.o
[5105/16570] Building CXX object src/Functions/CMakeFiles/clickhouse_functions_obj.dir/modulo.cpp.o
[5106/16570] Building CXX object src/Functions/array/CMakeFiles/clickhouse_functions_array.dir/arrayDistance.cpp.o
[5107/16570] Building CXX object src/Functions/CMakeFiles/clickhouse_functions_obj.dir/FunctionsNumericIndexedVector.cpp.o
[5108/16570] Building CXX object src/CMakeFiles/dbms.dir/Interpreters/Aggregator.cpp.o
[5109/16570] Building CXX object src/CMakeFiles/dbms.dir/Interpreters/HashJoin/RightHashJoinAsof.cpp.o
[5110/16570] Building CXX object src/AggregateFunctions/CMakeFiles/clickhouse_aggregate_functions.dir/AggregateFunctionUniq.cpp.o
ninja: build stopped: subcommand failed.
Command exited with non-zero status 1

Reproduced with the toolchain on file LeftHashJoinRightAnyMapsAll.cpp: adding the -gz would not actually increase the memory usage, but updating the toolchain will invalidate sccache, let it recompile all files:

  ┌───────────────────────────────────────────────────────────────────┬──────────┬───────────┬─────────────┬────────┐
  │                              Variant                              │ Peak RSS │ Wall time │ Object size │ Result │
  ├───────────────────────────────────────────────────────────────────┼──────────┼───────────┼─────────────┼────────┤
  │ with -gz=zlib                                                     │ 4.90 GiB │ 2:05      │ 50 MB       │ OK     │
  ├───────────────────────────────────────────────────────────────────┼──────────┼───────────┼─────────────┼────────┤
  │ without -gz                                                       │ 4.89 GiB │ 2:04      │ 81 MB       │ OK     │
  ├───────────────────────────────────────────────────────────────────┼──────────┼───────────┼─────────────┼────────┤
  │ with -gz, under CI's exact prlimit --as=10G --data=20G --cpu=2000 │ 4.89 GiB │ 2:05      │ 50 MB       │ OK     │
  └───────────────────────────────────────────────────────────────────┴──────────┴───────────┴─────────────┴────────┘

@murphy-4o
murphy-4o self-requested a review July 10, 2026 07:32
pull Bot pushed a commit to SINHASantos/ClickHouse that referenced this pull request Jul 17, 2026
… dispatch dimensions

Each of the 33 HashJoin instantiation translation units compiled the probe
loop joinRightColumns 1488 times: 30 map types x 2 need_filter x 2
single/multi map x 2 selector types x 2 check_null_map x 3 join_mask_kind.
The copies accounted for 85% of the object code (10.9 of 12.9 MB), and with
sanitizers each unit peaked at ~5.5 GB of compiler memory. On a cold
compiler cache (e.g. any toolchain update) ninja starts all of these units
at once and the arm_fuzzers builder is OOM-killed:

https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=109864&sha=b2a30564a2cd30eaaaf8014aa68e5b49ef751b9a&name_0=PR&name_1=Build%20(arm_fuzzers)
Seen in ClickHouse#109864.

The last two dimensions buy almost nothing at runtime:

- check_null_map only elides a null-pointer test on join_keys.null_map;
  the runtime form is the same expression with the test kept - one
  perfectly predicted branch per row next to a hash table probe.
- join_mask_kind only elides reading JoinMask::kind; isRowFiltered is
  already kind-aware, so the runtime form is two predicted compares. The
  AllFalse specialization compiled 2.7 MB of near-dead loops per unit for
  a degenerate case (ON condition constant false).

Making both decisions runtime and deleting both
joinRightColumnsSwitchJoinMaskKind dispatchers, measured on
LeftHashJoinAll.cpp in the arm_fuzzers configuration (ASan + fuzzer):

- joinRightColumns instantiations: 1488 -> 248
- compiler peak RSS: 5.54 GiB -> 1.77 GiB
- compile wall time: 2:29 -> 0:49
- object file: 57.7 -> 19.0 MB

Co-Authored-By: Claude <[email protected]>
@murphy-4o
murphy-4o enabled auto-merge July 17, 2026 09:32
@murphy-4o
murphy-4o added this pull request to the merge queue Jul 17, 2026
Merged via the queue into master with commit a90ede6 Jul 17, 2026
350 of 353 checks passed
@murphy-4o
murphy-4o deleted the update-toolchain-9ba77fe6 branch July 17, 2026 11:52
@robot-clickhouse-ci-2 robot-clickhouse-ci-2 added the pr-synced-to-cloud The PR is synced to the cloud repo label Jul 17, 2026
zlareb1 added a commit to zlareb1/ClickHouse that referenced this pull request Aug 17, 2026
Three failures in the first PR validation run
(https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=115036&sha=30c47a7d9420ba1e86365979016e7765cbc080da&name_0=WeeklyCFI):

- BuzzHouse (amd_cfi) failed with "Clickhouse was compiled without
  BuzzHouse enabled": add -DENABLE_BUZZHOUSE=1 to the amd_cfi build,
  matching the other fuzzer-carrying builds.
- 03150_trace_log_add_build_id / 03150_trace_log_source_lines fail
  deterministically: symbols and lines in system.trace_log are all-empty
  in the ThinLTO+CFI build, while build_id resolves. This is a regression
  since the 2026-07-14 validation runs of ClickHouse#100419 (toolchain update
  ClickHouse#109864 is the prime suspect), tracked in
  ClickHouse#115122. Tag both tests
  no-cfi until it is fixed.

The third failure, a probabilistic server SIGSEGV in gRPC response
compression under test_grpc_protocol, is a real bug filed as
ClickHouse#115121 - no test change,
it passed on retry.

Co-Authored-By: Claude Fable 5 <[email protected]>
zeekay pushed a commit to hanzoai/datastore that referenced this pull request Sep 11, 2026
… dispatch dimensions

Each of the 33 HashJoin instantiation translation units compiled the probe
loop joinRightColumns 1488 times: 30 map types x 2 need_filter x 2
single/multi map x 2 selector types x 2 check_null_map x 3 join_mask_kind.
The copies accounted for 85% of the object code (10.9 of 12.9 MB), and with
sanitizers each unit peaked at ~5.5 GB of compiler memory. On a cold
compiler cache (e.g. any toolchain update) ninja starts all of these units
at once and the arm_fuzzers builder is OOM-killed:

https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=109864&sha=b2a30564a2cd30eaaaf8014aa68e5b49ef751b9a&name_0=PR&name_1=Build%20(arm_fuzzers)
Seen in ClickHouse#109864.

The last two dimensions buy almost nothing at runtime:

- check_null_map only elides a null-pointer test on join_keys.null_map;
  the runtime form is the same expression with the test kept - one
  perfectly predicted branch per row next to a hash table probe.
- join_mask_kind only elides reading JoinMask::kind; isRowFiltered is
  already kind-aware, so the runtime form is two predicted compares. The
  AllFalse specialization compiled 2.7 MB of near-dead loops per unit for
  a degenerate case (ON condition constant false).

Making both decisions runtime and deleting both
joinRightColumnsSwitchJoinMaskKind dispatchers, measured on
LeftHashJoinAll.cpp in the arm_fuzzers configuration (ASan + fuzzer):

- joinRightColumns instantiations: 1488 -> 248
- compiler peak RSS: 5.54 GiB -> 1.77 GiB
- compile wall time: 2:29 -> 0:49
- object file: 57.7 -> 19.0 MB

Co-Authored-By: Claude <[email protected]>
zeekay pushed a commit to hanzoai/datastore that referenced this pull request Sep 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-build Pull request with build/testing/packaging improvement pr-synced-to-cloud The PR is synced to the cloud repo

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants