rsync icon indicating copy to clipboard operation
rsync copied to clipboard

rsync errors out reproducibly on specific files - caused by --compress

Open cboltz opened this issue 5 years ago • 3 comments

(initially reported as https://bugzilla.opensuse.org/show_bug.cgi?id=1175854 )

While rsync'ing /repositories from stage.opensuse.org to provo-mirror.opensuse.org, I got reproducible errors on specific files:

mirror@pontifex (provo-mirror):~> while true ; do /usr/bin/withlock -q /home/mirror/run/sync_opensuse.sh.lock rsync -v -H --compress -ar0 --stats --timeout=21600 --no-motd --fuzzy  --block-size=33000 --exclude-from=/home/mirror/rsync_exclude_update_provo-mirror.opensuse.org --exclude-from=/home/mirror/rsync_exclude_tumbleweed_provo-mirror.opensuse.org --exclude '/devel:/ARM:'--delete stage.opensuse.org::opensuse-full-really-everything-including-repositories/opensuse/repositories/ /srv/ftp/pub/opensuse/repositories/ ; echo ================================================================================ ; sleep 10 ; done
receiving incremental file list
GNOME:/Medias/images/iso/
GNOME:/Medias/images/iso/GNOME_Next.x86_64-3.36.5-Build13.378.iso
inflate returned -3 (224 bytes)
rsync error: error in rsync protocol data stream (code 12) at token.c(555) [receiver=3.1.3]
rsync: connection unexpectedly closed (9479495 bytes received so far) [generator]
rsync error: error in rsync protocol data stream (code 12) at io.c(235) [generator=3.1.3]
================================================================================
receiving incremental file list
GNOME:/Medias/images/iso/
GNOME:/Medias/images/iso/GNOME_Next.x86_64-3.36.5-Build13.378.iso
inflate returned -3 (224 bytes)
rsync error: error in rsync protocol data stream (code 12) at token.c(555) [receiver=3.1.3]
rsync: connection unexpectedly closed (9467555 bytes received so far) [generator]
rsync error: error in rsync protocol data stream (code 12) at io.c(235) [generator=3.1.3]
================================================================================
receiving incremental file list
GNOME:/Medias/images/iso/
GNOME:/Medias/images/iso/GNOME_Next.x86_64-3.36.5-Build13.378.iso
inflate returned -3 (224 bytes)
rsync error: error in rsync protocol data stream (code 12) at token.c(555) [receiver=3.1.3]
rsync: connection unexpectedly closed (9468879 bytes received so far) [generator]
rsync error: error in rsync protocol data stream (code 12) at io.c(235) [generator=3.1.3]
================================================================================

You might have noticed the --exclude '/devel:/ARM:' - that's the result of an earlier, similar error.

On the server side, rsyncd logs for one of these rsync runs:

2020/08/27 17:34:26 [14088] connect from provo-mirror.opensuse.org (91.193.113.70)
2020/08/27 17:34:26 [14088] rsync on opensuse-full-really-everything-including-repositories/opensuse/repositories/ from provo-mirror.opensuse.org (91.193.113.70)
2020/08/27 17:34:27 [14088] building file list
2020/08/27 17:35:32 [14088] deflate on token returned 0 (550 bytes left)
2020/08/27 17:35:32 [14088] rsync error: error in rsync protocol data stream (code 12) at token.c(427) [sender=3.1.3]

rsync works without problems if I drop the --compress option.

stage.opensuse.org runs openSUSE Leap 15.2, provo-mirror.opensuse.org runs openSUSE Leap 15.1, both with all updates installed.

rsync version is 3.1.3 on both servers (packages 3.1.3 rsync-3.1.3-lp151.4.3.1.x86_64 and rsync-3.1.3-lp152.5.7.x86_64)

cboltz avatar Aug 30 '20 11:08 cboltz

You've discovered the fix for your old version of rsync: don't use --compress. You could alternately try using --skip-compress=xyzzy so that the iso file doesn't trigger an attempt to disable compression on a per-file basis (which may be problematical in your particular zlib version). You could also try upgrading both sides to a newer rsync (3.2.3) and try a newer compression method, such as zstd. If a newer rsync fails, it would be helpful if you could provide me a means of reproducing the failure, such as being able to download a public file that triggers the issue.

WayneD avatar Sep 08 '20 19:09 WayneD

Version 3.1.3 in openSUSE is compiled using --with-included-zlib=no and includes a stripped down version of the commit 7da171, namely rsync Leap 15.2.

@WayneD , could you point to the commits needed to add a working compress functionality in this version.

TIA.

pmgdeb avatar Sep 18 '20 12:09 pmgdeb

You should compile 3.1.3 --with-included-zlib=yes for best functionality. Or try using -zz (--new-compress). Or don't use -z at all. If there's a specific public file that is a reproducible failure, let me know how I can test it.

WayneD avatar Sep 19 '20 01:09 WayneD