rsync -aAH --numeric-ids --no-inc-recursive --delete /local/.. rhost:/... hangs forever when the disk on the remote becomes full. When used with -vi, the output just stops. On the remote, the rsync process exits but ssh does not; netstat shows connected on both sides for ssh and on local for rsync. The local rsync is stuck in select(), the remote rsync has exited. Redirecting the local rsync's stdin/out/err to /dev/null does not improve things. openSUSE 12.3, openssh 6.1p1, rsync 3.0.9, kernel 3.7.10 Is there any workaround to make the local rsync quit with an error?
If rsync exits and your ssh is still around, that's a bug in your ssh and you should be checking with that project about why they are not exiting properly. One possible issue may be that you told ssh to do some port-forwarding (check your default ssh config) and someone opened a forwarded connection using rsync's ssh (in which case the ssh would stay open until all connections had closed).
Thanks Wayne, that makes perfect sense, but all rsync-related processes came up to be non-existent so far and "that project I should be checking with" appears to be rsync. I was able to narrow it down a little. It is necessary to have a large number of files (600k) and/or a large volume to transfer, like created by rsnapshot. The hang occurs for me with --link-dest but I did not check whether this is a necessary condition. The destination becomes full during transfer - naturally one will want an error, not a hang. Shell configuration, locale, and user/root on local and remote host are not relevant. The problem disappears with some rudimentory testing when using rsync 3.1.0. Perhaps it has to do with the "Improved the propagation of abnormal-exit error messages" item on the list of fixed bugs in 3.1.0? Or is it something else that's only temporarily hidden?
What is this rhost:/... syntax? Are you actually trying to make a directory named "..."? If not then I think you have a typo.
I gave the relevant parts of the command only, the full version spans 3 lines but the --exclude options and actual paths are hardly relevant. Read that as rhost:/whateverdir/ if you prefer. The destination directory does not exist, which is kind of required when using --link-dest. If it really matters, the command is rsync -aAH --numeric-ids --no-inc-recursive --delete --delete-during /snapshots/daily.0/ rhost:/newdir -vi with some added --exclude options, some using shell globs. The hang occurs with and without --link-dest added in.
Could this be a duplicate of bug #1442? There are a lot of bugreports related to rsync hanging mysteriously, some of which may be duplicates of each other: https://bugzilla.samba.org/show_bug.cgi?id=1442 https://bugzilla.samba.org/show_bug.cgi?id=2957 https://bugzilla.samba.org/show_bug.cgi?id=9164 https://bugzilla.samba.org/show_bug.cgi?id=10035 https://bugzilla.samba.org/show_bug.cgi?id=10092 https://bugzilla.samba.org/show_bug.cgi?id=10518 https://bugzilla.samba.org/show_bug.cgi?id=10950 https://bugzilla.samba.org/show_bug.cgi?id=11166 https://bugzilla.samba.org/show_bug.cgi?id=12732 https://bugzilla.samba.org/show_bug.cgi?id=13109
The upcoming release has some improvements to get disk-full errors to the user more quickly.