-
Notifications
You must be signed in to change notification settings - Fork 318
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
rsync 3.2.3 + xxh128/xxh3 support? #122
Comments
|
I think I found the differences on avx2 system I had previously compiled zstd and it seems rsync build picked that up on avx2 system without on non-avx2 system with once I updated xxHash to 0.80 and rebuild rsync 3.2.3 RPM it shows properly now |
|
Yeah, Cyan4973 could have told you that the 128-bit xxhash only just stabilized in its 0.8.0 release, so anything older than that isn't compatible. |
|
For the record: Cross-link to https://bugs.launchpad.net/ubuntu/+source/rsync/+bug/1934992
Caused by libxxhash 0.7.3 with rsync 3.2.3. |
|
What is the version of libxxhash on the other side of the connection? You can also use |
I'm sorry that was implied by the Groovy. On Ubuntu/Groovy you get 0.8 (at the moment). But if you manually install the rsync 3.2.3 deb package it will allow any version >= 0.7.1. And on Focal, you have 0.7.3 in the main repository. So if you don't pay attention to this, you get one rsync side with libxxhash 0.7 and one with 0.8.
It fails on all files. Verbose steps to reproduce are now attached to the launchpad report. (For an rsync source fix for this, it might be an option to do a xxh128 validity assertion before adding it to the list of allowed hashes. In a better world, the changed hashes should not have been made available through the |
|
Hey,
I am sorry but what you're trying to do is not correct! You cannot just decide to take one of the package from another release and the other from another release. That is not how it works, I am afraid :/ If you do a fresh installation of rsync on Groovy, everything works fine! See here: |
Yes you can. It might not be recommended, but this generally works fine. The problem here is that libxxhash reused symbols for changed functionality without (1) bumping the soname version or (2) using different symbols. But @utkarsh2102: I'm not here to debate whether what I did was right or wrong. The fact is that people do this, and the debian package in Groovy is not equipped to handle this situation. If it's only supposed to work on Groovy it should depend on packages that are available on Groovy only: in this case And again: I don't have an issue with rsync. I just reported it here in case people came looking for this exact problem. |
|
Rsync already handles proper negotiation of available hashes. The only possible bad thing I can imagine is that someone with the 0.7 xxhash changed the source code to enable the 128-bit hash when they shouldn't have. If an xxhash 0.7-based rsync says in the --debug=nstr output that it negotiated xxh128 then someone did something very bad. |
|
Compare: Against: I don't know who enabled what. But this looks like a problem. Sounds to me like neither xxh128sum nor all those 128bit symbols (*) should have been in those 0.7.x packages. |
|
Hi everyone, If there have been strange changes to symbols between 0.7 and 0.8, that is something I cannot deal with now. What might be a good idea is adding symbol tracking to the package. Help welcomed here. |
|
Note that the /usr/bin utilities don't have any effect on rsync. The only things to check with rsync is what |
|
Hi Wayne, this is beginning to become a big misunderstanding. Let me try to explain what I think is going on:
(All fine up to this point.) So, now you -- or in this case Ubuntu Groovy -- have an rsync 3.2.3 binary package that thinks it lives alongside a libxxhash 0.8 library. But because both are in packages, they can be individually swapped out for older/newer versions:
But they can also be downgraded. At that point, when someone attempts to load libxxhash 0.7.3 onto their system, we want the package manager to complain that libxxhash-0.7.3 is not compatible with the rsync-3.2.3 binary package because it depends on libxxhash-0.8.0 functionality. That's what these do: If you attempt to install this alongside some super ancient libc 2.14, then the package manager will suggest the removal of rsync because it needs libc 2.15 or higher. For the rsync 3.2.3 Groovy package, this looks like this: Of interest here is that is says: Instead of: So, when trying to install the rsync 3.2.3 binary deb package alongside any binary libxxhash package you get no complaints from the (apt) package manager, as long as the version is >=0.7.1. How? At the last stage of building the binary deb packages there is the You see, on this system with libxxhash 0.8, the binary package creation process will get the info that any version above 0.7.1 is fine. And thus the resultant package will Depend on libxxhash >=0.7.1 instead of on >=0.8.0. How to remedy the situation? There is nothing for rsync to do. It could check xxh128 sanity at runtime. But it's really not its job. Instead, the symbols in the libxxhash packages should be updated to reflect that XXH3_128bits_withSeed in libxxhash0 0.7.1 is not the same as the XXH3_128bits_withSeed in 0.8.0. This is something that @norbusan might be able to help with. But according to his feedback (thanks!), Debian is not affected by this, because Debian will only have 0.6 and 0.8 libxxhash versions in (at one point) stable releases. Ubuntu is affected by this because it has taken the 0.7.3 package from debian and landed it into (stable) Ubuntu/Focal. I think that we should attempt to alter the symbol file I pasted above to show: If a new binary deb package is built against a newer libxxhash with that symbols file, I think the dependency problem would be fixed. Then only every project that links against libxxhash needs a rebuild so the package manager dependencies can be updated. And this problem would fade away as the newer packages get more prominence. I'll be moving this discussion to norbusan/debian-xxhash, as I think any changes should be done there. Thanks all for listening :) |
|
Thanks for the clarification. That does indeed sound plausible. One solution is to have debian/ubuntu patch the rsync code to define XXH_INLINE_ALL and then rsync will be fine because it won't use the external xxhash library. Otherwise, if rsync is compiled with xxhash 0.8 the binary must be marked with 0.8 as the minimum version. |
@Cyan4973 suggested this question was better asked here :)
I tried building 2 rsync 3.2.3 RPMs on CentOS 7. One on a system with avx2 support and one without avx2 support.
The resulting rsync 3.2.3 binary's help output lists that
xxh128andxxh3support is only on the non-avx2 built version and not the avx2 one? So what on the system determines whether rsync with xxHash will supportxxh128andxxh3? Trying to determine if I missed a build step/flag/configuration somewhere.Both systems had xxhash-devel installed from EPEL repo
avx2 support system
no avx2 support system
The text was updated successfully, but these errors were encountered: