[Bug 9894] Rsync can silently zero out chunks in a file

samba-bugs at samba.org samba-bugs at samba.org
Mon May 20 06:41:31 MDT 2013


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

--- Comment #2 from Ankur Mishra <an.m at outlook.com> 2013-05-20 12:41:31 UTC ---
(In reply to comment #1)
> Rsync marks a file with a read error with a checksum that doesn't match the
> file content so that the receiver knows that the file it generated is not
> valid.

Thanks for your response Wayne. Apologies for long comment below, but it would
be really helpful if you could go through it.

My setup is rsyncd on one machine (source of a file), and rsync client on
another machine (destination). 

When this happens (checksum mismatch due to read failure) does receiver
(destination) throw an error? What I see is that receiver is not retuning an
error code. From receiver point of view this looks like a success.

I have tested this with both with and without --checksum with fresh sync (i.e.,
receiver didn't have the file)

This is the experiment I did:

1. Ran rsyncd on one machine
2. Modified the rsyncd map_ptr() to mimic read failures
3. Ran rsync from a different machine
4. I could see rsync returning without any error, and a partially zeroed out
file (of same length)
5. I observed same symptoms as #4 on a flash based embedded system during i/o
stress on server side.

Is there any specific option I should be using while running rsync to catch
checksum errors?

Thanks,
Ankur

-- 
Configure bugmail: https://bugzilla.samba.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.


More information about the rsync mailing list