If the client tries to start talking to a ControlMaster just as it's exiting (due to ControlPersist timeout), it will fail with exit code 141 (SIGPIPE). To reproduce: ( while true; do \ sleep 0.5 ; \ gdb -ex r -ex q --args \ ssh -o ControlMaster=auto \ -o ControlPath=~/.ssh/elsa-ctrl-%C \ -o ControlPersist=1 127.0.0.1 -- touch /tmp/thingy ; \ done ) (You might need to fiddle with the sleep time) Program received signal SIGPIPE, Broken pipe. 0x00007ffff7b38f33 in __GI___libc_write (fd=fd@entry=3, buf=buf@entry=0x55555565e060, nbytes=nbytes@entry=12) at ../sysdeps/unix/sysv/linux/write.c:26 (gdb) bt #0 0x00007ffff7b38f33 in __GI___libc_write (fd=fd@entry=3, buf=buf@entry=0x55555565e060, nbytes=nbytes@entry=12) at ../sysdeps/unix/sysv/linux/write.c:26 #1 0x0000555555583380 in mux_client_write_packet (fd=fd@entry=3, m=m@entry=0x55555565deb0) at ../../mux.c:1513 #2 0x0000555555585944 in mux_client_hello_exchange (fd=3) at ../../mux.c:1589 #3 muxclient (path=0x55555565ba60 "/home/noamlewis/.ssh/elsa-ctrl-cfbf228b3cff12162e33cbe54c12340af8f78155") at ../../mux.c:2297 #4 0x0000555555561882 in main (ac=<optimized out>, av=<optimized out>) at ../../ssh.c:1526 Reproduces also with older clients (8.4)
Created attachment 3600 [details] ignore SIGPIPE earlier ssh.c:main() already ignores SIGPIPE, just not early enough :(
Patch applied and will be in OpenSSH 9.1 - thanks.
Thanks for the very fast fix!
Closing bugs from OpenSSH 9.1 release cycle