RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 2123815 - rsync error: protocol incompatibility when using rsync-3.1.2-11.el7_9 [rhel-7.9.z]
Summary: rsync error: protocol incompatibility when using rsync-3.1.2-11.el7_9 [rhel-7...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: rsync
Version: 7.9
Hardware: ppc64le
OS: Unspecified
urgent
urgent
Target Milestone: rc
: ---
Assignee: Michal Ruprich
QA Contact: Ondrej Mejzlik
URL:
Whiteboard:
Depends On:
Blocks: 2139349
TreeView+ depends on / blocked
 
Reported: 2022-09-02 16:58 UTC by Lance Albertson
Modified: 2023-01-02 11:01 UTC (History)
19 users (show)

Fixed In Version: rsync-3.1.2-12.el7_9
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 2139349 (view as bug list)
Environment:
Last Closed: 2022-12-13 11:19:08 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHELPLAN-133162 0 None None None 2022-10-01 08:35:14 UTC
Red Hat Product Errata RHBA-2022:8947 0 None None None 2022-12-13 11:19:14 UTC

Description Lance Albertson 2022-09-02 16:58:29 UTC
Description of problem:

Upon updating to rsync-3.1.2-11.el7_9, we noticed the following errors when
trying to sync Debian based repositories using archvsync [1]:

ERROR: rejecting excluded file-list name: project
rsync error: protocol incompatibility (code 2) at flist.c(907) [Receiver=3.1.2]
rsync error: protocol incompatibility (code 2) at io.c(1651) [sender=3.1.2]

This is the full command is was using when the error happened:

Sep 02 16:22:34 ftp-osl ftpsync-ubuntu[2828463]: Running stage2: rsync --quiet --log-file /var/log/mirror//rsync-ftpsync-ubuntu.log --filter=exclude_/Archive-Update-in-Progress-ftp-osl.osuosl.org --filter=protect_/Archive-Update-in-Progress-ftp-osl.osuosl.org --filter=exclude_/Archive-Update-Required-ftp-osl.osuosl.org --filter=protect_/Archive-Update-Required-ftp-osl.osuosl.org --filter=exclude_/project/trace/ftp-osl.osuosl.org --filter=protect_/project/trace/ftp-osl.osuosl.org --filter=exclude_/project/trace/ftp-osl.osuosl.org-stage1 --filter=protect_/project/trace/ftp-osl.osuosl.org-stage1 --filter=exclude_/project/trace/_hierarchy --filter=protect_/project/trace/_hierarchy --filter=exclude_/project/trace/_traces --filter=protect_/project/trace/_traces --filter=include_/project/ --filter=protect_/project/ --filter=include_/project/trace/ --filter=protect_/project/trace/ --filter=include_/project/trace/* --bwlimit=0 -prltvHSB8192 --safe-links --chmod=D755,F644 --timeout 120 --stats --no-human-readable --no-inc-recursive --exclude=.~tmp~/ archive.ubuntu.com::ubuntu /data/ftp/.2/ubuntu/ --max-delete=40000 --delay-updates --delete --delete-delay --delete-excluded
Sep 02 16:22:42 ftp-osl ftpsync-ubuntu[2828463]: Back from rsync with returncode 2
Sep 02 16:22:42 ftp-osl ftpsync-ubuntu[2828463]: ERROR: Sync step 2 went wrong, got errorcode 2. Logfile: /var/log/mirror//ftpsync-ubuntu.log

Reverting to rsync-3.1.2-10.el7 makes this issue go away. I suspect that the
patch for the CVE might have been incorrectly rebased.

This is a catch-22 as this is preventing us from updating any of our
Debian/Ubuntu upstream repositories unless we use the older rsync.

[1] https://salsa.debian.org/mirror-team/archvsync

Comment 3 Lance Albertson 2022-09-02 17:12:03 UTC
A similar error was reported by Debian as well

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1018296

Comment 4 Paul van Maaren 2022-09-04 07:13:17 UTC
I have the same after I updated rsync to 3.2.5 on a Fedora 35 box:

ERROR: rejecting unrequested file-list name: var/spool/mail/filename
rsync error: protocol incompatibility (code 2) at flist.c(998) [Receiver=3.2.5]

Looks like this to me: https://github.com/WayneD/rsync/issues/356

Last comment:

I'm planning to release 3.2.6 in the next few days.

But I don't think that has happened yet:


https://rsync.samba.org/ shows 3.2.5

Comment 5 Michal Ruprich 2022-09-08 08:40:18 UTC
Hi,

thanks for the report and sorry that the fix for the CVE caused this. The fix was not straightforward, it contained around 20 commits from Upstream and seems like even after the fix, more commits are coming. Can you please try the new version of rsync with '--old-args' option? This could at least be a workaround for these cases. I am going to create a test package with a couple of more fixes from the Upstream and post it here for the customer to test.

Regards,
Michal

Comment 6 Paul van Maaren 2022-09-08 09:55:11 UTC
Hi, 

Adding '--old-args' fixes it for me on Fedora 35.

$ rsync -V
rsync  version 3.2.5  protocol version 31

Regards,

Paul

Comment 7 Michal Ruprich 2022-09-08 09:57:38 UTC
Thanks Paul,

as soon as Wayne releases version 3.2.6 I am going to update rsync in Fedora. Until then, use the old-args please.

Regards,
Michal

Comment 8 Lance Albertson 2022-09-08 22:16:39 UTC
Unfortunately the --old-args seems incompatible with the options used with archvsync as I ran into this error when trying:

rsync: --delete does not work without --recursive (-r) or --dirs (-d).
rsync error: syntax or usage error (code 1) at main.c(1575) [client=3.1.2]

Here is the full command that was used FWIW:

rsync --quiet --log-file /var/log/mirror//rsync-ftpsync-debian.log --filter=exclude_/Archive-Update-in-Progress-ftp-osl.osuosl.org --filter=protect_/Archive-Update-in-Progress-ftp-osl.osuosl.org --filter=exclude_/Archive-Update-Required-ftp-osl.osuosl.org --filter=protect_/Archive-Update-Required-ftp-osl.osuosl.org --filter=exclude_/project/trace/ftp-osl.osuosl.org --filter=protect_/project/trace/ftp-osl.osuosl.org --filter=exclude_/project/trace/ftp-osl.osuosl.org-stage1 --filter=protect_/project/trace/ftp-osl.osuosl.org-stage1 --filter=exclude_/project/trace/_hierarchy --filter=protect_/project/trace/_hierarchy --filter=exclude_/project/trace/_traces --filter=protect_/project/trace/_traces --filter=include_/project/ --filter=protect_/project/ --filter=include_/project/trace/ --filter=protect_/project/trace/ --filter=include_/project/trace/* --bwlimit=0 --old-args --exclude=.~tmp~/ ftp-osl.osuosl.org.debian.org::debian /data/ftp/.2/debian/debian/ --max-delete=40000 --delay-updates --delete --delete-delay --delete-excluded

Comment 9 Jiri Popelka 2022-09-15 16:04:43 UTC
One more upstream commit
https://github.com/WayneD/rsync/issues/356#issuecomment-1244902616
on top of 3.2.6 (Fedora 35) fixes this problem for me.

Comment 10 Michal Ruprich 2022-09-16 15:33:58 UTC
Thank you Jirko!

Comment 11 Trevor Benson 2022-09-19 17:52:28 UTC
A couple of other upstream commits which fix separate issues. If not holding until a new tag of v3.2.7 is created would be great to ensure these are included in the next release as well:

https://github.com/WayneD/rsync/issues/375#issuecomment-1246855453
https://github.com/WayneD/rsync/issues/376#issuecomment-1246200670

Comment 14 Michal Ruprich 2022-10-04 08:36:44 UTC
Hi Lance,

the error in comment #8 does not seem to be related to the --old-args command. Looking at the error message, some options from the original command are missing, namely these:
 -prltvHSB8192
 --safe-links
 --chmod=D755,F644
 --timeout 120
 --stats
 --no-human-readable
 --no-inc-recursive

As the error message in comment #8 states, the --delete won't work without -d which was provided in the previous command by -prltvHSB8192. Can you please take a look at the command in comment #8 and see whether some options are not missing there?

Thanks and regards,
Michal

Comment 17 Michal Ruprich 2022-10-04 10:51:44 UTC
I am adding a scratch build with a couple of commits that might help. I've tested with a use case in one of our customer cases and it fixed the incompatibility problem with filtering:

https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=48075645

Comment 18 Lance Albertson 2022-10-04 17:30:13 UTC
(In reply to Michal Ruprich from comment #14)
> Hi Lance,
> 
> the error in comment #8 does not seem to be related to the --old-args
> command. Looking at the error message, some options from the original
> command are missing, namely these:
>  -prltvHSB8192
>  --safe-links
>  --chmod=D755,F644
>  --timeout 120
>  --stats
>  --no-human-readable
>  --no-inc-recursive
> 
> As the error message in comment #8 states, the --delete won't work without
> -d which was provided in the previous command by -prltvHSB8192. Can you
> please take a look at the command in comment #8 and see whether some options
> are not missing there?
> 
> Thanks and regards,
> Michal

Here is the full command that was tried:

Oct 04 17:23:29 ftp-osl ftpsync-debian[2388168]: Running stage1: rsync --quiet --log-file /var/log/mirror//rsync-ftpsync-debian.log --filter=exclude_/Archive-Update-in-Progress-ftp-osl.osuosl.org --filter=protect_/Archive-Update-in-Progress-ftp-osl.osuosl.org --filter=exclude_/Archive-Update-Required-ftp-osl.osuosl.org --filter=protect_/Archive-Update-Required-ftp-osl.osuosl.org --filter=exclude_/project/trace/ftp-osl.osuosl.org --filter=protect_/project/trace/ftp-osl.osuosl.org --filter=exclude_/project/trace/ftp-osl.osuosl.org-stage1 --filter=protect_/project/trace/ftp-osl.osuosl.org-stage1 --filter=exclude_/project/trace/_hierarchy --filter=protect_/project/trace/_hierarchy --filter=exclude_/project/trace/_traces --filter=protect_/project/trace/_traces --filter=include_/project/ --filter=protect_/project/ --filter=include_/project/trace/ --filter=protect_/project/trace/ --filter=include_/project/trace/* --bwlimit=0 --old-args --exclude=.~tmp~/ ftp-osl.osuosl.org.debian.org::debian /data/ftp/.2/debian/debian/ --include=*.diff/ --exclude=*.diff/Index --exclude=Packages* --exclude=Sources* --exclude=Release* --exclude=InRelease --include=i18n/by-hash --exclude=i18n/* --exclude=ls-lR*
Oct 04 17:23:30 ftp-osl ftpsync-debian[2388168]: Back from rsync with returncode 0

The stage1 ran fine, but stage2 is the one having issues:

Oct 04 17:23:30 ftp-osl ftpsync-debian[2388168]: Running stage2: rsync --quiet --log-file /var/log/mirror//rsync-ftpsync-debian.log --filter=exclude_/Archive-Update-in-Progress-ftp-osl.osuosl.org --filter=protect_/Archive-Update-in-Progress-ftp-osl.osuosl.org --filter=exclude_/Archive-Update-Required-ftp-osl.osuosl.org --filter=protect_/Archive-Update-Required-ftp-osl.osuosl.org --filter=exclude_/project/trace/ftp-osl.osuosl.org --filter=protect_/project/trace/ftp-osl.osuosl.org --filter=exclude_/project/trace/ftp-osl.osuosl.org-stage1 --filter=protect_/project/trace/ftp-osl.osuosl.org-stage1 --filter=exclude_/project/trace/_hierarchy --filter=protect_/project/trace/_hierarchy --filter=exclude_/project/trace/_traces --filter=protect_/project/trace/_traces --filter=include_/project/ --filter=protect_/project/ --filter=include_/project/trace/ --filter=protect_/project/trace/ --filter=include_/project/trace/* --bwlimit=0 --old-args --exclude=.~tmp~/ ftp-osl.osuosl.org.debian.org::debian /data/ftp/.2/debian/debian/ --max-delete=40000 --delay-updates --delete --delete-delay --delete-excluded
Oct 04 17:23:30 ftp-osl ftpsync-debian[2388168]: Back from rsync with returncode 1

The only thing that changed was adding '--old-args' and using rsync-3.1.2-11.el7_9. If I revert this back to -10 and remove '--old-arg', this starts working again.

Comment 19 Michal Ruprich 2022-10-05 06:52:43 UTC
Hi Lance,

I am sorry but I find the info you provided confusing. You are mixing command from Ubuntu with those from Debian, I am not sure what are the error messages from rsync when running commands in comment #18. You are talking about archvsync which I am not familiar with. Can you please provide more clear explanation on the behavior? "Back from rsync with returncode 1" does not help. Please provide the command you ran on Ubuntu with the rsync error message and than the exact command you ran on Debian with the rsync error message.

Also, did you try the testing version from comment #17?

Thanks and regards,
Michal

Comment 20 Michal Ruprich 2022-10-05 13:56:23 UTC
Hi Lance,

I am sorry I just realized that you might not be able to get to the link in comment #17. Providing the same package in a different way here:

https://people.redhat.com/mruprich/rsync-3.1.2-12.el7_9.x86_64.rpm

Thanks and regards,
Michal

Comment 21 Lance Albertson 2022-10-05 17:51:26 UTC
(In reply to Michal Ruprich from comment #19)
> Hi Lance,
> 
> I am sorry but I find the info you provided confusing. You are mixing
> command from Ubuntu with those from Debian, I am not sure what are the error
> messages from rsync when running commands in comment #18. You are talking
> about archvsync which I am not familiar with. Can you please provide more
> clear explanation on the behavior? "Back from rsync with returncode 1" does
> not help. Please provide the command you ran on Ubuntu with the rsync error
> message and than the exact command you ran on Debian with the rsync error
> message.

Apologies for the confusion. Archvsync is basically a bash wrapper around rsync to managing Debian/Ubuntu based repositories. What I said in #18 was specifically related to adding the "--old-args" command with the latest rsync package. You can see the full rsync command which fails in #18. The error output from that command is the same seen in #8. Let me know if that doesn't clear this up.

Comment 22 Lance Albertson 2022-10-05 17:52:42 UTC
(In reply to Michal Ruprich from comment #20)
> Hi Lance,
> 
> I am sorry I just realized that you might not be able to get to the link in
> comment #17. Providing the same package in a different way here:
> 
> https://people.redhat.com/mruprich/rsync-3.1.2-12.el7_9.x86_64.rpm

Are you able to provide a ppc64le binary? Our production environment is running
on ppc64le.

I'll work on spinning up a test environment in x86 to see if this resolves it
and will report back.

Comment 23 Michal Ruprich 2022-10-05 18:45:38 UTC
(In reply to Lance Albertson from comment #22)
> (In reply to Michal Ruprich from comment #20)
> > Hi Lance,
> > 
> > I am sorry I just realized that you might not be able to get to the link in
> > comment #17. Providing the same package in a different way here:
> > 
> > https://people.redhat.com/mruprich/rsync-3.1.2-12.el7_9.x86_64.rpm
> 
> Are you able to provide a ppc64le binary? Our production environment is
> running
> on ppc64le.

No problem, here is the ppc64le binary:
https://people.redhat.com/mruprich/rsync-3.1.2-12.el7_9.ppc64le.rpm
 
> I'll work on spinning up a test environment in x86 to see if this resolves it
> and will report back.

Comment 24 Lance Albertson 2022-10-05 22:30:29 UTC
(In reply to Michal Ruprich from comment #23)
> (In reply to Lance Albertson from comment #22)
> > Are you able to provide a ppc64le binary? Our production environment is
> > running on ppc64le.
> 
> No problem, here is the ppc64le binary:
> https://people.redhat.com/mruprich/rsync-3.1.2-12.el7_9.ppc64le.rpm

Thank you, this works without any issue!

Comment 25 David Marshall 2022-10-05 23:40:17 UTC
The problem that I experienced with rsync-3.1.2-11.el7_9.x86_64 that is fixed by rsync-3.1.2-12.el7_9.x86_64:

With two empty directories foo and bar:

$ rpm -q rsync
rsync-3.1.2-11.el7_9.x86_64
$ rsync --filter='protect *' -av foo bar
sending incremental file list
ERROR: rejecting excluded file-list name: foo
rsync error: protocol incompatibility (code 2) at flist.c(907) [Receiver=3.1.2]

but:

$ rpm -q rsync
rsync-3.1.2-12.el7_9.x86_64
$ rsync --filter='protect *' -av foo bar
sending incremental file list

sent 70 bytes  received 17 bytes  174.00 bytes/sec
total size is 0  speedup is 0.00


Thank you for the quick work on this!

Comment 26 Remi D 2022-10-10 12:36:33 UTC
Hello

I am experiencing the same issue on RHEL 8.6.

Here is my rsync version:
# rpm -qa |grep rsync
rsync-3.1.3-14.el8_6.3.x86_64

And how I reproduced the error:
# cat /mnt/test 
etc/hosts
# rsync -a --relative -v --include-from=/mnt/test --exclude=* / /tmp/test/
sending incremental file list
ERROR: rejecting excluded file-list name: /.
rsync error: protocol incompatibility (code 2) at flist.c(912) [Receiver=3.1.3]


Do you plan on releasing a fix for RHRL 8.6 too ?

Thank you

Remi

Comment 27 Michal Ruprich 2022-10-10 13:30:26 UTC
Hi Remi,

yes, the fix is basically the same everywhere and I will try to fix it where appropriate.

Regards,
Michal

Comment 28 Don Hanneman 2022-10-11 16:21:14 UTC
Hi,

I have a CU requesting the same fix for 8.6. They're all set on 7.9 now, but still broken on 8.6

Case is already linked to the ticket. In the CU environment, they are not allowed to temporarily downgrade to a working version due to local policy. 


------------------

Thanks, but rsync-3.1.3-14.el8_6.4.x86_64 doesn't fix the issue in RedHat 8.

Using:
rsync-3.1.3-14.el8_6.4.x86_64
rsync-daemon-3.1.3-14.el8_6.4.noarch

I run:
rsync -rtvp -n --delete --exclude=".snapshot" --filter="protect *.rpm" /mnt/origin/ /mnt/dest

sending incremental file list
ERROR: rejecting excluded file-list name: gparted/1.0.0/x86_64/os/latest/utils/linux/rpms/jenkins-2.30-1.1.noarch.rpm
rsync error: protocol incompatibility (code 2) at flist.c(912) [receiver=3.1.3]

------------------------

Thanks

-Don

Comment 29 Paul van Maaren 2022-10-16 16:13:53 UTC
The following appeared in Fedora release 35:

$ rsync -V
rsync  version 3.2.6  protocol version 31

I still get:
ERROR: rejecting unrequested file-list name: var/spool/mail/maaren
rsync error: protocol incompatibility (code 2) at flist.c(998) [Receiver=3.2.5]

Not sure why it says: "[Receiver=3.2.5]"

Running with --old-args still works.

Comment 31 Jeremy Mathers 2022-10-20 12:05:12 UTC
Is there a way to get any insight on when this update will appear on access.redhat.com?

I have an IBM product that is hitting this issue on RHEL7.

At the very least could the source RPM for rsync-3.1.2-12.el7_9.x86_64 be posted so that we can build the RPM ourselves?

Thanks!

Comment 42 errata-xmlrpc 2022-12-13 11:19:08 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (rsync bug fix and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2022:8947


Note You need to log in before you can comment on or make changes to this bug.