[Nix#9548] Potential race condition between nix-store --gc
and nix-build
#90
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#90
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#9548
Describe the bug
In an attempt to run
home-manager --flake . switch
to build a newhome-manager-generation
whilenix-store --gc
is running, I got the following outputs;(The trace message about unfree and insecure packages are added by my
allow{Unfree,Insecure}Predicate
in myconfiguration.nix
.)If you have a problem with a specific package or NixOS,
you probably want to file an issue at https://github.com/NixOS/nixpkgs/issues.
Steps To Reproduce
I don't know how to reproduce this. Here's what I did before it occurs:
nix-store --gc
because of disk space outage.cd .config/nixos
, the directory of the Home Manager Configuration flake.home-manager --flake . switch
warning: error: SQLite database '/nix/var/nix/db/db.sqlite' is busy
twiceExpected behavior
In the multi-user Nix installation, the users expect Nix to prevent race condition when
nix-store --gc
andnix-build
is run by different processes or even different users. This should not be at the expense of a full blockage ofnix-build
during thenix-store --gc
execution.nix-env --version
outputnix-env (Nix) 2.15.2
Additional context
nix-info -m
output:"x86_64-linux"
Linux 6.1.55, NixOS, 23.05 (Stoat), 23.05.20231007.5a237ae
yes
yes
nix-env (Nix) 2.15.2
/nix/store/hwqz0b3d0wcyjvb4fda1wf8lhj4vaa4m-source
Add any other context about the problem here.
Priorities
Add 👍 to issues you find important.