[SOLVED] rsync v3.2.4 - delta transfer algorithm not working

This forum is for topics dealing with problems with software specifically in the AArch64 repo.

[SOLVED] rsync v3.2.4 - delta transfer algorithm not working

Postby ufo6000 » Wed Apr 27, 2022 6:33 pm

Since latest rsync update 3.2.3 --> 3.2.4 I have an issue with transferring my data from the rpi3 to another machine with rsync storage:

The rsync delta transfer algorithm is not working anymore, rsync transfers always the whole file, even if inside the file only a small part was changed.

5.15.34-1-rpi-ARCH #1 SMP PREEMPT Tue Apr 19 14:29:15 UTC 2022 aarch64 GNU/Linux

rsync --delete --inplace --partial --progress --archive --human-readable --stats --checksum XXX/x.txt XXX:x/x.txt

small file change on rpi
$this->bbcode_second_pass_code('', '
sending incremental file list
x.txt
15,04M 100% 9,07MB/s 0:00:01 (xfr#1, to-chk=0/1)

Number of files: 1 (reg: 1)
Number of created files: 0
Number of deleted files: 0
Number of regular files transferred: 1
Total file size: 15,04M bytes
Total transferred file size: 15,04M bytes
Literal data: 15,04M bytes
Matched data: 0 bytes
File list size: 0
File list generation time: 0,053 seconds
File list transfer time: 0,000 seconds
Total bytes sent: 15,05M
Total bytes received: 23,36K

sent 15,05M bytes received 23,36K bytes 6,03M bytes/sec
total size is 15,04M speedup is 1,00
')

small file change on arch x86_64
$this->bbcode_second_pass_code('', '
sending incremental file list
x.txt
15,04M 100% 207,88MB/s 0:00:00 (xfr#1, to-chk=0/1)

Number of files: 1 (reg: 1)
Number of created files: 0
Number of deleted files: 0
Number of regular files transferred: 1
Total file size: 15,04M bytes
Total transferred file size: 15,04M bytes
Literal data: 1,78K bytes
Matched data: 15,04M bytes
File list size: 0
File list generation time: 0,024 seconds
File list transfer time: 0,000 seconds
Total bytes sent: 17,44K
Total bytes received: 23,36K

sent 17,44K bytes received 23,36K bytes 27,20K bytes/sec
total size is 15,04M speedup is 368,76
')

Note the unexpected "sent 15,05M bytes" versus the expected "sent 17,44K bytes".
The change on the test file was something like this: date >> x.txt

Archlinux x86_64 has made the same update step, there the issue does not exists.
How can I inspect the issue more ?
Last edited by ufo6000 on Sun Jun 19, 2022 10:12 am, edited 1 time in total.
ufo6000
 
Posts: 117
Joined: Fri Jan 22, 2016 7:54 pm

Re: rsync v3.2.4 - delta transfer algorithm not working anym

Postby ufo6000 » Thu Apr 28, 2022 4:48 pm

rsync with -vvv

rpi
$this->bbcode_second_pass_code('', '
...
delta-transmission enabled
recv_generator(x.txt,1)
generating and sending sums for 1
count=3886 rem=1756 blength=3872 s2length=2 flength=15044476
send_files(1, /home/s/Downloads/x.txt)
send_files mapped /home/s/Downloads/x.txt of size 15044551
calling match_sums /home/s/Downloads/x.txt
x.txt
built hash table
hash search b=3872 len=15044551
match at 60 last_match=0 j=1538 len=3872 n=60

3,93K 0% 0,00kB/s 0:00:00
match at 3932 last_match=3932 j=1539 len=3872 n=0
...
...
match at 15038848 last_match=15038848 j=3884 len=3872 n=0
done hash search
sending file_sum
false_alarms=0 hash_hits=4114 matches=3884

15,04M 100% 131,59MB/s 0:00:00 (xfr#1, to-chk=0/1)
sender finished /home/s/Downloads/x.txt
generate_files phase=1
recv_files(1) starting
recv_files(x.txt)
recv mapped x.txt of size 15044476
got file_sum
finishing x.txt
set modtime, atime of x.txt to (1651162938) 2022/04/28 16:22:18, (1651082468) 2022/04/27 18:01:08
send_files phase=1
recv_files phase=1
generate_files phase=2
send_files phase=2
send files finished
total: matches=3884 hash_hits=4114 false_alarms=0 data=5703
...
')

x86_64
$this->bbcode_second_pass_code('', '
...
delta-transmission enabled
recv_generator(x.txt,1)
generating and sending sums for 1
count=3886 rem=1806 blength=3872 s2length=2 flength=15044526
send_files(1, /home/s/Downloads/x.txt)
send_files mapped /home/s/Downloads/x.txt of size 15044476
calling match_sums /home/s/Downloads/x.txt
x.txt
built hash table
hash search b=3872 len=15044476

32,77K 0% 0,00kB/s 0:00:00
9,31M 61% 8,83MB/s 0:00:00
done hash search
sending file_sum
false_alarms=0 hash_hits=442232 matches=0

15,04M 100% 9,16MB/s 0:00:01 (xfr#1, to-chk=0/1)
sender finished /home/s/Downloads/x.txt
generate_files phase=1
recv_files(1) starting
recv_files(x.txt)
recv mapped x.txt of size 15044526
got file_sum
finishing x.txt
set modtime, atime of x.txt to (1651083798) 2022/04/27 18:23:18, (1651082468) 2022/04/27 18:01:08
send_files phase=1
recv_files phase=1
generate_files phase=2
send_files phase=2
send files finished
total: matches=0 hash_hits=442232 false_alarms=0 data=15044476
...
')


the "hash search" starts, but finds no matches at the rpi ???
ufo6000
 
Posts: 117
Joined: Fri Jan 22, 2016 7:54 pm

Re: rsync v3.2.4 - delta transfer algorithm not working anym

Postby ufo6000 » Tue May 03, 2022 3:20 pm

I build a test matrix:
$this->bbcode_second_pass_code('', '
x86_64 aarch64 armv7l
x86_64 ok nok nok
aarch64 nok ok ok
armv7l nok - ok
')
indicating: intel/amd versus arm is not working.

I compared the rsync --version output
$this->bbcode_second_pass_code('', '
x86_64 Optimizations: SIMD-roll
aarch64 Optimizations: no SIMD-roll
armv7l Optimizations: no SIMD-roll

x86_64 64-bit timestamps
aarch64 64-bit timestamps
armv7l 32-bit timestamps
')
indicating: intel/amd versus arm has a difference, timestamps is probably no issue.

The SIMD topic is named on the rsync news for 3.2.4:
https://download.samba.org/pub/rsync/NEWS
in the PACKAGING RELATED section.

And as far as I understand SIMD optimisation is related to checksum, which is used in hashing of the delta transfer ... ?

So in short: the arm version of hashing is not compatible anymore with the intel/arm version of rsync, starting with 3.2.4 ?
ufo6000
 
Posts: 117
Joined: Fri Jan 22, 2016 7:54 pm

Re: rsync v3.2.4 - delta transfer algorithm not working anym

Postby robg » Tue May 03, 2022 10:54 pm

Some thoughts:

The PKGBUILDs of rsync are identical for aarch64 and amd64. Any difference in behavior you are observing must thus be either to due to different config options (which, I believe, you have already ruled out) or due to architecture-dependent build flags. The latter is best discussed upstream. Perhaps double-check first, by downgrading, if your problem is indeed caused by the SIMD mismatch.
robg
 
Posts: 186
Joined: Tue Jan 05, 2021 8:22 am

Re: rsync v3.2.4 - delta transfer algorithm not working anym

Postby ufo6000 » Thu May 05, 2022 5:39 pm

Thanks for your thoughts!

yes, downgrading to previous version (rsync-3.2.3-4) solves it.
Also I tried a fresh build on my own (rsync-3.2.4-99-armv7h.pkg.tar.xz) - same issue as the current version in the repo (rsync-3.2.4-1) :-(
ufo6000
 
Posts: 117
Joined: Fri Jan 22, 2016 7:54 pm

Re: rsync v3.2.4 - delta transfer algorithm not working anym

Postby robg » Fri May 06, 2022 9:05 am

The next step would be to compile rsync on your amd64 machine with the --disable-simd flag passed to configure. If this works, my guess is you will have to run your own amd64 rsync package from now on, as SIMD support is the new default on amd64 but not supported on aarch64.

Also - as written before - get the opinion of some rsync experts on this.
robg
 
Posts: 186
Joined: Tue Jan 05, 2021 8:22 am

Re: rsync v3.2.4 - delta transfer algorithm not working anym

Postby ufo6000 » Sat May 07, 2022 12:54 pm

Thanks very much for your guidance.
--disable-roll-simd does not solve the issue, I build an amd64 version for testing.
Also thinking about: this type of error would make no sense, since older versions on arch arm does work with newer simd on amd64:
downgrading to previous version (rsync-3.2.3-4) solves it.

I will ask to open an issue on github.
ufo6000
 
Posts: 117
Joined: Fri Jan 22, 2016 7:54 pm

Re: rsync v3.2.4 - delta transfer algorithm not working anym

Postby robg » Sun May 08, 2022 3:17 pm

What I meant was that if the transfer worked with the previous rsync versions that were compiled without SIMD support, then, maybe, disabling SIMD support in the current version would solve your problem. It certainly was worth trying. Hope the guys in the mailing list / github issue tracker can help you out!
robg
 
Posts: 186
Joined: Tue Jan 05, 2021 8:22 am

Re: rsync v3.2.4 - delta transfer algorithm not working anym

Postby graysky » Sun May 08, 2022 7:19 pm

$this->bbcode_second_pass_quote('ufo6000', 'I') will ask to open an issue on github.


Always a good idea to share links to external bug trackers you open back here in the thread you started.
graysky
Developer
 
Posts: 1727
Joined: Sun Jun 26, 2011 6:56 am
Location: /run/user/1000

Re: rsync v3.2.4 - delta transfer algorithm not working anym

Postby ufo6000 » Tue May 10, 2022 4:57 pm

yes of course, sorry I forgot graysky,
https://github.com/WayneD/rsync/issues/317
Also thanks to robg for your help!
ufo6000
 
Posts: 117
Joined: Fri Jan 22, 2016 7:54 pm

Next

Return to ARMv8

Who is online

Users browsing this forum: No registered users and 3 guests