Store path is present in ValidPaths in db.sqlite but is not present in the nix store #1119
Labels
No labels
Affects/CppNix
Affects/Nightly
Affects/Only nightly
Affects/Stable
Area/build-packaging
Area/cli
Area/evaluator
Area/fetching
Area/flakes
Area/language
Area/lix ci
Area/nix-eval-jobs
Area/profiles
Area/protocol
Area/releng
Area/remote-builds
Area/repl
Area/repl/debugger
Area/store
awaiting
author
awaiting
contributors
bug
Context
contributors
Context
drive-by
Context
maintainers
Context
RFD
crash 💥
Cross Compilation
devx
docs
Downstream Dependents
E/easy
E/hard
E/help wanted
E/reproducible
E/requires rearchitecture
Feature/S3
imported
Language/Bash
Language/C++
Language/NixLang
Language/Python
Language/Rust
Needs Langver
OS/Linux
OS/macOS
performance
regression
release-blocker
stability
Status
blocked
Status
invalid
Status
postponed
Status
wontfix
testing
testing/flakey
Topic/Large Scale Installations
ux
No milestone
No project
No assignees
4 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
lix-project/lix#1119
Loading…
Add table
Add a link
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?
Describe the bug
For the second time now, I have a build failure like this:
However, the path in question should be in my nix store according to the nix DB:
Manually fetching the path from another machine and copying it into the nix store, fixes the issue.
The path in question is coming from here:
github.com/NixOS/nixpkgs@f613dc8375/pkgs/by-name/sw/switch-to-configuration-ng/package.nix (L16)Is lix somehow getting confused and deleting this path because it thinks that it's a lock file for the derivation?
Steps To Reproduce
I didn't yet figure out how to reproduce it, but it has happened twice so far, both times when doing large builds with a couple of thousand derivations.
nix --versionoutput@tom-hubrecht ran into this as well, but without a reproducer, we will be in trouble to figure out the root cause. Any help on this is appreciated.
Yeah, I tried for a bit but I couldn't figure out yet how to reproduce it exactly.
In the case of @tom-hubrecht, was it also a derivation with a name ending in
.lock?@r-vdp exactly the same file I think
No I lied:
on Tom's side.
@r-vdp Have you verified your store entirely btw?
Those chroot directories are created during a build but are not registered as store paths though, right? Because in that case it's not the same issue.
it may still be the same issue because all paths that are spuriously disappearing are in the store and subject to GC deletion
@r-vdp do you have auto-gc enabled? @raito does tom?
@pennae wrote in #1119 (comment):
It's a bit of a weird setup on my part, it was in our CI that uses daemonless stores through containers, with 4 of them trying to build that derivation that was failing, so when a build failed if it deleted the lock before the chroot there might have been a race
I think that there is a clear pattern there...
@pennae wrote in #1119 (comment):
What do you mean by auto-gc exactly? I have a timer that runs
nix-collect-garbage --delete-older-than 14donce a week, and I have this in my nix.conf:AFAIK, these .lock things are local path files which appears in
inputSrcsof drvs, right? Or are those FODs or something else?For the Cargo.lock files, they are local paths that are in the
inputSrcsof thefetchCargoVendorFOD which itself is in theinputDrvsof the actual rust application derivation, which is a runtime dep of my nixos closure.