[Bug 15163] rsync timeout non-effective

just subscribed for rsync-qa from bugzilla via rsync <[email protected]>
Newsgroups gmane.network.rsync.general
Message-ID <[email protected]/>
https://bugzilla.samba.org/show_bug.cgi?id=15163

--- Comment #1 from roland <[email protected]> ---
here is some strace from the backup host to show the difference

if i set timeout=60 , rsyncing "[email protected]:/" hangs forever:


08:25:30 select(4, [3], [], [3], {tv_sec=30, tv_usec=0}) = 1 (in [3], left
{tv_sec=0, tv_usec=316390})
08:26:00 read(3, "\0\0\0\7", 32768)     = 4
08:26:00 select(5, [3], [4], [3], {tv_sec=30, tv_usec=0}) = 1 (out [4], left
{tv_sec=29, tv_usec=999994})
08:26:00 write(4, "\0\0\0\7", 4)        = 4
 | 00000  00 00 00 07                                       ....             |
08:26:00 select(4, [3], [], [3], {tv_sec=30, tv_usec=0}) = 0 (Timeout)
08:26:30 select(5, [3], [4], [3], {tv_sec=30, tv_usec=0}) = 1 (out [4], left
{tv_sec=29, tv_usec=999995})
08:26:30 write(4, "\0\0\0\7", 4)        = 4
 | 00000  00 00 00 07                                       ....             |
08:26:30 select(4, [3], [], [3], {tv_sec=30, tv_usec=0}) = 0 (Timeout)
08:27:00 select(5, [3], [4], [3], {tv_sec=30, tv_usec=0}) = 1 (out [4], left
{tv_sec=29, tv_usec=999994})
08:27:00 write(4, "\0\0\0\7", 4)        = 4
 | 00000  00 00 00 07                                       ....             |
08:27:00 select(4, [3], [], [3], {tv_sec=30, tv_usec=0}) = 0 (Timeout)
08:27:30 select(5, [3], [4], [3], {tv_sec=30, tv_usec=0}) = 1 (out [4], left
{tv_sec=29, tv_usec=999994})
08:27:30 write(4, "\0\0\0\7", 4)        = 4
 | 00000  00 00 00 07                                       ....             |
08:27:30 select(4, [3], [], [3], {tv_sec=30, tv_usec=0}) = 0 (Timeout)
08:28:00 select(5, [3], [4], [3], {tv_sec=30, tv_usec=0}) = 1 (out [4], left
{tv_sec=29, tv_usec=999994})
08:28:00 write(4, "\0\0\0\7", 4)        = 4
 | 00000  00 00 00 07                                       ....             |
08:28:00 select(4, [3], [], [3], {tv_sec=30, tv_usec=0}) = 0 (Timeout)
08:28:30 select(5, [3], [4], [3], {tv_sec=30, tv_usec=0}) = 1 (out [4], left
{tv_sec=29, tv_usec=999994})
08:28:30 write(4, "\0\0\0\7", 4)        = 4
 | 00000  00 00 00 07                                       ....             |
08:28:30 select(4, [3], [], [3], {tv_sec=30, tv_usec=0}
<repeats forever>

mind that tv_sec=30 is half of the timeout. if i set timeout=10 , tv_sec is 5. 



rsyncing only /iscsipool also hangs, but times out .   for my curiosity setting
60s timeout leads to 90s timeout, but not 60s. apparently, half of the timeout
is being added to the real timeout.


# time /root/rsync/rsync-3.2.5/rsync -avi --timeout=10 --exclude='/proc'
--exclude='/dev/' --exclude='/sys'  [email protected]:/iscsipool
/zfspool/backup/172.20.37.189/backup
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]

real    0m15.356s  <- !!!
user    0m0.001s
sys     0m0.005s

# time /root/rsync/rsync-3.2.5/rsync -avi --timeout=60 --exclude='/proc'
--exclude='/dev/' --exclude='/sys'  [email protected]:/iscsipool
/zfspool/backup/172.20.37.189/backup
receiving incremental file list
[Receiver] io timeout after 60 seconds -- exiting
rsync error: timeout in data send/receive (code 30) at io.c(197)
[Receiver=3.2.5]

real    1m30.440s  <-!!!
user    0m0.002s
sys     0m0.003s


 | 00000  72 65 63 65 69 76 69 6e  67 20 69 6e 63 72 65 6d  receiving increm |
 | 00010  65 6e 74 61 6c 20 66 69  6c 65 20 6c 69 73 74 0a  ental file list. |
08:35:49 mmap(NULL, 266240, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS,
-1, 0) = 0x7f74e5536000
08:35:49 mmap(NULL, 266240, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS,
-1, 0) = 0x7f74e54f5000
08:35:49 select(6, [5], [4], [5], {tv_sec=30, tv_usec=0}) = 1 (out [4], left
{tv_sec=29, tv_usec=999995})
08:35:49 write(4, "$\0\0\7\7\0\0\0- /proc\7\0\0\0- /dev/\6\0\0\0- "..., 40) =
40
 | 00000  24 00 00 07 07 00 00 00  2d 20 2f 70 72 6f 63 07  $.......- /proc. |
 | 00010  00 00 00 2d 20 2f 64 65  76 2f 06 00 00 00 2d 20  ...- /dev/....-  |
 | 00020  2f 73 79 73 00 00 00 00                           /sys....         |
08:35:49 select(6, [5], [], [5], {tv_sec=30, tv_usec=0}) = 0 (Timeout)
08:36:19 select(6, [5], [], [5], {tv_sec=30, tv_usec=0}) = 0 (Timeout)
08:36:49 select(6, [5], [], [5], {tv_sec=30, tv_usec=0}) = 0 (Timeout)
08:37:19 write(2, "[Receiver] io timeout after 60 s"..., 50[Receiver] io
timeout after 60 seconds -- exiting
) = 50
 | 00000  5b 52 65 63 65 69 76 65  72 5d 20 69 6f 20 74 69  [Receiver] io ti |
 | 00010  6d 65 6f 75 74 20 61 66  74 65 72 20 36 30 20 73  meout after 60 s |
 | 00020  65 63 6f 6e 64 73 20 2d  2d 20 65 78 69 74 69 6e  econds -- exitin |
 | 00030  67 0a                                             g.               |
08:37:19 rt_sigaction(SIGUSR1, {sa_handler=SIG_IGN, sa_mask=[],
sa_flags=SA_RESTORER, sa_restorer=0x7f74e4965400}, NULL, 8) = 0
08:37:19 rt_sigaction(SIGUSR2, {sa_handler=SIG_IGN, sa_mask=[],
sa_flags=SA_RESTORER, sa_restorer=0x7f74e4965400}, NULL, 8) = 0
08:37:19 wait4(27237, 0x7ffda918da9c, WNOHANG, NULL) = 0
08:37:19 getpid()                       = 27217
08:37:19 kill(27237, SIGUSR1)           = 0
08:37:19 write(2, "rsync error: timeout in data sen"..., 82rsync error: timeout
in data send/receive (code 30) at io.c(197) [Receiver=3.2.5]
) = 82
 | 00000  72 73 79 6e 63 20 65 72  72 6f 72 3a 20 74 69 6d  rsync error: tim |
 | 00010  65 6f 75 74 20 69 6e 20  64 61 74 61 20 73 65 6e  eout in data sen |
 | 00020  64 2f 72 65 63 65 69 76  65 20 28 63 6f 64 65 20  d/receive (code  |
 | 00030  33 30 29 20 61 74 20 69  6f 2e 63 28 31 39 37 29  30) at io.c(197) |
 | 00040  20 5b 52 65 63 65 69 76  65 72 3d 33 2e 32 2e 35   [Receiver=3.2.5 |
 | 00050  5d 0a                                             ].               |
08:37:19 exit_group(30)                 = ?
08:37:19 +++ exited with 30 +++

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
-- 
Please use reply-all for most replies to avoid omitting the mailing list.
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.