Control: tags -1 + confirmed Hello,
I can confirm the described behaviour thanks to the nicely explained way to reproduce the problem. (More below/inline...) On Fri, Dec 07, 2018 at 10:17:42AM +0100, martin f krafft wrote: > Package: irqbalance > Version: 1.5.0-0.1 > Severity: critical > > Thanks to waldi for his help in diagnosing this. > > With irqbalance installed, it is no longer possible to connect to > remote systems using SSH when SSH_AUTH_SOCK is unset. > > % SSH_AUTH_SOCK= ssh -S none -v cymbaline true > […] > debug1: rekey after 134217728 blocks > > and then the client just stays there, indefinitely. > > strace reveals: > > socket(AF_UNIX, SOCK_STREAM, 0) = 4 > fcntl(4, F_SETFD, FD_CLOEXEC) = 0 > connect(4, {sa_family=AF_UNIX, > sun_path=@"\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"}, > 110) = 0 > write(4, "\0\0\0\1", 4) = 4 > write(4, "\v", 1) = 1 > read(4, I just have to say that ssh program assuming it can do a blocking read without timeout on a "random" (or any) socket is pretty stupid. If possible, this should likely also be fixed on the ssh side IMHO. > > and lsof identifies this socket as > > ssh 28605 madduck 4u unix 0x0000000094bc2389 0t0 287876 > type=STREAM > > So diving into this, we stumbled over: > > netstat -nap: > unix 2 [ ACC ] STREAM LISTENING 23121 > @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ > > and then looked at sss -xenp output: > > u_str ESTAB 0 0 > > @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ > 29 3502 * 289678 > users:(("irqbalance",pid=1455,fd=22)) <-> > u_str ESTAB 1 0 > > @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ > 29 2010 * 0 > users:(("irqbalance",pid=1455,fd=19)) --- > u_str ESTAB 0 0 > > @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ > 27 9132 * 0 > users:(("irqbalance",pid=1455,fd=12)) --- > > and sure enough, purging irqbalance makes SSH work again. See https://sources.debian.org/src/irqbalance/1.5.0-0.1/irqbalance.c/#L480 This made me think that likely the service was running with too tightly controlled security settings which makes it use the fallback instead of the primary method. It seems to not be able to create a socket in /var/run (which should be a symlink to /run) so I tried the following changes and after a restart indeed the problem is gone: --- /lib/systemd/system/irqbalance.service 2018-11-01 13:18:31.000000000 +0100 +++ /etc/systemd/system/irqbalance.service 2019-01-12 15:12:29.219286997 +0100 @@ -12,7 +12,7 @@ ReadOnlyPaths=/ ReadWritePaths=/proc/irq RestrictAddressFamilies=AF_UNIX -TemporaryFileSystem=/run:ro +TemporaryFileSystem=/run # If IRQBALANCE_ONESHOT environment is set, the service will exit so: Restart=no Regards, Andreas Henriksson