NixOS / nix

Nix, the purely functional package manager
https://nixos.org/
GNU Lesser General Public License v2.1
12.53k stars 1.5k forks source link

Interrupting the daemon is weird #11667

Open roberth opened 1 week ago

roberth commented 1 week ago

Describe the bug

nix daemon worker interruptions appear to behave inconsistently. Before getting an op, it would just terminate, leaving the RemoteStore in a state where it won't try to reconnect. (As separate problem)

If the interruption is discovered during an operation, it is reported the same as any other Error, and with the standard message interrupted by the user, which may or may not be true, and is a bit of a stretch to report it that way.

Steps To Reproduce

Expected behavior

nix-env --version output

Additional context

Priorities

Add :+1: to issues you find important.

edolstra commented 1 week ago

Under what circumstances would the daemon itself be interrupted? I guess you can manually send a SIGINT to the daemon worker process, but I don't know if we want to go out of our way to handle that transparently on the client side. For long-running processes like hydra-server it would be good to reconnect for subsequent operations, at least.