-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
After macOS migration: installation script failed: error: the build users group 'nixbld' has no members #6078
Comments
Was able to get past install error after running this:
|
Not sure this is actionable without more context on the pre-install state (i.e., how/why the build users already existed but the group didn't). |
It was a new machine. Only thing I can think of is that I tried to run the single user install (see steps to repro). But other than that, not sure. |
I'm not sure either. We're obviously out in ~weird territory... I'll show my math on why this doesn't add up, and then ask a few increasingly paranoid questions: 1~~> Setting up the build group nixbld
---- sudo execution ------------------------------------------------------------
I am executing:
$ sudo /usr/sbin/dseditgroup -o create -r Nix build group for nix-daemon -i 30000 nixbld
Create the Nix build group, nixbld
Created: Yes You can see in the underlying code here that it would say the group "exists" if it was already there, and say it was "created" if not: nix/scripts/install-multi-user.sh Lines 448 to 471 in 4d67ecb
2
Likewise, it'll say whether the user already exists or is created: nix/scripts/install-multi-user.sh Lines 484 to 503 in 4d67ecb
3https://github.com/NixOS/nix/blob/master/scripts/install-nix-from-closure.sh handles both the option parsing and the single-user install process. If you invoked with nix/scripts/install-nix-from-closure.sh Lines 61 to 65 in 4d67ecb
It would abort your install before making any changes. You can confirm in the broader source (and, in any case, the single-user install creates no groups or users). adding it upSo:
questions
|
First off: you're a legend for thinking about this so much. To answer your questions:
Unfortunately no. I do have some bash history I will include though, starting with the first attempt to do a single user install.
It's a work computer, but I purchased it myself from and does not have MDM or any other kind of profile provisioning on it. Also, no body else at my company experienced this issue, just me (and there are several other nix users).
I bought it new, unwrapped it, and set it up myself.
Yes. But it didn't work, so I (attempted) to wipe by doing a new install. I did have nix installed on my previous computer. This seems really sus, I think you found the problem. I wonder if there's anyway for me to check if I had a partial migration. I bet I didn't actually wipe it like I thought I did.
Nope.
Yes.
No, I wiped it.
Latest. I updated it right before I sent it to another colleague, so 12.x.x. (not sure exactly).
Sometime after Dec 13. |
SUS
I think you found the problem @abathur. Users/groups brought over from a migration. |
I actually forgot about the migration because (as I mentioned) I tried (and obviously failed) to wipe it. |
And look at this section from /Library/SystemMigration/History
|
QED. Fields Medal for @abathur |
Other than detecting this and recovering, nothing to do for this issue I guess. Feel free to close and thanks for your awesome investigation! |
Ha! I'm glad that seems like the culprit. We would've been deep in red yarn territory if none of these panned out. I think it can stay open (and I don't have the power to close it, anyways). If you can find a way to phrase the migration assistant into the title it may help this thread be a better light-house for anyone else seeing the same. As far as fixing this later goes:
|
Done. |
I'm assisting a user who appears to be hitting this issue (including the SystemMigration reference). Even though
|
I'm not sure what to tell you, but I happened to notice this in my inbox right after you sent it, so I want to note that there are some poorly-understood quirks here with respect to user/group relations in macOS. You can see an example of this in #4532 (comment) and my 2 immediately-following comments. I suspect the thing that'll get you on the road again is trying to follow these uninstall instructions before reinstalling: https://nixos.org/manual/nix/stable/installation/installing-binary.html#macos That said, if you have a little bit of timeline wiggle here it would be nice to collect some information on the user/group setup on this device. (I don't personally work with users/groups much in macOS, but I've asked in chat to see if anyone has specific ideas...) |
The user who was experiencing this is no longer in the impacted state: It was fixed by looping over the build accounts, running I'm guessing that this added I did get a dump of the |
Glad your user is sorted. :) Also promising that they're related, since GroupMembership was involved yet again. If there's nothing sensitive in them, can you drop them in a code block, perhaps within a |
Okay, got a new dump, and comparing them, the difference is clear as day :) Only after running the relevant |
btw, it's worth explicitly calling out that |
Sorry for the slow response--I had this mostly-written in a tab but then discovered some plagiarism and had my day/week/month upended... Thanks for the update! I'm glad that we seem to have a culprit. (But broadly frustrated that there's so much lurking complexity here...) Some thoughts on potential next steps:
|
No I don't remember the exact version, but can hazard some guesses. I was migrating from an almost brand new M1 machine to another new M1 machine with almost identical specs (the new one just had more RAM). The "old" machine was almost certainly up to date (I update regularly). Based on https://en.wikipedia.org/wiki/MacOS_Monterey it looks like that would have been 12.1, 12.2, or 12.2.1 (unlikely since it was released the same day I reported this issue. I don't remember what the "new" machine had on it, but I started using it almost as soon as it arrived, so assuming Apple gave me a recently built computer (which I imagine they did since I had to wait a while for it) it also was probably running 12.1 or 12.2. |
I did not. I'm not sure what "a Feedback" is (but I'm guessing some nixOS thing). |
@drichardson drat; I guess we won't age out of it then. Thanks for narrowing it down :) By feedback I just mean a report in the Apple Feedback Assistant. |
The most recent system it was observed on was a M1 Mac received within the last two weeks. I don't have the precise version number at hand. Going through my old emails, my prior Apple Support engagements don't appear to have transcripts, so at least from the emailed receipts I don't have enough information to pin down which of them corresponded with this issue (I reported it to them once after it happened on then-recent M1-based personal hardware some time last year, which AFAIK nothing ever came of). I don't believe I've ever used the Feedback Assistant. |
Insofar as this issue is pretty easy to identify by querying a dumped group plist, I'd imagine we could (1) patch the installer to identify and repair it (as a bare minimum, to ensure that reinstalling does fix the issue); and (2) possibly add some pre-startup logic to the nix-daemon launchd service. |
Describe the bug
The installation script failed.
Reporting here per the instructions as the bottom of the output.
Steps To Reproduce
NOTE: It's highly likely (2) was an aborted Migration.
Fails with:
Expected behavior
Installation should succeed.
nix-env --version
outputN/A because nix not installed yet.
Additional context
Full log
The text was updated successfully, but these errors were encountered: