Skip to content
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

Build reproducibility issue on Windows caused issues for 3.4.4 release #55995

Closed
athomas opened this issue Jun 13, 2024 · 4 comments
Closed

Build reproducibility issue on Windows caused issues for 3.4.4 release #55995

athomas opened this issue Jun 13, 2024 · 4 comments
Assignees
Labels
area-vm Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends. os-windows P2 A bug or feature request we're likely to work on triaged Issue has been triaged by sub team

Comments

@athomas
Copy link
Member

athomas commented Jun 13, 2024

These builds were triggered on the same commits:
https://ci.chromium.org/ui/p/dart-internal/builders/ci/dart-sdk-win-arm64-stable/42/overview
https://ci.chromium.org/ui/p/dart-internal/builders/ci/dart-sdk-win-arm64-stable/43/overview

They created these CIPD packages:
https://chrome-infra-packages.appspot.com/p/dart/dart-sdk/windows-arm64/+/BJQj5t8FiV7ro7FDJSGRGDZf3p05YsCdagql2lSq2-AC
https://chrome-infra-packages.appspot.com/p/dart/dart-sdk/windows-arm64/+/syZDaczXKFTFVfvT13KA4jL6sSHuhY-nHSPJqWLTwSIC

The packages have slight differences (handful of bytes) in these binaries:

bin/dart.exe
bin/dartaotruntime.exe
bin/utils/gen_snapshot.exe
bin/utils/wasm-opt.exe

This caused the CIPD packages to have different hashes, which in turn caused an inconsistency because there are now two packages with the same git_version tag but different content.

@athomas athomas added the area-vm Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends. label Jun 13, 2024
@a-siva
Copy link
Contributor

a-siva commented Jun 13, 2024

//cc @rmacnak-google

@rmacnak-google
Copy link
Contributor

The differences are in the PE/COFF timestamps and a GUID in the RSDS reference to the PDB file.

It looks like ldd-link offers some flags to handle the COFF timestamp, but we are still using the MSVC linker even when we compile with Clang. (https://blog.llvm.org/2019/11/deterministic-builds-with-clang-and-lld.html)

@a-siva
Copy link
Contributor

a-siva commented Jun 17, 2024

@athomas looks like we have always had this issue and it is not a recent regressions, I would like to understand the criticality of this problem (i.e is it something we have to fix?)

@athomas
Copy link
Member Author

athomas commented Jun 21, 2024

It's probably a P2 (depending on the effort needed to fix it), impact is:

  • Introduces risk in the release process: re-running Windows builds doesn't work if they flake at the wrong moment (after the SDK CIPD package is uploaded and tagged but before the BCID attestation is added). These broken CIPDs need to be untagged manually to allow the releases to go out. This happens rarely.
  • Caches for RBE builds on Windows will be less effective. This probably happens all the time, but just degrades build speeds (especially on Windows).

@a-siva a-siva added P2 A bug or feature request we're likely to work on triaged Issue has been triaged by sub team labels Jun 26, 2024
copybara-service bot pushed a commit that referenced this issue Jul 2, 2024
 - Add missing memory permissions
 - Add missing alignment directive
 - Add missing compatible-with-SafeSEH flag

Bug: #55995
Change-Id: Iad5aeb2af29511d079a8b8fa113d9c09e764a3f9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/373881
Commit-Queue: Ryan Macnak <[email protected]>
Reviewed-by: Alexander Aprelev <[email protected]>
copybara-service bot pushed a commit that referenced this issue Jul 2, 2024
 - Make the build deterministic

Bug: #55995
Change-Id: Ic800dd66f23bc402dfede09db3f67f01aa82d29d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/373360
Reviewed-by: Alexander Aprelev <[email protected]>
Commit-Queue: Ryan Macnak <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-vm Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends. os-windows P2 A bug or feature request we're likely to work on triaged Issue has been triaged by sub team
Projects
None yet
Development

No branches or pull requests

3 participants