Last night I spent a long time trying to fix my nixos configuration and failed. So today I resumed work with the existing generation, but it seems something I did has broken my nix.

Now when I run stack build to compile some Haskell I get:

these paths will be fetched (0.05 MiB download, 0.28 MiB unpacked):
copying path '/nix/store/wv1mbc34jaws00lyhgqr6aix5ql0c1r6-bash-interactive-4.4-p23-dev' from 'https://cache.nixos.org'...

And then it just hangs. It never produces an error or warning, it just hangs. I don't know what the issue is here. I am connected to the internet although if I disconnect and run it I get the exact same behavior. I tried a channel update, but that also made no difference.

I've tried searching around for this, but without an error it is difficult to get any information about my error.

What is the issue?


I don't know exactly what the issue was but I opened up pstree to have a look a the processes:

 |--= 04059 root /nix/store/657mlp757yfixz785sdv9acsak37f5qy-upower-0.99.11/libexec/upowerd
 |-+= 01858 root nix-daemon --daemon
 | |--= 25318 root nix-daemon 25308
 | |--= 24986 root nix-daemon 24976
 | |--= 24302 root nix-daemon 24289
 | |--= 23922 root nix-daemon 23909
 | |--= 23241 root nix-daemon 23231
 | |--= 22224 root nix-daemon 22214
 | |--= 21139 root nix-daemon 21129
 | |--= 19486 root nix-daemon 19467
 | |--= 16433 root nix-daemon 16406
 | |--= 15640 root nix-daemon 15629
 | |--= 15587 root nix-daemon 15575
 | |--= 15445 root nix-daemon 15435
 | |--= 14495 root nix-daemon 14484
 | |--= 14262 root nix-daemon 14252
 | |--= 13035 root nix-daemon 13025
 | |--= 11311 root nix-daemon 11301
 | |--= 09962 root nix-daemon 9951
 | \--= 07739 root nix-daemon 7721

And that's quite a few nix-daemons, which probably shouldn't be. And every time I run stack build again I notice that a new nix-daemon appears on the tree, and crucially when I sent a sig term to the process to exit while it appears to exit in my terminal displaying an error the process hangs around.

So it would seem that all these processes have accumulated from debugging efforts.

So I tried killing all these processes. I killed them individually going down the list and after process 19486 was killed all the remaining processes exited normally.

With these processes gone stack build now works normally.

Still don't know what was going on or why this fix works, but hopefully this can be of some help to someone in the future.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.