BUG?: rsync timeout non-effective
Roland
devzero at web.de
Sun Sep 4 09:39:04 UTC 2022
apparently, it must be a bug
if i do
/root/rsync/rsync-3.2.5/rsync -avi --timeout=10 --exclude='/proc'
--exclude='/dev/' root at 172.20.37.189:/ /zfspool/backup/172.20.37.189/
it hangs forever , as soon as rsync tries to traverse the
suspended/hanging /iscsipool on the remote machine
if i do
/root/rsync/rsync-3.2.5/rsync -avi --timeout=10 --exclude='/proc'
--exclude='/dev/' root at 172.20.37.189:/iscsipool
/zfspool/backup/172.20.37.189/
i.e. if i try to rsync the "hung/stalled" directory directly, i'm
getting proper timeout behaviour:
receiving incremental file list
[Receiver] io timeout after 10 seconds -- exiting
rsync error: timeout in data send/receive (code 30) at io.c(197)
[Receiver=3.2.5]
<proper exit and return to shell>
so, apparently there seem to be circumstances where the timeout
detection is not effective
if i run rsync locally on the machine containing the hung/stalled dir,
it behaves like this:
# rsync -av --timeout=1 --dry-run /iscsipool /tmp
sending incremental file list
[Receiver] io timeout after 1 seconds -- exiting
rsync error: timeout in data send/receive (code 30) at io.c(197)
[Receiver=3.2.3]
<here it hangs forever, never returns to shell , cannot even ^C or ^Z>
regards
roland
root at debian:~# zpool status
pool: iscsipool
state: SUSPENDED
status: One or more devices are faulted in response to IO failures.
action: Make sure the affected devices are connected, then run 'zpool
clear'.
see: https://openzfs.github.io/openzfs-docs/msg/ZFS-8000-HC
config:
NAME STATE READ WRITE CKSUM
iscsipool UNAVAIL 0 0 0 insufficient
replicas
wwn-0x3333333333333333 UNAVAIL 4 1 0
errors: No known data errors
Am 01.09.22 um 17:45 schrieb Roland:
> there is connection timeout and I/O timeout
>
> i'm using the I/O timeout.
>
> for "--timeout" manpage is "if no data is transferred....then rsync
> will exit"
>
> no data is being transferred for hours, but it doesn't exit.
>
> so, what's the problem here ?
>
>
>
> --timeout=SECONDS
> 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.
>
> --contimeout=SECONDS
> This option allows you to set the amount of time that
> rsync will wait for its connection to an rsync daemon to succeed. If
> the timeout is reached, rsync exits with an error.
>
>
>
>
> Am 01.09.22 um 17:32 schrieb Kevin Korb via rsync:
>> You are using rsync over ssh. The connection timeout (and port)
>> options don't matter if rsync isn't doing the networking.
>>
>> On 9/1/22 08:49, Roland via rsync wrote:
>>> hello,
>>>
>>> i do some backup via rsync/ssh and pull data from remote machine to
>>> local machine.
>>>
>>> whenever on remote machine there is some network attached subdir
>>> getting
>>> "stuck" (i.e. read/write is blocking, eg. by suspended zfs pool because
>>> of error), rsync backup also hangs forever.
>>>
>>> i wonder what's the purpose of "--timeout" then.
>>>
>>> local machine: 3.1.2
>>> remote machine: 3.2.3
>>>
>>> command
>>> 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
>>> --exclude-from=/zfspool/backup/myhost/rsync.exclude root at myhost:/
>>> /zfspool/backup/myhost/backup
>>>
>>>
>>>
>>> what can i do to make this more robust ?
>>>
>>> rsync should not hang, as it's getting started via script and the hang
>>> blocks backup of other hosts.
>>>
>>>
>>> roland
>>>
>>>
>>>
>>
More information about the rsync
mailing list