-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Description
Downloading qemu and qemu.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
$ nix-build -A qemu -A qemu.debug
/nix/store/dfxy53v2142cbp5l5fzg0srxb4fzh7m5-qemu-7.2.0
/nix/store/w1hwhyrsmvgmaz7ggaqarbny3iyacqgl-qemu-7.2.0-debug
$ LANG=C readelf -a result/bin/qemu-system-aarch64 | grep Build
Build ID: c688a6af5e64019b775be06285a9823b0ee058b0
$ LANG=C readelf -a result-debug/lib/debug/qemu-system-aarch64 | grep Build
readelf: Error: Unable to find program interpreter name
Build ID: eebcd5810e67a5754ae1e77a0fd12118c7f6ab45
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:
separating debug info from /nix/store/dfxy53v2142cbp5l5fzg0srxb4fzh7m5-qemu-7.2.0/bin/qemu-system-aarch64 (build ID eebcd5810e67a5754ae1e77a0fd12118c7f6ab45)
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
separating debug info from /nix/store/dfxy53v2142cbp5l5fzg0srxb4fzh7m5-qemu-7.2.0/bin/qemu-aarch64 (build ID 6b6520854c647f9f706ac95f13dab5003eb98472)
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 output
$ nix-env --version
nix-env (Nix) 2.11.1
Additional 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.