Hi Wayne! Thanks for commenting.

> It's only the 128-bit hash that depends on 0.8.0.
> The 0.7 version works fine with rsync, giving it
> the 64-bit and 32-bit hashes.

Yes. Except it seems that if you switch the libxxhash0 from 0.8 to 0.7,
you get different behaviour.

rsync doesn't check what kind of xxh128 is produced, so we end up with a
mismatch.

Steps to reproduce:

  wget -q
https://launchpad.net/ubuntu/+archive/primary/+files/rsync_3.2.3-2ubuntu1_amd64.deb

  wget -q
https://launchpad.net/ubuntu/+archive/primary/+files/libxxhash0_0.7.3-1_amd64.deb

  wget -q
https://launchpad.net/ubuntu/+archive/primary/+files/libxxhash0_0.8.0-1ubuntu1.20.10.1_amd64.deb

focal-node-1:

  sudo dpkg -i libxxhash0_0.7.3-1_amd64.deb \
    rsync_3.2.3-2ubuntu1_amd64.deb
  touch empty-file.txt
  echo A > non-empty-file.txt

focal-node-2:

  sudo dpkg -i rsync_3.2.3-2ubuntu1_amd64.deb \
    libxxhash0_0.8.0-1ubuntu1.20.10.1_amd64.deb
  rsync -v --debug=nstr \
    focal-node-1:*empty-file.txt \
    .

Result:

  Client negotiated checksum: xxh128
  empty-file.txt
  WARNING: empty-file.txt failed verification
    -- update discarded (will try again).
  non-empty-file.txt
  WARNING: non-empty-file.txt failed verification
    -- update discarded (will try again).
  empty-file.txt
  ERROR: empty-file.txt failed verification
    -- update discarded.
  non-empty-file.txt
  ERROR: non-empty-file.txt failed verification
    -- update discarded.

  sent 104 bytes  received 255 bytes  239.33 bytes/sec
  total size is 2  speedup is 0.01
  rsync error: some files/attrs were not transferred
    (see previous errors) (code 23) at main.c(1816)
    [generator=3.2.3]


focal-node-2:

  $ ls *empty*
  ls: cannot access '*empty*': No such file or directory


I don't mind if I don't get xxh128 and get some poorer hash. But I _do_ mind if 
I get a hash that produces different results.

If I install libxxhash0 0.7.3 on both: things work.

If I install libxxhash0 0.8.x on both: things work.

But when there is a mismatch, things break. And uselessly too. I ended
up syncing lots of GBs multiple times because our job kept retrying.

I hope that clarifies the situation.

Walter

P.S. Alternative solutions could be:
- not exporting xxh128 functions from libxxhash0 0.7.3 (but it might be a bit 
late for that);
- checking that xxh128 produces sane values in rsync before choosing that 
option.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1934992

Title:
  rsync 3.2.x in Groovy depends on broken libxxhash 0.7.x

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/rsync/+bug/1934992/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to