"File has unexpected size" error on Focal ddebs repository

Bug #1976233 reported by Juan Navarro
34
This bug affects 6 people
Affects Status Importance Assigned to Milestone
ddeb-retriever
Confirmed
Undecided
Unassigned

Bug Description

Similar to https://bugs.launchpad.net/ubuntu/+source/apt/+bug/1975865
but affecting Ubuntu 20.04 "Focal"

Steps to reproduce:

1. Configure the debug repositories, like how it is explained in https://wiki.ubuntu.com/Debug%20Symbol%20Packages

I ran these commands on a newly created Docker container (docker run --pull always --rm -ti ubuntu:20.04), but a typical bare metal installation should present the same issue:

apt-get update ; apt-get install --yes gnupg

apt-key adv \
    --keyserver keyserver.ubuntu.com \
    --recv-keys F2EDC64DC5AEE1F6B9C621F0C8CAB6595FDFF622

source /etc/lsb-release

tee /etc/apt/sources.list.d/ddebs.list >/dev/null <<EOF
# Official Ubuntu repos with debug packages
deb http://ddebs.ubuntu.com ${DISTRIB_CODENAME} main restricted universe multiverse
deb http://ddebs.ubuntu.com ${DISTRIB_CODENAME}-updates main restricted universe multiverse
EOF

2. Try to run `apt-get update` with the new ddebs repo added:

apt-get update

Result is as follows:

root@cecf55687e66:/# apt-get update
Hit:1 http://security.ubuntu.com/ubuntu focal-security InRelease
Hit:2 http://archive.ubuntu.com/ubuntu focal InRelease
Hit:3 http://archive.ubuntu.com/ubuntu focal-updates InRelease
Ign:4 http://ddebs.ubuntu.com focal InRelease
Hit:5 http://archive.ubuntu.com/ubuntu focal-backports InRelease
Ign:6 http://ddebs.ubuntu.com focal-updates InRelease
Get:7 http://ddebs.ubuntu.com focal Release [40.4 kB]
Get:8 http://ddebs.ubuntu.com focal-updates Release [40.5 kB]
Get:9 http://ddebs.ubuntu.com focal Release.gpg [819 B]
Get:10 http://ddebs.ubuntu.com focal-updates Release.gpg [833 B]
Get:11 http://ddebs.ubuntu.com focal/multiverse amd64 Packages [78.2 kB]
Get:12 http://ddebs.ubuntu.com focal/main amd64 Packages [611 kB]
Get:13 http://ddebs.ubuntu.com focal/universe amd64 Packages [5311 kB]
Get:14 http://ddebs.ubuntu.com focal-updates/main amd64 Packages [541 kB]
Err:14 http://ddebs.ubuntu.com focal-updates/main amd64 Packages
  File has unexpected size (542861 != 541199). Mirror sync in progress? [IP: 91.189.91.48 80]
  Hashes of expected file:
   - Filesize:541199 [weak]
   - SHA512:3c5e6622bf70604efc8282709076dcb9bac79731d94360e9d32bb695d6752d1668ddcf56289b713493c484a6e750a184d22004d535242f28bda861dacd4f306f
   - SHA256:84abe9b85ee6b5a9abfe3fb55f9b0f0e917951082325beb849e62942a6b627c5
   - SHA1:f7f88336d741632b05389e420617c6081fd82250 [weak]
   - MD5Sum:ee5201b89e092013f44f7fc2852e73df [weak]
  Release file created at: Mon, 30 May 2022 07:15:43 +0000
Get:15 http://ddebs.ubuntu.com focal-updates/universe amd64 Packages [319 kB]
Get:16 http://ddebs.ubuntu.com focal-updates/multiverse amd64 Packages [3775 B]
Fetched 6405 kB in 11s (570 kB/s)
Reading package lists... Done
E: Failed to fetch http://ddebs.ubuntu.com/dists/focal-updates/main/binary-amd64/Packages.gz File has unexpected size (542861 != 541199). Mirror sync in progress? [IP: 91.189.91.48 80]
   Hashes of expected file:
    - Filesize:541199 [weak]
    - SHA512:3c5e6622bf70604efc8282709076dcb9bac79731d94360e9d32bb695d6752d1668ddcf56289b713493c484a6e750a184d22004d535242f28bda861dacd4f306f
    - SHA256:84abe9b85ee6b5a9abfe3fb55f9b0f0e917951082325beb849e62942a6b627c5
    - SHA1:f7f88336d741632b05389e420617c6081fd82250 [weak]
    - MD5Sum:ee5201b89e092013f44f7fc2852e73df [weak]
   Release file created at: Mon, 30 May 2022 07:15:43 +0000
E: Some index files failed to download. They have been ignored, or old ones used instead.

Further info as per the "Ubuntu bug reporting guidelines":

1) Output from `lsb_release -rd`:
Ubuntu 20.04.4 LTS

2) Output from `apt-cache policy apt`:
  Installed: 2.0.6
  Candidate: 2.0.8
  Version table:
     2.0.8 500
        500 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages
 *** 2.0.6 100
        100 /var/lib/dpkg/status
     2.0.2ubuntu0.2 500
        500 http://security.ubuntu.com/ubuntu focal-security/main amd64 Packages
     2.0.2 500
        500 http://archive.ubuntu.com/ubuntu focal/main amd64 Packages

(note, upgrading to the latest 2.0.8 doesn't make any difference)

3) What I expected to happen:
apt-get update works after adding the "ddebs" repository.

4) What happened instead:
apt-get update fails with a "File has unexpected size" error after adding the "ddebs" repository.

Tags: focal
Revision history for this message
Juan Navarro (j1elo) wrote :

This has been happening since at least as early as May 24th (i.e. last week)

Revision history for this message
Juan Navarro (j1elo) wrote :

As of June 2nd, the repos seem to have been refreshed, and this issue doesn't happen any more. Thanks!

Revision history for this message
Max (m-gorodok) wrote :

Release file for focal-updates debug symbols is out of date again

curl -I http://ddebs.ubuntu.com/dists/focal-updates/main/binary-amd64/Packages.xz
date: Thu, 04 Aug 2022 07:46:41 GMT
last-modified: Tue, 02 Aug 2022 13:44:48 GMT

curl -I http://ddebs.ubuntu.com/dists/focal-updates/Release
last-modified: Wed, 27 Jul 2022 20:48:02 GMT

Please, update server content to consistent state.

I do not know if it is intentional, but TLS (SSL) certificate is not suitable for the ddebs.ubuntu.com host:

curl -I https://ddebs.ubuntu.com/
curl: (60) SSL: no alternative certificate subject name matches target host name 'ddebs.ubuntu.com'

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in apt (Ubuntu):
status: New → Confirmed
Max (m-gorodok)
tags: added: focal
Changed in apt (Ubuntu):
status: Confirmed → Invalid
affects: apt (Ubuntu) → ddeb-retriever
Changed in ddeb-retriever:
status: Invalid → Confirmed
Revision history for this message
Sergey Zolotarev (szx) wrote :

Is there a workaround? I ran into this bug today when trying to install a dbgsym package for the first time (for libglib2.0).

Revision history for this message
Juan Navarro (j1elo) wrote :

Repos got broken again... and it's been like that for more than 4 hours:

apt-get update

Err:11 http://ddebs.ubuntu.com focal-updates/main amd64 Packages
  File has unexpected size (687909 != 687016). Mirror sync in progress? [IP: 185.125.190.18 80]
  Hashes of expected file:
   - Filesize:687016 [weak]
   - SHA512:3bfc1acb6abf21874ceb51c84ce57b711cfb9da65e27d3c36ecb983455f02ff790f30d1f62b853dbfc538c5901d8d46374b5dd0f52fc51ce0e720f450525062e
   - SHA256:6b6711ec07a3bdd02745f7f6df3aa79d382d7ffbceaf5d6a3e5be0f05ac1b86b
   - SHA1:08373d7d9a0f08da9ad6fc5ebac22f987d42f503 [weak]
   - MD5Sum:23099ab5de7705eef9b40de544a3ced8 [weak]
  Release file created at: Tue, 21 Mar 2023 12:47:41 +0000

This happens from time to time and I faced this same error at least twice in the last couple months, so the ddebs repo seems to be broken very frequently.

Revision history for this message
Benjamin Drung (bdrung) wrote :

I see that failure on the apport test suite as well: https://github.com/canonical/apport/actions/runs/4479819348/

The ddeb repository got InRelease files (see bug #2002833) which improved the situation. I wrote another patch to further reduce the race condition: https://code.launchpad.net/~bdrung/ddeb-retriever/+git/main/+merge/437591

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.