At this moment when timeout happens we get: sending incremental file list some.file Timeout, server not responding. 0:33:43 rsync: writefd_unbuffered failed to write 4 bytes [sender]: Broken pipe (32) rsync: connection unexpectedly closed (99113 bytes received so far) [sender] rsync error: unexplained error (code 255) at io.c(600) [sender=3.0.5] I miss last info about tranfer before it failed. For example: sending incremental file list some.file 222804096 40% 94.66kB/s 0:33:42 Timeout, server not responding. 0:33:43 rsync: writefd_unbuffered failed to write 4 bytes [sender]: Broken pipe (32) rsync: connection unexpectedly closed (99113 bytes received so far) [sender] rsync error: unexplained error (code 255) at io.c(600) [sender=3.0.5] Note the new " 222804096 40% 94.66kB/s 0:33:42" line. Right now there is no information when (in terms of % transmitted) it failed etc.
Ah, that was "rsync -avPc".
Rsync does leave the progress line on the screen, but ssh is printing the "Timeout, server not responding" message that overwrites it. Rsync could simply reprint the most recent progress line, beginning with \r, just before reporting loss of the connection. With no intervening ssh message, this would back up and overwrite the existing progress line with the same text; with an intervening message, the output would look like this: some.file Timeout, server not responding. 0:33:42 222804096 40% 94.66kB/s 0:33:42 Wayne, what do you think?
3.1.0 keeps the cursor at the end of the line, so ssh can't overwrite it. Is there something else to fix here?
(In reply to comment #3) > 3.1.0 keeps the cursor at the end of the line, so ssh can't overwrite it. Is > there something else to fix here? You're right. Looking at the 3.1.0 code without realizing that part had changed from 3.0.5, I wrongly concluded that ssh must have written a \r, which would be pretty perverse but for which my proposed fix would be appropriate. So there's nothing to fix here except perhaps to backport the change you mentioned to the 3.0.x branch.
These bugs seem to be related (having similar error messages: connection unexpectedly closed, broken pipe, timeout). bug7757 with big file, rsync times out out when it should not; the sender is still responsive bug2783 Random high loads during syncs (server side) / client stream errors rsync: connection unexpectedly closed (2761332 bytes received so far) [generator] rsync error: error in rsync protocol data stream (code 12) at io.c(365) bug5478 rsync: writefd_unbuffered failed to write 4092 bytes [sender]: Broken pipe (32) rsync: writefd_unbuffered failed to write 4092 bytes [sender]: Broken pipe (32) io timeout after 30 seconds -- exiting rsync error: timeout in data send/receive (code 30) at io.c(239) [sender=3.0.2] bug5695 improve keep-alive code to handle long-running directory scans ./io.c:void maybe_send_keepalive(void) bug6175 write last transfer status when timeout or other error happens rsync: writefd_unbuffered failed to write 4 bytes [sender]: Broken pipe (32) rsync: connection unexpectedly closed (99113 bytes received so far) [sender] rsync error: unexplained error (code 255) at io.c(600) [sender=3.0.5] bug7195 timeout reached while sending checksums for very large files