rsync icon indicating copy to clipboard operation
rsync copied to clipboard

timeout option does not work as expected when remote system is hung

Open devZer0 opened this issue 3 years ago • 1 comments

hello,

I'm using rsync 3.1.2 on centos7 for backing up a large number of hosts to a local zfs with rotating snasphots. i did wrap it with some scripting.

i have had occurences where rsync did hang forever , blocking the whole backup chain.

command is:

rsync -avi --stats --delete --delete-excluded --inplace --numeric-ids --out-format=%-15i %-15b %-15l %-20M %n%L --timeout=900 --rsync-path=export PATH=/usr/local/bin:$PATH;rsync --exclude-from=/backup/rsync.exclude.all root@host1:/ /zfspool/backup/host1/backup

(where "host1" is just an example)

for example, i have a server with zfs which seems to have some io problems and where zfs hangs from time to time, which results in all read io hanging and which also makes some cluster service hang, which hase a fuse mount at /etc/pve

when hung ,read() on /etc/pve gets stuck and never returns, which makes rsync hang on that machine.

apparently, rsync on the backup server does not seem to recognize that the remote rsync is hung/stuck and so, timeout option does not seem to work reliable.

from the manpage: --timeout=TIMEOUT This option allows you to set a maximum I/O timeout in seconds. If no data is transferred for the specified time then rsync will exit. The default is 0, which means no timeout.

apparently, this is untrue, as for sure no data is transferred for a while when remote system got stuck

devZer0 avatar Feb 01 '22 10:02 devZer0

ouch, i did forget that rsync bugs now should be reported here in github. sorry.

adding the appropriate report here for reference:

https://bugzilla.samba.org/show_bug.cgi?id=15163

devZer0 avatar Sep 13 '22 11:09 devZer0