A build just failed here, and it deadlocked.
configure: error: in `/tmp/nix-build-fcih4a43j39ad9dap2qin0h9n5h5bjxq-sharutils-4.11.1-mipsel-unknown-linux.drv-0/sharutils-4.11.1':
configure: error: cannot run test program while cross compiling
See `config.log' for more details
builder for `/nix/store/fcih4a43j39ad9dap2qin0h9n5h5bjxq-sharutils-4.11.1-mipsel-unknown-linux.drv' failed with exit code 1
building path(s) `/nix/store/m67l4ni17zijgq9c5zs13dd8gg9w431z-alsa-utils-1.0.26-mipsel-unknown-linux'
cannot build derivation `/nix/store/dgk0x9hnmz08sphjvnv88d35kc4mln3x-libarchive-2.8.3-mipsel-unknown-linux.drv': 1 dependencies couldn't be built
cannot build derivation `/nix/store/07fhl9bqrcbizanyj05fdf1r2avg8q1k-cmake-2.8.9-mipsel-unknown-linux.drv': 1 dependencies couldn't be built
cannot build derivation `/nix/store/i0vbbgwjybnm4sfa4aqxwjvxv9kg5m19-taskwarrior-2.1.2-mipsel-unknown-linux.drv': 1 dependencies couldn't be built
├─nix-worker(1501)───nix-worker(4216)─┬─bash(19837)
│ ├─bash(27946)───make(30564)───sh(30565)───make(31140)───make(31141)───make(31142)
│ ├─copy-from-other(4219)
│ └─download-using-(4220
# strace -p 31142
Process 31142 attached
write(1, "\33[3s\33[a/nix/store/mpnj4k2ijrgyfk"..., 189
(Ctrl-C)
# ls -l /proc/31142/fd/1
l-wx------ 1 nixbld10 nixbld 64 20 oct 10:58 /proc/31142/fd/1 -> pipe:[588762]
# ls -l /proc/4216/fd
...
lr-x------ 1 root root 64 20 oct 10:59 21 -> pipe:[588762]
...
# strace -p 4216
Process 4216 attached
waitpid(27946,
So, I think that nix-worker kills the children, and waits for the child PID to die. But if the children write to stdout/stderr, and they fill the buffer, it can deadlock.