fetchTree results for file
inputs are non-reproducibly influenced by store state by not considering the hash mode when grabbing existing paths #750
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#750
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?
I was working on flake-compat to support a feature for work and I found a flakes bug I wanted to unsee:
This goes back to at least 2.18, we didn't create this bug. CppNix fixed this somewhere between 2.19 and 2.24.
Repro: clone this and run
bash -x repro.sh
:https://gist.github.com/lf-/a412b1e1ab65a54454f46bde9e9be515
The reason for this is:
Equivalently replacing the flake bits with an
unflaked.nix
with the following contents works:Soundness bug in the fetcher cache it appears?ok no, because it also happens if you wipe that cache.first time:
second time:
okay so it tries for a store path matching the expected fixed output hash and then grabs it if it finds one.
Aha. This is completely unsound because it does not consider whether something actually is supposed to be recursive-mode hashed lol (do we want to force it to be? what is
narHash
supposed to mean, by design? always recursive?):https://git.lix.systems/lix-project/lix/src/81d55286461803206240ffd8a5e3d979706b2944/lix/libfetchers/fetchers.cc#L249-L275
@raito or @piegames: thoughts on how to deal with the hash stability impacts of fixing this? it seems like following with cppnix (always using the recursive path q9pr...) is probably the correct bad choice among the bad choices. soundness bugs...
This issue was mentioned on Gerrit on the following CLs:
file
type flake inputs are always recursive hashed")