Skip to content

Remote building over ssh can cause hangs on lots of output, ssh-ng:// seems fine #16437

Description

@nh2

Today I ran a

nix-store -r --builders 'root@othermachine x86_64-linux,i686-linux - 16 - big-parallel,kvm,nixos-test' --option builders-use-substitutes true --max-jobs 0 --keep-going /nix/store/rsyb453zyh05kpsnqpzasmrzzp4lxz2i-openssl-1.1.1w.drv

and it hung forever.

On the remote side, there's still a nix-store --serve --write hanging around that seems to be deadlocked.

I suspect this happened because my client (laptop) disconnected from the remote builder's SSH connection due to an Internet drop.

Cancelling that nix-store -r on the client and re-running it also causes it to be hung forever. Only manually SIGKILLing the process on the remote fixes it.

Expected behavior

Nix remote builiding should not cause such random hangs that live forever and need humand intervation.

If a remote client disconnects, eventually that build should be cleaned up (at least at the TCP timeout), which isn't happening.

Metadata

Client and server nix version: nix-env (Nix) 2.34.8

Checklist


Add 👍 to issues you find important.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions