Skip to content
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

Size check mismatch errors on certain mirror updates #376

Closed
david-gregory-inmar opened this issue Apr 7, 2016 · 19 comments · Fixed by #574
Closed

Size check mismatch errors on certain mirror updates #376

david-gregory-inmar opened this issue Apr 7, 2016 · 19 comments · Fixed by #574
Labels

Comments

@david-gregory-inmar
Copy link

In the past few days, two of the Amazon EC2 mirrors in my repo set are being stubborn when I try to update them. I get the following messages:

ERROR: unable to update: http://us-east-1.clouds.archive.ubuntu.com/ubuntu/dists/precise-updates/main/binary-i386/Packages.bz2: size check mismatch 1045491 != 1045248
ERROR: unable to update: http://us-east-1.clouds.archive.ubuntu.com/ubuntu/dists/trusty-updates/main/binary-i386/Packages.bz2: size check mismatch 720276 != 712806

If I retry the updates for these two many times, eventually they will complete successfully. I'm not seeing any problems with the remote repos themselves when I try and update an Ubuntu instance directly from them, so I don't think the problem is with Amazon. However, I'm mirroring twenty-two other remote repos and Aptly has no trouble with any of them.

@smira
Copy link
Contributor

smira commented Apr 7, 2016

I don't know the exact reason for that, but this could happen when pulling from the mirror which is syncing currently. In that case Release file signatures (and size info) doesn't match index files, and this error is raised. This is quite common problem with apt repos (when sync is finished, all the files match Release info, and problem goes away).

@david-gregory-inmar
Copy link
Author

Okay, thanks for replying. This is a relatively new behavior so I thought I'd run it by you. I'll keep testing against those mirrors, if things change I'll post an update here. Maybe it's just Amazon changing the way/time they do their sync...

@notpeter
Copy link

notpeter commented May 25, 2016

I have a test case which reproduces this issue reliably for me. Can someone else see if they can duplicate this too?

aptly mirror create pagerduty http://packages.pagerduty.com/pdagent deb/
aptly mirror update pagerduty

Repeat the second command until it breaks (usually takes 2-3 times). Eventually you will get:

ERROR: unable to update: http://packages.pagerduty.com/pdagent/deb/Packages.gz: size check mismatch 2324 != 973

I think the issue may have something to do with picking parsing of this repo's Release file:

MD5Sum:
 2a8a571579f60da022470ce300e731af            11432 Packages
 9a52acd73b01cef65bf8227adaaf026f             2324 Packages.gz
 db77040214a23ab564e3c3a09768dfea             2446 deb/Packages
 5799d88860e10251afb6737995811b3d              973 deb/Packages.gz
 20ba00172df962f951c70828c9fa8123              944 deb/Release

Note the fact that the two sizes (2324 and 973) are correct for two different Packages.gz files.

Btw, I confirmed this wasn't a CDN issue by confirming that all six of the CloudFront IPs which service this repo all consistently return the correct files as requested.

image

@smira
Copy link
Contributor

smira commented May 26, 2016

Looks like a but in aptly, it does postifx match there and it should have been choosing longest match, but it is matching on the first one, and it depends on hash map order, it would match either right one or wrong one.

@smira smira added the bug label May 26, 2016
@smira smira added this to the v0.9.8 milestone May 26, 2016
@smira smira removed this from the v0.9.8 milestone Mar 27, 2017
@smira smira added 1.1.0 and removed 1.1.0-Maybe labels May 19, 2017
@smira
Copy link
Contributor

smira commented May 19, 2017

I've found a bug which leads to this behaviour, going to fix it for 1.1.0

@nikunj12
Copy link

I have seen same error (size mismatch) with aptly 1.1
root@bng-lnx-repo01:/repo# aptly version
aptly version: 1.1.0+1+ga584b2e

Log

root@bng-lnx-repo01:/repo# aptly mirror show ubuntu1604-main2
Name: ubuntu1604-main2
Archive Root URL: http://127.0.0.1:8080/ubuntu/
Distribution: xenial
Components: main, restricted, universe, multiverse
Architectures: amd64, i386
Download Sources: no
Download .udebs: no
Filter: libolecf-dev_20160107-1_amd64 (even I have use filter it tried to download same pkg)
Filter With Deps: no
Last update: never

Information from release file:
Acquire-By-Hash: yes
Architectures: amd64 arm64 armhf i386 powerpc ppc64el s390x
Codename: xenial
Components: main restricted universe multiverse
Date: Thu, 21 Apr 2016 23:23:46 UTC
Description: Ubuntu Xenial 16.04

Label: Ubuntu
Origin: Ubuntu
Suite: xenial
Version: 16.04

aptly mirror update

root@bng-lnx-repo01:/repo# aptly mirror update ubuntu1604-main2
Downloading http://127.0.0.1:8080/ubuntu/dists/xenial/InRelease...
gpgv: Signature made Fri 22 Apr 2016 04:55:09 AM IST using DSA key ID 437D05B5
gpgv: Good signature from "Ubuntu Archive Automatic Signing Key ftpmaster@ubuntu.com"
gpgv: Signature made Fri 22 Apr 2016 04:55:09 AM IST using RSA key ID C0B21F32
gpgv: Good signature from "Ubuntu Archive Automatic Signing Key (2012) ftpmaster@ubuntu.com"
Downloading & parsing package files...
Downloading http://127.0.0.1:8080/ubuntu/dists/xenial/main/binary-amd64/Packages.gz...
Downloading http://127.0.0.1:8080/ubuntu/dists/xenial/main/binary-i386/Packages.gz...
Downloading http://127.0.0.1:8080/ubuntu/dists/xenial/restricted/binary-amd64/Packages.gz...
Downloading http://127.0.0.1:8080/ubuntu/dists/xenial/restricted/binary-i386/Packages.gz...
Downloading http://127.0.0.1:8080/ubuntu/dists/xenial/universe/binary-amd64/Packages.gz...
Downloading http://127.0.0.1:8080/ubuntu/dists/xenial/universe/binary-i386/Packages.gz...
Downloading http://127.0.0.1:8080/ubuntu/dists/xenial/multiverse/binary-amd64/Packages.gz...
Downloading http://127.0.0.1:8080/ubuntu/dists/xenial/multiverse/binary-i386/Packages.gz...
Applying filter...
Packages filtered: 82776 -> 1.
Building download queue...
Download queue: 1 items (344.75 KiB)
Downloading http://127.0.0.1:8080/ubuntu/pool/universe/libo/libolecf/libolecf-dev_20160107-1_amd64.deb...
ERROR: unable to update: download errors:
http://127.0.0.1:8080/ubuntu/pool/universe/libo/libolecf/libolecf-dev_20160107-1_amd64.deb: size check mismatch 151502 != 353022

root@bng-lnx-repo01:/repo#

@nikunj12
Copy link

you can see 127.0.01 because I have configure apt-mirror to download the repo locally and use it with aptly.

there are many other pkgs have mismatch errors

@smira
Copy link
Contributor

smira commented Aug 15, 2017

@nikunj12 this is different error from the one we had in this issue (it's about package, not about index).

Would you mind finding matching entry in Packages index and verifying that package downloaded really matches the index?

@nikunj12
Copy link

In my case apart from the packages index, other packages are showing mismatch.

even I use the filter to ignore those its failing at same packages .

@smira
Copy link
Contributor

smira commented Aug 17, 2017

@nikunj12 so what happens is:

  1. aptly downloads Packages file you see in the log, reads them and gets information about checksums and file sizes
  2. aptly starts downloading files and checks that size/checksum match entries in Packages index

So what I'm asking you to do (and as it's your apt-mirror, I can't do that) is to cross-verify Packages index entries and errors above. Also what would you get downloading file with curl/wget?

@gittygoo
Copy link

gittygoo commented Apr 17, 2018

I'm getting the same problems on 1.2, seems everytime udebs are involved aptly does not download the complete file. Downloading direct via wget on the machine works flawlessly

@smira
Copy link
Contributor

smira commented Apr 17, 2018

@gittygoo do you have a mirror which reproduces that?

@gittygoo
Copy link

yes but its an internal mirror

@smira
Copy link
Contributor

smira commented Apr 17, 2018

@gittygoo are you able to share part of Packages index which shows package files and size and error message? If that is size mismatch error as above, I want to figure out where wrong size comes from

@gittygoo
Copy link

where can i find these? here is an example of the returned output
http://archive.ubuntu.com/ubuntu/pool/main/l/linux/firewire-core-modules-3.13.0-54-generic-di_3.13.0-54.91_amd64.udeb: size check mismatch 453 != 68232 http://archive.ubuntu.com/ubuntu/pool/main/l/linux-lts-vivid/nic-shared-modules-3.19.0-25-generic-di_3.19.0-25.26~14.04.1_amd64.udeb: size check mismatch 453 != 482762 http://archive.ubuntu.com/ubuntu/pool/main/l/linux-lts-vivid/serial-modules-3.19.0-26-generic-di_3.19.0-26.28~14.04.1_amd64.udeb: size check mismatch 453 != 84444 http://archive.ubuntu.com/ubuntu/pool/main/l/linux-lts-xenial/fs-secondary-modules-4.4.0-59-generic-di_4.4.0-59.80~14.04.1_amd64.udeb: size check mismatch 453 != 578908 http://archive.ubuntu.com/ubuntu/pool/main/l/linux/speakup-modules-3.13.0-141-generic-di_3.13.0-141.190_amd64.udeb: size check mismatch 453 != 55050 http://archive.ubuntu.com/ubuntu/pool/main/l/linux-lts-utopic/irda-modules-3.16.0-67-generic-di_3.16.0-67.87~14.04.1_amd64.udeb: size check mismatch 453 != 180518 http://archive.ubuntu.com/ubuntu/pool/main/l/linux-lts-utopic/vlan-modules-3.16.0-76-generic-di_3.16.0-76.98~14.04.1_amd64.udeb: size check mismatch 453 != 26908 http://archive.ubuntu.com/ubuntu/pool/main/l/linux/plip-modules-3.13.0-92-generic-di_3.13.0-92.139_amd64.udeb: size check mismatch 453 != 9328 http://archive.ubuntu.com/ubuntu/pool/main/l/linux/ppp-modules-3.13.0-109-generic-di_3.13.0-109.156_amd64.udeb: size check mismatch 453 != 25908 http://archive.ubuntu.com/ubuntu/pool/main/l/linux-lts-xenial/vlan-modules-4.4.0-28-generic-di_4.4.0-28.47~14.04.1_amd64.udeb: size check mismatch 453 != 27036 http://archive.ubuntu.com/ubuntu/pool/main/l/linux/nic-usb-modules-3.13.0-54-generic-di_3.13.0-54.91_amd64.udeb: size check mismatch 453 != 294868 http://archive.ubuntu.com/ubuntu/pool/main/l/linux-lts-xenial/vlan-modules-4.4.0-72-generic-di_4.4.0-72.93~14.04.1_amd64.udeb: size check mismatch 453 != 27056 http://archive.ubuntu.com/ubuntu/pool/main/l/linux-signed-lts-xenial/kernel-signed-image-4.4.0-53-generic-di_4.4.0-53.74~14.04.1_amd64.udeb: size check mismatch 453 != 6691566 http://archive.ubuntu.com/ubuntu/pool/main/l/linux/nic-shared-modules-3.13.0-36-generic-di_3.13.0-36.63_amd64.udeb: size check mismatch 453 != 442838 http://archive.ubuntu.com/ubuntu/pool/main/l/linux-lts-vivid/irda-modules-3.19.0-80-generic-di_3.19.0-80.88~14.04.1_amd64.udeb: size check mismatch 453 != 228918 http://archive.ubuntu.com/ubuntu/pool/main/l/linux/pcmcia-modules-3.13.0-85-generic-di_3.13.0-85.129_amd64.udeb: size check mismatch 453 != 65060 http://archive.ubuntu.com/ubuntu/pool/main/l/linux/vlan-modules-3.13.0-44-generic-di_3.13.0-44.73_amd64.udeb: size check mismatch 453 != 27000 http://archive.ubuntu.com/ubuntu/pool/main/l/linux-lts-xenial/input-modules-4.4.0-92-generic-di_4.4.0-92.115~14.04.1_amd64.udeb: size check mismatch 453 != 287110

@gittygoo
Copy link

I just realized this might be because some of the traffic is being blocked by the ubuntu achive servers.
When i try to get a file with lynx i get this:
`Traffic blocked because of exceed session quota

Traffic blocked because of exceed per IP shaper session quota. Please contact the system administrator.
Your session quota is:1000, further traffic will be blocked.`

and after some time it unblocks the traffic again. Strange is that i am only using 2 concurrent downloads

@notpeter
Copy link

notpeter commented Apr 18, 2018 via email

@smira
Copy link
Contributor

smira commented Apr 18, 2018

aptly checks for response status code to be within 200-299, so I think this proxy is broken, and aptly automatically retries on network errors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants