feat: [NODE-1566] Build with hermetic cc toolchains (again)#4848
Merged
Conversation
c60223f to
845290d
Compare
80b03db to
3df8a96
Compare
github-merge-queue Bot
pushed a commit
that referenced
this pull request
Apr 29, 2025
Enabling the hermetic CC toolchain (again) in #4848 is causing an Out Of Memory error at the end of the `bazel test` invocation because we use [`--execution_log_json_file`](https://bazel.build/reference/command-line-reference#build-flag--execution_log_json_file). We fix this by using the more CPU and memory efficient [`--execution_log_compact_file`](https://bazel.build/reference/command-line-reference#build-flag--execution_log_compact_file) and converting the resulting zstandard compressed length-delimited protobuf-encoded file to CSV using a Python program.
d56dddd to
94f5af7
Compare
mraszyk
approved these changes
May 7, 2025
venkkatesh-sekar
approved these changes
May 7, 2025
venkkatesh-sekar
left a comment
Contributor
There was a problem hiding this comment.
🥳 Looks good from fuzzing side.
andrewbattat
approved these changes
May 7, 2025
This was referenced May 8, 2025
Closed
github-merge-queue Bot
pushed a commit
that referenced
this pull request
May 12, 2025
CI sometimes runs into [the following error](https://github.com/dfinity/ic/actions/runs/14966115526/job/42037281951) on the workflow: Bazel Test macOS Apple Silicon: ``` ERROR: /Users/runner/work/ic/ic/rs/nns/handlers/lifeline/impl/BUILD.bazel:35:16: CopyIdlFiles rs/nns/handlers/lifeline/impl/actor_idl_path failed: I/O exception during sandboxed execution: /private/tmp/zig-cache (No such file or directory) ``` `.github/workflows/test-namespace-darwin.yaml` doesn't actually use `.github/actions/bazel` which creates the `/tmp/zig-cache` directory. So let's create it. It's unclear why this failure only happens sometimes and [didn't happen](https://github.com/dfinity/ic/actions/runs/14894656219/job/41834646820) on #4848 which re-introduced the hermetic CC toolchain. This also drops: ``` # Until we have a hermetic CC toolchain, tell bazel to use the "real" clang # (instead of Apple's, which sometimes breaks on wasm32) export CC=/opt/homebrew/opt/llvm/bin/clang ``` since we now have the hermetic CC toolchain available.
github-merge-queue Bot
pushed a commit
that referenced
this pull request
Aug 12, 2025
`anyhow` captures a backtrace whenever an error is created. This can be quite expensive and has lead to a performance regression after updating the `libunwind` version in #4848. The P2P code does not make use of this backtrace anywhere. Therefore, this PR removes `anyhow` from all P2P crates, and replaces it with a custom opaque error type, that doesn't capture backtraces. See also this issue: dtolnay/anyhow#346 --------- Co-authored-by: IDX GitHub Automation <infra+github-automation@dfinity.org>
kpop-dfinity
pushed a commit
that referenced
this pull request
Aug 13, 2025
`anyhow` captures a backtrace whenever an error is created. This can be quite expensive and has lead to a performance regression after updating the `libunwind` version in #4848. The P2P code does not make use of this backtrace anywhere. Therefore, this PR removes `anyhow` from all P2P crates, and replaces it with a custom opaque error type, that doesn't capture backtraces. See also this issue: dtolnay/anyhow#346 --------- Co-authored-by: IDX GitHub Automation <infra+github-automation@dfinity.org>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Following #3508 and #4621
What has changed since last time?
zig ccbuilds system components on demand, and the shared cache means these are only built once.zig cccan only strip everything, or nothing at all. First patchrules_rustto disable the default stripping, then patchhermetic_cc_toolchainto strip onlydebug_info, outside of the main call tozig cc.