Subject: | File tranfer stalled because of incompletely read io_error flag |
Date: | Tue, 9 Dec 2014 21:36:32 +0100 |
To: | "bug-File-RsyncP [...] rt.cpan.org" <bug-File-RsyncP [...] rt.cpan.org> |
From: | "Wilck, Martin" <martin.wilck [...] ts.fujitsu.com> |
Hello Craig,
Under certain rare conditions, file transfers via File::RsyncP may get
stalled. A typical symptom is that both sides of the transfer sit
waiting in select().
I had a reproduction environment for this problem here on my BackupPC
server and traced it down to the attached patch. In my cause, the amount
of data remaining in in $rs->{chunkData} after decoding the file list
was 2 bytes. The code that skips the io_error flag doesn't check that 4
bytes are available.
The patch fixes this. That fixes also the stalled transfer phenomenon.
This explains also why the stall is seldom observed - it occurs only if
the io_error flag happens to be on the boundary of two (4k?) data
transmission blocks.
Similar stalls have been reported by various people; I have reason to
believe that this patch might fix their problems, too.
Regards
Martin
Message body is not shown because sender requested not to inline it.