DeterminateSystems / nix-installer

Install Nix and flakes with the fast and reliable Determinate Nix Installer, with over 2 million installs.
GNU Lesser General Public License v2.1
2.04k stars 52 forks source link

Boot-out failed: 5: Input/output error on systems.determinate.nix-installer.nix-hook #1168

Open viniciuspalma opened 5 days ago

viniciuspalma commented 5 days ago

Error

Error: 
   0: Install failure
   1: Error executing action
   2: Action `create_nix_hook_service` errored
   3: Failed to execute command with status 5 `"launchctl" "bootout" "system" "/Library/LaunchDaemons/systems.determinate.nix-installer.nix-hook.plist"`, stdout: 
      stderr: Boot-out failed: 5: Input/output error

Metadata

key value
version 0.26.0
os macos
arch aarch64
cole-h commented 5 days ago

Is it possible this machine had our nix-installer run on it before?

If you try the install again, does it go any further?

If it happens again, before you run the revert steps, could you show the output of launchctl print system/systems.determinate.nix-installer.nix-hook?

viniciuspalma commented 4 days ago

After installing john, my nix when dead, I've used nix-darwin I followed the process to uninstall it, but nothing is working now.

https://search.nixos.org/packages?channel=24.05&show=john&from=0&size=50&sort=relevance&type=packages&query=john

viniciuspalma commented 4 days ago

Is it possible this machine had our nix-installer run on it before?

If you try the install again, does it go any further?

If it happens again, before you run the revert steps, could you show the output of launchctl print system/systems.determinate.nix-installer.nix-hook?

Viniciuss-MacBook-Pro%          launchctl print system/systems.determinate.nix-installer.nix-hook
system/systems.determinate.nix-installer.nix-hook = {
    active count = 0
    path = /Library/LaunchDaemons/systems.determinate.nix-installer.nix-hook.plist
    type = LaunchDaemon
    state = not running

    program = /bin/sh
    arguments = {
        /bin/sh
        -c
        /bin/wait4path /nix/nix-installer && /nix/nix-installer repair
    }

    stdout path = /nix/.nix-installer-hook.out.log
    stderr path = /nix/.nix-installer-hook.err.log
    default environment = {
        PATH => /usr/bin:/bin:/usr/sbin:/sbin
    }

    environment = {
        XPC_SERVICE_NAME => systems.determinate.nix-installer.nix-hook
    }

    domain = system
    minimum runtime = 10
    exit timeout = 5
    runs = 2
    last exit code = 0

    semaphores = {
        successful exit => 0
    }

    spawn type = daemon (3)
    jetsam priority = 40
    jetsam memory limit (active) = (unlimited)
    jetsam memory limit (inactive) = (unlimited)
    jetsamproperties category = daemon
    jetsam thread limit = 32
    cpumon = default
    probabilistic guard malloc policy = {
        activation rate = 1/1000
        sample rate = 1/0
    }

    properties = inferred program | system service | managed LWCR | has LWCR | tle system
}
viniciuspalma commented 4 days ago

Tried to reinstall as you said @cole-h same same, same error seems that's stuck at the same stage.

cole-h commented 4 days ago

Does anything change if you manually run the launchctl bootout command it failed on?

viniciuspalma commented 3 days ago

No, now the file not even exist.

viniciuspalma commented 3 days ago

This: helped out https://github.com/NixOS/nix/issues/3861#issuecomment-664759605

cole-h commented 3 days ago

No, now the file not even exist.

I guess we might need to check if the file even exists before we try to bootout. Thanks for that information.

This: helped out NixOS/nix#3861 (comment)

Are you sure it wasn't just trying it again that fixed it? I'd expect a different error to show up if /etc/synthetic.conf had bad permissions...

Regardless, glad you were able to proceed further!

AlexMouton commented 20 hours ago

@viniciuspalma do you have a huge number of watchman processes in ps -ef ? Maybe unrelated but i had just posted a similar issue and updating brew and watchman seems to have helped.