Unhelpful error message when a substituter is missing a dependency #716
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
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
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
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: lix-project/lix#716
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
When trying to fetch the narinfo for a dependency from a substituter fails (i.e. the substituter isn't upholding the store invariants), this isn't reported clearly.
This was first observed with cachix (and doesn't occur reliably there -- maybe its sporadic 502s affect cache service as well?), but can also be reproduced with a synthetic test case.
Steps To Reproduce
The final command will fail something like this:
If the drv is copied to the chroot store and realised instead of its output path, the behaviour combines somewhat oddly, claiming that it doesn't know how to build the dependency and yet starting to do so anyway:
Expected behavior
A warning when a path that's expected in a binary cache (based on the cache invariant "all dependencies should be there"), ideally with details on how getting the narinfo failed.
nix --version
outputAdditional context
It might be possible to trigger the same kind of failure without breaking the "all dependencies are present" invariant if through a somewhat convoluted combination of GC operations:
I think this hits a case where a decently useful message is generated, but for some reason not surfaced as a warning? It's printed with
-vvv
due to thisdebug
call, but that doesn't really count. I tried to figure out if the error case of theGoal::WorkResult
is handled, but I'm a bit too unfamiliar with the codebase that I couldn't find where that would be..See also https://github.com/NixOS/nix/issues/12610