On 14-03-14 02:59 PM, Paul Slootman wrote:
> On Fri 14 Mar 2014, Nigel Horne wrote:
>>
>> When using the -z flag of rsync, it dies with
>>
>> inflate returned -3 (0 bytes)
>> rsync error: error in rsync protocol data stream (code 12) at token.c(548) [receiver=3.0.9]
>> rsync: writefd_unbuffered failed to write 4 bytes to socket [generator]: Broken pipe (32)
>> rsync error: error in rsync protocol data stream (code 12) at io.c(1532) [generator=3.0.9]
>>
>> Removing the -z flag fixes it.
>
> Is this always, or only with certain data? If it's always, then it's
> probably related to the architecture / build, as I'm sure I would have
> been deluged by vast amounts of complaints if rsync always failed with
> -z ...
>
> If it's only with certain data, it would be great if you could supply a
> minimal case to reproduce the problem.
I can get the error 100% of the time by copying a 2G VM image that
changes only slightly (hostname/ip). The raw file is a sparse one.
In this example, xeon:/tmp has an older ns0.raw.
simon@laptop:~$ rsync -azSP ns0.raw xeon:/tmp/
sending incremental file list
ns0.raw
160,481,280 7% 51.00MB/s 0:00:38
rsync: [sender] write error: Broken pipe (32)
inflate returned -3 (0 bytes)
rsync error: error in rsync protocol data stream (code 12) at
token.c(548) [receiver=3.0.9]
rsync error: error in rsync protocol data stream (code 12) at io.c(837)
[sender=3.1.0]
Since the failed rsync trashed xeon:/tmp/ns0.raw, I restore the original
(old) file on the destination then re-attempted:
simon@laptop:~$ rsync -azSP ns0.raw xeon:/tmp/
sending incremental file list
ns0.raw
160,612,352 7% 51.06MB/s 0:00:38
rsync: [sender] write error: Broken pipe (32)
inflate returned -3 (0 bytes)
rsync error: error in rsync protocol data stream (code 12) at
token.c(548) [receiver=3.0.9]
rsync error: error in rsync protocol data stream (code 12) at io.c(837)
[sender=3.1.0]
Same failure but slightly later in the file. Leaving out the "-z" works
around the issue so does removing the destination's old copy.
Regards,
Simon