<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><meta content="text/html;charset=UTF-8" http-equiv="Content-Type"></head><body ><div style='font-size:10pt;font-family:Verdana,Arial,Helvetica,sans-serif;'><div>Problem was introduced with this commit:<br></div><div><br></div><div>commit f3873b3d88b61167b106e7b9227a20147f8f6197<br></div><div>Author: Wayne Davison <<a target="_blank" href="mailto:wayned@samba.org">wayned@samba.org</a>><br></div><div>Date:   Mon Oct 10 11:49:50 2016 -0700<br></div><div><br></div><div>    Support --sparse combined with --preallocate or --inplace.<br></div><div>   <br></div><div>    The new code tries to punch holes in the destination file using newer<br></div><div>    Linux fallocate features. It also supports a --whole-file + --sparse +<br></div><div>    --inplace copy on any filesystem by truncating the destination file.<br></div><div><br></div><div>.Dave.<br></div><div><br></div><div><p style=""><span class="colour" style="color:rgb(42, 42, 42)">Sent using <a href="https://www.zoho.com/mail/" style="color:#598fde;">Zoho Mail</a></span><br></p></div><div><br></div><div class="zmail_extra"><div id="Zm-_Id_-Sgn1"><div><br></div><div>---- On Sun, 04 Mar 2018 23:17:23 +0100 <b>Dave Gordon via rsync <rsync@lists.samba.org></b> wrote ----<br></div></div><div><br></div><blockquote style="border-left: 1px solid #cccccc; padding-left: 6px; margin:0 0 0 5px"><div><div style="font-size: 10pt; font-family: Verdana, Arial, Helvetica, sans-serif"><div>Quite strange at first sight that the failure should depend on the files containing NULs!<br></div><div>But I've reproduced it on both Ubuntu and OpenSUSE with d73762e "Preparing for release of 3.1.3".<br></div><div>The  problem remains even if you drop the --checksum or --delay-updates  options from the command line, but goes away if you don't use both  "--sparse" and "--preallocate" together.<br></div><div>So it looks like a bad interaction of these options, probably with the sparse handling being affected by the NULs in the files.<br></div><div><br></div><div>HTH,<br></div><div>.Dave.<br></div><div><br></div><div><p style=""><span class="colour" style="color:rgb(42, 42, 42)">Sent using <a style="color: rgb(89, 143, 222)" href="https://www.zoho.com/mail/">Zoho Mail</a></span><br></p></div><div><br></div><div class="zmail_extra"><div><div><br></div><div>---- On Sun, 04 Mar 2018 14:57:24 +0100 <b>xftroxgpx via rsync <<a href="mailto:rsync@lists.samba.org">rsync@lists.samba.org</a>></b> wrote ----<br></div></div><div><br></div><div><br></div></div><div><br></div></div><div><br></div><div>-- <br></div><div>Please use reply-all for most replies to avoid omitting the mailing list. <br></div><div>To unsubscribe or change options: <a href="https://lists.samba.org/mailman/listinfo/rsync">https://lists.samba.org/mailman/listinfo/rsync</a> <br></div><div>Before posting, read: <a href="http://www.catb.org/~esr/faqs/smart-questions.html">http://www.catb.org/~esr/faqs/smart-questions.html</a><br></div></div><blockquote style="border-left: 1px solid rgb(204, 204, 204); padding-left: 6px; margin: 0 0 0 5px"><div><div>script to reproduce: <br></div><div><br></div><div>#!/bin/bash <br></div><div><br></div><div>#tested to fail as below: ArchLinux's rsync-3.1.3-1-x86_64.pkg.tar.xz <br></div><div>#tested to fail as below: ArchLinux's rsync-3.1.3pre1-1-x86_64.pkg.tar.xz <br></div><div>#tested to work ok      : ArchLinux's rsync-3.1.2-8-x86_64.pkg.tar.xz <br></div><div><br></div><div>if test "$1" == "clean"; then <br></div><div>rm -vrf destdir sourcedir sourcedir2 sourcedir3 <br></div><div>exit 0 <br></div><div>fi <br></div><div><br></div><div>echo '!! test 1:' <br></div><div><br></div><div>mkdir -p destdir <br></div><div>mkdir -p sourcedir/a <br></div><div>#one \0 followed by a non-\0 (so, using a space) required: <br></div><div>echo -ne '\0 ' > sourcedir/a/b <br></div><div>#non zero size file required: <br></div><div>echo -ne 'c' > sourcedir/c <br></div><div>echo 'sourcedir' >/tmp/filesfrom.lst.tmp <br></div><div>rsync --recursive --perms --checksum --delay-updates --numeric-ids --preallocate --sparse --files-from=/tmp/filesfrom.lst.tmp -- ./ ./destdir/ <br></div><div>#rsync: write failed on "/home/xftroxgpx/sandbox/rsync/nsfod_issues/try2/destdir/sourcedir/a/b": No such file or directory (2) <br></div><div>#rsync error: error in file IO (code 11) at receiver.c(374) [receiver=3.1.3] <br></div><div><br></div><div># ^ this happens first and any subsequent times! <br></div><div><br></div><div>echo '!! test 2:' <br></div><div><br></div><div>mkdir -p sourcedir2/a <br></div><div>#one \0 followed by a non-\0 (so, using an M) required: <br></div><div>echo -ne '\0M' > sourcedir2/a/b <br></div><div>#one \0 followed by a non-\0 (so, using an M) required: <br></div><div>echo -ne '\0M' > sourcedir2/c <br></div><div><br></div><div>#in order to see this error: (for file 'c') <br></div><div><br></div><div>#non-zero file size required and it must be prefixed by '.' aka dot <br></div><div>#echo -ne '1' > sourcedir2/.d <br></div><div>#XXX: ^ (un)comment, don't forget to ./go clean afterwards, then ./go <br></div><div><br></div><div>#otherwise, the error is for file "a/b" <br></div><div><br></div><div>echo 'sourcedir2' >/tmp/filesfrom.lst.tmp <br></div><div>rsync --recursive --perms --checksum --delay-updates --numeric-ids --preallocate --sparse --files-from=/tmp/filesfrom.lst.tmp -- ./ ./destdir/ <br></div><div>#rsync: write failed on "/home/xftroxgpx/sandbox/rsync/nsfod_issues/try2/destdir/sourcedir2/a/b": No such file or directory (2) <br></div><div>#rsync error: error in file IO (code 11) at receiver.c(374) [receiver=3.1.3pre1] <br></div><div><br></div><div>echo '!! test 3:' #same as 2 but an extra file '.d' exists! <br></div><div><br></div><div>mkdir -p sourcedir3/a <br></div><div>#one \0 followed by a non-\0 (so, using an M) required: <br></div><div>echo -ne '\0M' > sourcedir3/a/b <br></div><div>#one \0 followed by a non-\0 (so, using an M) required: <br></div><div>echo -ne '\0M' > sourcedir3/c <br></div><div><br></div><div>#non-zero file size required and it must be prefixed by '.' aka dot <br></div><div>echo -ne '1' > sourcedir3/.d <br></div><div>echo 'sourcedir3' >/tmp/filesfrom.lst.tmp <br></div><div>rsync --recursive --perms --checksum --delay-updates --numeric-ids --preallocate --sparse --files-from=/tmp/filesfrom.lst.tmp -- ./ ./destdir/ <br></div><div>#rsync: write failed on "/home/xftroxgpx/sandbox/rsync/nsfod_issues/try2/destdir/sourcedir2/c": No such file or directory (2) <br></div><div>#rsync error: error in file IO (code 11) at receiver.c(374) [receiver=3.1.3] <br></div><div><br></div><div>A pristine copy of this script can be found here: <a href="https://github.com/xftroxgpx/a3/blob/37ebff3e0fe9d294aeec899a082dc2c51c486eb4/system/Z575/OSes/3archlinux/on_baremetal/filesystem_now/archlinux/home/xftroxgpx/sandbox/rsync/nsfod_issues/try2/go">https://github.com/xftroxgpx/a3/blob/37ebff3e0fe9d294aeec899a082dc2c51c486eb4/system/Z575/OSes/3archlinux/on_baremetal/filesystem_now/archlinux/home/xftroxgpx/sandbox/rsync/nsfod_issues/try2/go</a> <br></div><div><br></div><div>Just run ./go to start all 3 tests. <br></div><div><br></div><div>All 3 tests should fail with: <br></div><div>ArchLinux's rsync-3.1.3-1-x86_64.pkg.tar.xz <br></div><div>ArchLinux's rsync-3.1.3pre1-1-x86_64.pkg.tar.xz <br></div><div><br></div><div>All 3 tests will succeed with ArchLinux's rsync-3.1.2-8-x86_64.pkg.tar.xz <br></div><div>(aka rsync  version 3.1.2  protocol version 31) <br></div><div><br></div><div><br></div><div>Cheers! <br></div><div><br></div><div>​Sent with ProtonMail Secure Email.​ <br></div><div><br></div><div><br></div><div><br></div><div>-- <br></div><div>Please use reply-all for most replies to avoid omitting the mailing list. <br></div><div>To unsubscribe or change options: <a href="https://lists.samba.org/mailman/listinfo/rsync">https://lists.samba.org/mailman/listinfo/rsync</a> <br></div><div>Before posting, read: <a href="http://www.catb.org/~esr/faqs/smart-questions.html">http://www.catb.org/~esr/faqs/smart-questions.html</a> <br></div></div></blockquote></blockquote></div><div><br></div></div><br></body></html>