--check/--rebuild reports false positive #643

Open
opened 2025-01-23 13:51:53 +00:00 by perchunpak · 2 comments

Describe the bug

The flag returns a false positive on rquickshare package.

Steps To Reproduce

  1. Go to nixpkgs checkout (my commit is d806aff)
  2. Verify that --check fails: nix-build -A rquickshare --check (compile time on my system is 5 minutes)
  3. cp -r /nix/store/glhxap88czn9lzh2dr7dc6197dk0yzpq-rquickshare-0.11.3 /tmp/old
  4. rm result; nix-store --delete /nix/store/glhxap88czn9lzh2dr7dc6197dk0yzpq-rquickshare-0.11.3
  5. nix build .#rquickshare --offline to rebuild without downloading from cache
  6. diff -r /tmp/old /nix/store/glhxap88czn9lzh2dr7dc6197dk0yzpq-rquickshare-0.11.3 returns exactly nothing

Expected behavior

--check wouldn't fail

nix --version output

nix (Lix, like Nix) 2.93.0-dev-pre20250123-caafc3f
System type: x86_64-linux
Additional system types: i686-linux, x86_64-v1-linux, x86_64-v2-linux, x86_64-v3-linux
Features: gc, signed-caches
System configuration file: /etc/nix/nix.conf
User configuration files: /home/perchun/.config/nix/nix.conf:/etc/xdg/nix/nix.conf:/home/perchun/.nix-profile/etc/xdg/nix/nix.conf:/home/perchun/.local/state/nix/profile/etc/xdg/nix/nix.conf:/home/perchun/.local/state/nix/profile/etc/xdg/nix/nix.conf:/etc/profiles/per-user/perchun/etc/xdg/nix/nix.conf:/nix/var/nix/profiles/default/etc/xdg/nix/nix.conf:/run/current-system/sw/etc/xdg/nix/nix.conf
Store directory: /nix/store
State directory: /nix/var/nix
Data directory: /nix/store/s3mdid85b7cr5q0s16mxibcm0spdki8z-lix-2.93.0-dev-pre20250123-caafc3f/share
## Describe the bug The flag returns a false positive on `rquickshare` package. ## Steps To Reproduce 1. Go to nixpkgs checkout (my commit is `d806aff`) 2. Verify that `--check` fails: `nix-build -A rquickshare --check` (compile time on my system is 5 minutes) 3. `cp -r /nix/store/glhxap88czn9lzh2dr7dc6197dk0yzpq-rquickshare-0.11.3 /tmp/old` 4. `rm result; nix-store --delete /nix/store/glhxap88czn9lzh2dr7dc6197dk0yzpq-rquickshare-0.11.3` 5. `nix build .#rquickshare --offline` to rebuild without downloading from cache 6. `diff -r /tmp/old /nix/store/glhxap88czn9lzh2dr7dc6197dk0yzpq-rquickshare-0.11.3` returns exactly nothing ## Expected behavior `--check` wouldn't fail ## `nix --version` output ``` nix (Lix, like Nix) 2.93.0-dev-pre20250123-caafc3f System type: x86_64-linux Additional system types: i686-linux, x86_64-v1-linux, x86_64-v2-linux, x86_64-v3-linux Features: gc, signed-caches System configuration file: /etc/nix/nix.conf User configuration files: /home/perchun/.config/nix/nix.conf:/etc/xdg/nix/nix.conf:/home/perchun/.nix-profile/etc/xdg/nix/nix.conf:/home/perchun/.local/state/nix/profile/etc/xdg/nix/nix.conf:/home/perchun/.local/state/nix/profile/etc/xdg/nix/nix.conf:/etc/profiles/per-user/perchun/etc/xdg/nix/nix.conf:/nix/var/nix/profiles/default/etc/xdg/nix/nix.conf:/run/current-system/sw/etc/xdg/nix/nix.conf Store directory: /nix/store State directory: /nix/var/nix Data directory: /nix/store/s3mdid85b7cr5q0s16mxibcm0spdki8z-lix-2.93.0-dev-pre20250123-caafc3f/share ```
Author

nix 2.25.4 does not have this problem

nix 2.25.4 does not have this problem
Author

I discovered that --keep-failed keeps $out.check, so when I ran diff on it I got

778734,778739c778734,778739
< 00be1ed0: 546d 4c34 7263 3946 596b 6833 4856 4336  TmL4rc9FYkh3HVC6
< 00be1ee0: 7438 6d73 6445 2b6c 6c6c 5645 5535 5054  t8msdE+lllVEU5PT
< 00be1ef0: 4477 5a48 5934 4e53 3545 6b3d 2727 7368  DwZHY4NS5Ek=''sh
< 00be1f00: 6132 3536 2d44 4945 6d4f 524a 566a 786b  a256-DIEmORJVjxk
< 00be1f10: 3770 4442 566e 6c4a 6f38 4a6c 4e39 3466  7pDBVnlJo8JlN94f
< 00be1f20: 6567 382f 6430 6639 6f31 6f6a 6f4c 4763  eg8/d0f9o1ojoLGc
---
> 00be1ed0: 4449 456d 4f52 4a56 6a78 6b37 7044 4256  DIEmORJVjxk7pDBV
> 00be1ee0: 6e6c 4a6f 384a 6c4e 3934 6665 6738 2f64  nlJo8JlN94feg8/d
> 00be1ef0: 3066 396f 316f 6a6f 4c47 633d 2727 7368  0f9o1ojoLGc=''sh
> 00be1f00: 6132 3536 2d54 6d4c 3472 6339 4659 6b68  a256-TmL4rc9FYkh
> 00be1f10: 3348 5643 3674 386d 7364 452b 6c6c 6c56  3HVC6t8msdE+lllV
> 00be1f20: 4555 3550 5444 775a 4859 344e 5335 456b  EU5PTDwZHY4NS5Ek

I am not sure why those hashes are swapped, but this is still false positive as building manually twice is reproducable.

I discovered that `--keep-failed` keeps `$out.check`, so when I ran diff on it I got ``` 778734,778739c778734,778739 < 00be1ed0: 546d 4c34 7263 3946 596b 6833 4856 4336 TmL4rc9FYkh3HVC6 < 00be1ee0: 7438 6d73 6445 2b6c 6c6c 5645 5535 5054 t8msdE+lllVEU5PT < 00be1ef0: 4477 5a48 5934 4e53 3545 6b3d 2727 7368 DwZHY4NS5Ek=''sh < 00be1f00: 6132 3536 2d44 4945 6d4f 524a 566a 786b a256-DIEmORJVjxk < 00be1f10: 3770 4442 566e 6c4a 6f38 4a6c 4e39 3466 7pDBVnlJo8JlN94f < 00be1f20: 6567 382f 6430 6639 6f31 6f6a 6f4c 4763 eg8/d0f9o1ojoLGc --- > 00be1ed0: 4449 456d 4f52 4a56 6a78 6b37 7044 4256 DIEmORJVjxk7pDBV > 00be1ee0: 6e6c 4a6f 384a 6c4e 3934 6665 6738 2f64 nlJo8JlN94feg8/d > 00be1ef0: 3066 396f 316f 6a6f 4c47 633d 2727 7368 0f9o1ojoLGc=''sh > 00be1f00: 6132 3536 2d54 6d4c 3472 6339 4659 6b68 a256-TmL4rc9FYkh > 00be1f10: 3348 5643 3674 386d 7364 452b 6c6c 6c56 3HVC6t8msdE+lllV > 00be1f20: 4555 3550 5444 775a 4859 344e 5335 456b EU5PTDwZHY4NS5Ek ``` I am not sure why those hashes are swapped, but this is still false positive as building manually twice is reproducable.
pennae added this to the 2.95 milestone 2025-12-01 14:51:31 +00:00
raito self-assigned this 2025-12-07 00:26:32 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
lix-project/lix#643
No description provided.