-
Notifications
You must be signed in to change notification settings - Fork 374
feat: [NODE-1566] Build with hermetic cc toolchains #3508
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
0d20bba to
5b5b249
Compare
f5bfd00 to
b8bf5b9
Compare
d10101c to
2c71eb6
Compare
2c71eb6 to
5a7bebe
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The determinism tests are failing due to differences in one of the binaries:
> Binary files A/ic-boundary and B/ic-boundary differ
I still need to take a look. Have any ideas?
I haven't been able to reproduce the diff in ic-boundary, and when I went to inspect the files, they actually were the same. I did find a separate issue in infogetty where sandbox paths were leaking into the binary, but this was fixed by stripping it.
d6748ad to
5504f28
Compare
7624edc to
396609a
Compare
|
Hey @dfinity/product-security! I had run into some trouble with the AFL fuzzers, and came up with these two solutions. Before I pull this out of draft and open this up to the other teams, could you take a look and let me know what you think? Build AFL fuzzers without hermetic toolchains: It is a really simple change to avoid using the hermetic toolchain for these targets, but it means the build path for the fuzzing targets diverges. Patch dependencies to support AFL fuzzers on zig: This change is more complicated, but keeps the fuzzers in line with the built binaries. This also makes the fuzzers slower, as the LTO variant is not supported (it seems the required flags are not even on the radar for zig). edit: Updated links to more stable commits. |
Thanks @Bownairo for this awesome effort, we can go ahead with option A as it's the simplest one and the build path diverging should have very little effect on the bugs the fuzzers should find itself. |
201cdc8 to
95c5f5d
Compare
|
|
andrewbattat
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🥳
34e9296 to
c9a2286
Compare
In #3508 we change the name of the underlying `ic-ref-test` binary, but keep the target the same. This breaks tests that have been depending on the binary name directly. This change uses the target path to reference the binary, instead.
Ah sorry for being unclear, #4515 set us up to change the binary name in |
mraszyk
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rubber-stamp as I'm not a bazel expert.
nmattia
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very exciting! 🥳
This reverts commit [810ddde](810ddde). This new toolchain is causing build performance issues. The root cause is unclear, see uber/hermetic_cc_toolchain#215.
…#4621) This reverts commit [810ddde](810ddde). This new toolchain is causing build performance issues. The root cause is unclear, see uber/hermetic_cc_toolchain#215. --------- Co-authored-by: IDX GitHub Automation <[email protected]>
…#4621) This reverts commit [810ddde](810ddde). This new toolchain is causing build performance issues. The root cause is unclear, see uber/hermetic_cc_toolchain#215. --------- Co-authored-by: IDX GitHub Automation <[email protected]>
Following #3508 and #4621 What has changed since last time? - dd17358 - Share the zig cache across targets to improve build speed. `zig cc` builds system components on demand, and the shared cache means these are only built once. - 80f68ab + 31d8822 - Strip debug_info, but preserve symbols, to fix traces. `zig cc` can only strip everything, or nothing at all. First patch `rules_rust` to disable the default stripping, then patch `hermetic_cc_toolchain` to strip only `debug_info`, outside of the main call to `zig cc`. --------- Co-authored-by: Nicolas Mattia <[email protected]> Co-authored-by: IDX GitHub Automation <[email protected]>
If we upgrade our build container, the dynamic libraries linked to our published binaries upgrade, too. We would like to link against older libraries in order to support more targets, and would like to upgrade our build container to use more modern tools.
In order to decouple the bazel build from our build container, build using hermetic_cc_toolchains pinned to an older libc, and patch up the rough edges.