I was working on a backup script today and doing lots
of runs with the --dry-run option to make sure I
had things the way I wanted them.
One particular filesystem I was backing up always
hung right as it should have been finished. (This
happened every time I did a dry run, it was 100%
reproducible). Several other filesystems I was
backing up had no problems of any kind with the
dry run using the same command with different
source and dest directories (and exclude lists).
Checking all the rsync processes (this was a local
file to local file rsync, so everything was on the
same system), I found all 3 rsync processes sitting
in a select() call, and none of them had any files
open, just a couple of sockets and stdout showed up in
the /proc/pid/fd directories.
I added a --timeout=300 option, and that at least
made it exit after 5 minutes.
Later, when I removed the --dry-run option and
did the real backup, the same filesystem caused
no problems at all. No hang, all the backups
copied OK, no errors of any kind.
I just thought it was weird enough to report,
but I'm unlikely to have any time to do any debugging.
Just wanted to get it on record in case someone else
sees it.
This was on a centos 7.0 system, and I updated
rsync on it just in case that fixed it, but the
problem continued even after the yum update.