-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
debug output substituted from cache does not match original output #7756
Comments
That may well be the case. For example:
Whenever you have two store paths that need to be in sync, this is only guaranteed to work when Nixpkgs builds those paths in a reproducible manner. The build id is an impurity that Nixpkgs is responsible for fixing. |
Your explanation does not match my case: if I delete manually the two offending store path, and redownload them simultaneously, then I still get the mismatch. Hydra did build the two store path simultaneously as well, so something inside hydra or nix did mix and match them.
|
Seems like both a hydra and nixpkgs bug then. |
Besides, nix-build --check indicates that qemu builds reproducibly (build-ids are hashes of the content of some elf sections, they are not random), so I don't think nixpkgs is at fault here. |
Thank you; I'm not much of an elf expert. |
I don't understand why you think this is only a reproducibility problem when:
There was no "download one, then rebuild on hydra, then download another" dance. I should have downloaded either two first builds or the two last builds of these store paths, but not a mix of the two. |
Maybe the dance happened in hydra? Otherwise I'm out of ideas for mechanisms that allow this to happen.
(1) and (3) are different builds. This does hinge on the possibility that (3) can be scheduled after (1), but Hydra has demonstrated to me before that it doesn't always exploit dependency information. That is anecdotal of course.
Not all impurities are random, or time based. They can take input from cpu architecture, kernel version and more.
So does my example, twice.
Compatible with the hypothesis. |
Downloading
qemu
andqemu.debug
from hydra at the same time results in different build-ids and different logs. As a result debug symbols are not usable. (also happens with fwupd)Steps To Reproduce
Checkout nixpkgs at 0591d6b57bfeb55dfeec99a671843337bc2c3323
These are different build-ids.
I don't think this is a bug in the nixpkgs code generating separate debug info, for the following reason:
nix log ./result yields a log mentioning:
which is the build-id I get in -debug output
Hydra log on the other hand is https://hydra.nixos.org/build/208064778/nixlog/1 which mentions
which is the build-id of the bin output.
As if qemu was built twice and the substituted outputs belonged to distinct builds.
Expected behavior
build-id matches between debug output and original outputs
nix-env --version
outputAdditional context
Mix and match of drv files was already noticed at #7562 but this time we mix and match build outputs and it actually breaks stuff.
debuginfo mismatch is detected by https://github.com/symphorien/nixseparatedebuginfod (there is one warning for each instance in your store at first startup, if you have the debug-outputs downloaded).
Priorities
Add 👍 to issues you find important.
The text was updated successfully, but these errors were encountered: