-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Open
Labels
Description
Describe the bug
Files that should not be hard-linked together get hard-linked. In particular for the case I saw, files that should have been empty files (8000+) were hard-linked to a non-empty file.
If I had to guess (and this is just a guess!), there was a race where store optimisation analyzed a file between its creation and having content written to it, and decided to hard-link it to the empty file. Once content was written, all other empty files became non-empty.
Steps to reproduce
Unclear.
Expected behavior
Hard links to only link identical files.
Metadata
nix-env (Nix) 2.31.2 on aarch64-darwin
Additional context
auto-optimise-store is disabled. Store optimisation runs in a scheduled job. nix store repair --all remedied the corrupt files, making them empty again.
Checklist
- checked latest Nix manual (source)
- checked open bug issues and pull requests for possible duplicates
Add 👍 to issues you find important.
Frontear