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

unable to start build process while installing Nix #1227

Open
sudip-yirifi opened this issue Oct 9, 2024 · 1 comment
Open

unable to start build process while installing Nix #1227

sudip-yirifi opened this issue Oct 9, 2024 · 1 comment
Labels

Comments

@sudip-yirifi
Copy link

Error

Error: 
   0: Install failure
   1: Error executing action
   2: Action `configure_nix` errored
   3: Action `setup_default_profile` errored
   4: Failed to execute command with status 1 `HOME="/root" NIX_SSL_CERT_FILE="/nix/store/852a51xd3m7jyzifqimxc3jf3w2ipc4k-nss-cacert-3.101/etc/ssl/certs/ca-bundle.crt" "/nix/store/2nhrwv91g6ycpyxvhmvc0xs8p92wp4bk-nix-2.24.9/bin/nix-env" "--option" "substitute" "false" "-i" "/nix/store/2nhrwv91g6ycpyxvhmvc0xs8p92wp4bk-nix-2.24.9"`, stdout: 
      stderr: installing 'nix-2.24.9'
      error: unable to start build process


Metadata

key value
version 0.27.0
os linux
arch x86_64
@sudip-yirifi sudip-yirifi reopened this Oct 9, 2024
edolstra added a commit to DeterminateSystems/nix-src that referenced this issue Oct 9, 2024
This should help with issues like
DeterminateSystems/nix-installer#1227, which
currently just print "unable to start build process".
@edolstra
Copy link
Contributor

edolstra commented Oct 9, 2024

This means that Nix fails in this bit of code:

                /* Drop additional groups here because we can't do it
                   after we've created the new user namespace. */
                if (setgroups(0, 0) == -1) {
                    if (errno != EPERM)
                        throw SysError("setgroups failed");
                    if (settings.requireDropSupplementaryGroups)
                        throw Error("setgroups failed. Set the require-drop-supplementary-groups option to false to skip this step.");
                }

                ProcessOptions options;
                options.cloneFlags = CLONE_NEWPID | CLONE_NEWNS | CLONE_NEWIPC | CLONE_NEWUTS | CLONE_PARENT | SIGCHLD;
                if (privateNetwork)
                    options.cloneFlags |= CLONE_NEWNET;
                if (usingUserNamespace)
                    options.cloneFlags |= CLONE_NEWUSER;

                pid_t child = startProcess([&]() { runChild(); }, options);

I suspect this has something to do with lack of namespace support in the kernel, but it's hard to tell from the error message. I've made NixOS/nix#11664 to help diagnose this in the future.

What Linux distribution is this on?

@cole-h cole-h changed the title <autogenerated-issue> unable to start build process while installing Nix Oct 9, 2024
@cole-h cole-h added the Linux label Oct 9, 2024
Mic92 pushed a commit to Mic92/nix-1 that referenced this issue Oct 21, 2024
This should help with issues like
DeterminateSystems/nix-installer#1227, which
currently just print "unable to start build process".
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants