nix upgrade-nix reliably removes Lix from the default profile #1060
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 project
No assignees
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
lix-project/lix#1060
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
New with 2.94.
When I run
sudo nix upgrade-nix, the uninstall works fine but the install fails, leaving me without any Nix available:Steps To Reproduce
Fix the install like this, big thanks to @jade for helping write this command (the store path may need to be changed for non-
aarch64-darwinsystems, see https://releases.lix.systems/lix/lix-2.94.0/manifest.nix):Expected behavior
Lix version is unchanged because there's nothing new to install (in fact, I would expect
nix upgrade-nixto realize the new version and old version are the same store path and no-op).nix --versionoutputI think the design risk that causes this to happen is that we aren't creating a new profile and then calling
nix-env --seton it, instead of doing in-place mutations with an invalid state in the middle.FYI to anyone else hitting this, I got the store path from https://releases.lix.systems/lix/lix-2.94.0/manifest.nix
Yeah, agree we should create a new profile. The underlying error is weird too, haven't seen that one before:
error: cannot open connection to remote store 'daemon': error: stream ended unexpectedly.We changed the behavior by default for privileged Nix operations, they don't use
--store localby default anymore and tries to go over the daemon. It's very likely when you uninstall the Lix instance, the Lix daemon goes down suddenly, your local copy in-memory of Lix that is re-installing itself cannot talk anymore to a daemon and crashes as well.upgrade-nixperhaps should prevent daemon connections to take place to avoid this situation.