[Nix-dev] Locking issues with Nix

Guillaume Maudoux (Layus) layus.on at gmail.com
Tue Aug 9 15:42:25 CEST 2016


Hi nix devs,

I am posting here an issue reported on [1], hoping to get a quick fix

With my current version of nix, I observe the following behaviour after
some calls to nix:
The command hangs forever.

    |$ nix-build ... these derivations will be built:
    /nix/store/<hash>-<name>.drv waiting for locks or build slots... |

This occurs after cancelling some other builds through the daemon.
When I cancel a user nix-build (or nix-env) command, it shows me an
|error: interrupted by the user|.

This error also appears in the logs of the nix-daemon:

    |aoû 07 23:05:58 ankh-morpork systemd[1]: Started Nix Daemon. aoû 07
    23:05:58 ankh-morpork nix-daemon[2971]: accepted connection from pid
    2970, user layus aoû 07 23:06:41 ankh-morpork nix-daemon[2971]:
    accepted connection from pid 3070, user layus aoû 07 23:07:06
    ankh-morpork nix-daemon[2971]: unexpected Nix daemon error:
    interrupted by the user aoû 07 23:08:38 ankh-morpork
    nix-daemon[2971]: accepted connection from pid 3442, user layus aoû
    07 23:09:29 ankh-morpork nix-daemon[2971]: unexpected Nix daemon
    error: interrupted by the user ... |

and so on. My guess is that after some such cancellations, there is no
build user available anymore.

Do you have any idea of

1) How to clear the locks without rebooting ?
2) How to investigate the issue ?

Needless to say that not being able to build anything is a huge
annoyance :-).

Regards,

-- Layus.

[1] https://github.com/NixOS/nix/issues/1015

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.science.uu.nl/pipermail/nix-dev/attachments/20160809/363043e0/attachment.html>


More information about the nix-dev mailing list