[Nix#8907] Ran out of disk space building NixOS 23.05 on 22.11 and corrupted 178 store paths #118
Labels
No labels
Area/build-packaging
Area/evaluator
Area/flakes
Area/profiles
Area/remote-builds
Area/repl
Area/store
bug
Cross Compilation
devx
docs
Downstream Dependents
E/easy
E/hard
E/help wanted
E/reproducible
E/requires rearchitecture
imported
Needs Langver
OS/Linux
OS/macOS
performance
regression
release-blocker
RFD
stability
Status
blocked
Status
invalid
Status
postponed
Status
wontfix
testing
ux
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: lix-project/lix#118
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Upstream-Issue: NixOS/nix#8907
Describe the bug
Was running 22.11. Updated system config for 23.05 and did a
nixos-rebuild boot
. System ran out of disk space part way through. Freed more disk space and reissuednixos-rebuild boot
. It completed. Booting failed.Eventually tracked the issue down to
...-util-linux-2.38.1-bin
having a butch a zero length executables underbin
. Rannix store verify --all
and discovered there were 178 corrupted store paths including...-util-linux-2.38.1-bin
. Presumably the others also had zero length files, but didn't check to make sure.Fixed these all with
nix store repair ...
. System boots fine now. Would seem that the nix store path unpacker did not handle running out of disk space correctly. In case it is relevant, my root filesystem is btrfs with zstd compression.Steps To Reproduce
Presumably install a package under 22.11 when you don't have enough disk space for it? Possibly you need a filesystem with compression enabled (all though I can't imagine why that would be an issue as that generally has no effect beyond it underestimating free space). Not sure if this is an issue under the newer nix in 23.05.
Expected behavior
If space is exhausted when unpacking a store path, it should not be put it in place with a bunch of the files zeroed.
nix-env --version
outputRunning this on the old 22.11 system link gives