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

rustc: not reproducible #229858

Closed
raboof opened this issue May 4, 2023 · 4 comments
Closed

rustc: not reproducible #229858

raboof opened this issue May 4, 2023 · 4 comments

Comments

@raboof
Copy link
Member

raboof commented May 4, 2023

Building this package twice does not produce the bit-by-bit identical result each time, making it harder to detect CI breaches. You can read more about this at https://reproducible-builds.org/ .

Fixing bit-by-bit reproducibility also has additional advantages, such as avoiding hard-to-reproduce bugs, making content-addressed storage more effective and reducing rebuilds in such systems.

Steps To Reproduce

nix-build '<nixpkgs>' -A rustc --check --keep-failed

You can use diffoscope to analyze the differences in the output of the two builds.

To view the build log of the build that produced the artifact in the binary cache:

nix-store --read-log $(nix-instantiate '<nixpkgs>' -A rustc)

Additional context

This unreproducibility seems to be sporadic, but was observed in: https://delroth.net/report-iso_minimal/diff/a0aa598dfe85be4a554c1ed73eb217db8b5f7faeea62b5d8cd5996d8b509550f-80e6fbc77b1d0b38d3dcf1c27ccdea5e1b2906aa2189e24d3a1d24fdfe2406bf.html

Upstream intends to be reproducible: rust-lang/rust#34902

@06kellyjac
Copy link
Member

06kellyjac commented May 4, 2023

@ivan770
Copy link
Member

ivan770 commented Nov 24, 2023

Might be related: rust-lang/rust#112098

@bachp
Copy link
Member

bachp commented Dec 14, 2023

I tried to reproduce this with:

nix-build '<nixpkgs>' -A  rustPackages.rustc-unwrapped --check --keep-failed

But I got 3 times the same derivation /nix/store/praqicbhpa137gq0mb9ygg9c7wyripnk-rustc-1.74.0 accros 2 different machines (1 NixOS, 1 Arch).

I used the following commit on nixpkgs 3a360cf which was latest master at the time.

Did I do something wrong or is the reproducibility better with 1.74.0?

@raboof
Copy link
Member Author

raboof commented Dec 14, 2023

I also failed to reproduce this problem, even when it was first reported. Of course this only means the problem is hard to reproduce, not that it does not exist.

So it's hard to say whether it improved with 1.74.0, but perhaps we should close it for now and reopen when we verify the problem still exist?

@raboof raboof closed this as completed Dec 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Minimal ISO build closure
Development

No branches or pull requests

4 participants