Stuck at "copying path '<pkg_path>' from 'https://cache.nixos.org'" even after turning off network

Recently, my system cannot be updated, and it will be blocked for a long time. I noticed that even if I shut down the network, the update still executes to the “copying ... from 'https://cache.nixos.org'...” step, but there is no network activity and no timeout.

Today with a completely normal network, it blocked all night. Right now I can’t get the system to install any new packages, or perform any package updates.

There might be a bug in the nix daemon that never closes a connection to a binary cache and forever waits for a download to happen. I’ve hit that a few times before when experimenting with caches and restarting them during that time.

The only solution I found was to force kill all nix-daemon processes with sudo pkill -9 nix-daemon

It might be worth opening an issue about this.

3 Likes

I think for me it was always sufficient to just ^C that stuck CLI and rerun it. But it’s been relatively rare to appear in my case.

1 Like

I recently started seeing a similar problem. Interestingly in my case, copying is not completely blocked (other paths can be copied just fine), but certain paths seem to be persistently stuck (until after a reboot).

I filed an issue for it:

2 Likes