rsync using ssh get stuck

Wayne Davison wayned at samba.org
Thu Feb 2 10:01:56 GMT 2006


On Tue, Jan 31, 2006 at 09:51:26AM +0200, Mark, Oren wrote:
> Usually it happens in the ssh stage while the ssh issues a "select"
> syscall on fd #4 while it is long gone.

Your strace output shows that ssh is selecting on fd #3, not #4 (the 4
in the select() call is the maximum bit position, which must be at least
the maximum fd + 1; the [3] indicates that it is waiting to write data
to fd #3).  It is interesting to notice that it is not waiting to read
any data -- not even data from rsync.

The rsync process is also in a wait-to-write state, trying to write
something out to fd #4.  I assume that this the fd for the socketpair
to ssh, so it is disturbing that ssh isn't listening.  I assume that
the fd is still open.

Your ps output shows that your rsync command is doing a push of files
from the local machine to the remote.  So that means that this isn't the
just-recently-fixed generator-hang scenario (since that only affects a
receiving server).  The local rsync is the sender, which alternates
between reading a lot of data and writing a lot of data.  When it is in
write mode it doesn't bother to try to read any incoming data from ssh.
It assumes that it will get an error trying to write data to ssh if ssh
notices that the socket has closed down.  If ssh isn't cooperating with
this assumption, then this would be a big problem for rsync.  I haven't
seen that happen before, though.

What version of ssh are you using?  And what version of rsync?  What OS?

..wayne..


More information about the rsync mailing list