Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uninstall errored because Sequoia upgrade deleted _nixbld1-4 #1293

Open
CrepeGoat opened this issue Nov 15, 2024 · 5 comments
Open

Uninstall errored because Sequoia upgrade deleted _nixbld1-4 #1293

CrepeGoat opened this issue Nov 15, 2024 · 5 comments
Labels
MacOS Darwin/MacOS

Comments

@CrepeGoat
Copy link

Error

Error: 
   0: Error reverting
   0: Action `create_users_and_group` errored
      Multiple child errors

      Action `create_user` errored
      Failed to execute command with status 185 `"/usr/bin/dscl" "." "-delete" "/Users/_nixbld1"`, stdout: delete: Invalid Path

      stderr: <dscl_cmd> DS Error: -14009 (eDSUnknownNodeName)



      Action `create_user` errored
      Failed to execute command with status 185 `"/usr/bin/dscl" "." "-delete" "/Users/_nixbld2"`, stdout: delete: Invalid Path

      stderr: <dscl_cmd> DS Error: -14009 (eDSUnknownNodeName)



      Action `create_user` errored
      Failed to execute command with status 185 `"/usr/bin/dscl" "." "-delete" "/Users/_nixbld3"`, stdout: delete: Invalid Path

      stderr: <dscl_cmd> DS Error: -14009 (eDSUnknownNodeName)



      Action `create_user` errored
      Failed to execute command with status 185 `"/usr/bin/dscl" "." "-delete" "/Users/_nixbld4"`, stdout: delete: Invalid Path

      stderr: <dscl_cmd> DS Error: -14009 (eDSUnknownNodeName)




      Action `create_apfs_volume` errored
      Failed to execute command with status 1 `"/usr/sbin/diskutil" "apfs" "deleteVolume" "Nix Store"`, stdout: Started APFS operation
      Deleting APFS Volume from its APFS Container
      Unmounting disk3s7
      The volume "Nix Store" on disk3s7 couldn't be unmounted because it is in use by process 70012 (nix)

      stderr: Error: -69888: Couldn't unmount disk



Metadata

key value
version 0.19.0
os macos
arch aarch64
@cole-h
Copy link
Member

cole-h commented Nov 17, 2024

If you reboot and try to uninstall again, it should complete this time (it will spew a bunch of errors due to things already being completed but you can ignore them). You should then be able to reinstall.

If anybody runs into this in the future, I imagine it was caused by upgrading to macOS Sequoia before running our repair tool (https://determinate.systems/posts/nix-support-for-macos-sequoia/) -- if you run the repair tool, you won't need to try to uninstall and reinstall!

@cole-h cole-h added the MacOS Darwin/MacOS label Nov 17, 2024
@cole-h cole-h changed the title <autogenerated-issue> Uninstall errored because Sequoia upgrade deleted _nixbld1-4 Nov 17, 2024
@CrepeGoat
Copy link
Author

CrepeGoat commented Nov 19, 2024

that's pretty much what I did (small difference: on reboot the uninstall seemed to just be done; I tried to uninstall again and the uninstall script didn't exist), and now it works! thanks for the fix instructions.

and thanks for letting me know about the repair tool! unfortunately I didn't know about it before upgrading, in fact I'm not sure how I would have known as this is the first I'm hearing of it.

-> does determinate systems typically make repair tools for macOS upgrades? is it for each major- & minor-version upgrade?

@CrepeGoat
Copy link
Author

CrepeGoat commented Nov 20, 2024

also, turns out upgrading macOS broke all the global package installs I had listed with nix profile list. specifically running nix profile list produces the same list of installs I had before the upgrade/uninstall/reinstall, but none of them are accessible from PATH, and trying to make edits via nix commands like nix profile remove [PACKAGE] produces errors like:

error: filesystem error: in directory_iterator::directory_iterator(...): No such file or directory ["/nix/store/fgsrkvsa9mck3njnv0yz1f3d2yxd86nw-roc_cli-0.0.1"]

Not sure how to fix this.

edit: I followed some guides for changing my nix profile and now I don't seem to be able to get my original profile back; all I see from ls -l /nix/var/nix/profiles/ is the default link and per-user, neither of which have my previous profile contents. and when trying to install "new" packages like nix profile install nixpkgs#git, I get an error like:

error: filesystem error: in create_symlink: Permission denied ["/nix/store/k7dcpp11x8j6vbpjh4nayfdinn79sf83-profile"] ["/nix/var/nix/profiles/default-1-link.tmp-1811-116806888"]

@cole-h
Copy link
Member

cole-h commented Nov 20, 2024

-> does determinate systems typically make repair tools for macOS upgrades? is it for each major- & minor-version upgrade?

We only make repair tools when necessary. It was necessary this time because macOS Sequoia deleted users with the UIDs 301, 302, 303, and 304 (_nixbld1-4). We'll evaluate if we need another repair tool for the next version after that next version has been released for testing, but I don't think we'll ever need to repair a minor version upgrade (aside from repairing the shell hooks, which should happen automatically, but can be triggered manually with /nix/nix-installer repair hooks).

also, turns out upgrading macOS broke all the global package installs I had [...]

Those errors look related to NixOS/nix#11376 to me... What version of Nix are you using?

@CrepeGoat
Copy link
Author

$ nix --version
nix (Nix) 2.24.10

hmm yeah NixOS/nix#11376 does look related. either way I'm going to post an issue in https://github.com/NixOS/nix instead, I imagine there's not much that can be done here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
MacOS Darwin/MacOS
Projects
None yet
Development

No branches or pull requests

2 participants