Package: apt-cacher-ng Version: 3.7.3-1 Severity: important X-Debbugs-Cc: dpcr...@gmail.com
Dear Maintainer, when doing `apt update` with apt-cacher-ng proxy configured in apt, often am getting error "E: Failed to fetch .../main/source/Sources.xz Hash Sum mismatch". then apt exits with an error: "E: Failed to fetch .../main/binary-armhf/Packages.xz E: Some index files failed to download. They have been ignored, or old ones used instead." Once it is encountered, any subsequent `apt update` fails with same error, after again downloading the affected file(s) from the proxy/cache. Bypassing the proxy (e.g., `sudo apt update -o Acquire::http::proxy=''`) is successful. Inspecting /var/lib/apt/lists/partial/ there will be a ..._Sources.xz.FAILED. Manually replacing this file (Sources.xz) with one downloaded directly from source will also allow the `apt update` to be successful. re: apt client, occurs on Raspberry Pi OS (both buster and bullseye), Debian 11 (bullseye, amd64) and Debian testing. occuring on recent dist versions of apt-cacher-ng (both bullseye and bookworm) running from VMs on amd64 host. Doing some investigation, found some interesting results: - checksum from /var/lib/apt/lists/partial/ .FAILED file matched the reported mismatching checksum reported in apt update error - checksum from using wget to download directly from source matched the expected checksum - inpecting file in /var/cache/apt-cacher-ng/... on apt-cacher-ng host server matches the EXPECTED checksum, meaning that it doesn't seem to be a race - file lengths are the same (always) - binary diff of original compressed files shows huge chunks of the expected file vs. mismatched file are common. and then large continuous chunks mismatch, and then re-sync (are same in both) for huge spans and this repeats. - observed this by generating text representation of the binary/compressed generated using xxd and side-by-side diffs using sdiff EXAMPLE Mismatch Error message E: Failed to fetch http://raspbian.raspberrypi.org/raspbian/dists/bullseye/main/source/Sources.xz Hash Sum mismatch Hashes of expected file: - Filesize:12223504 [weak] - SHA256:ed08efd74766e9d76d73f00b200f37ce41e65a51de927114a1e00a3e1f57cc7c - SHA1:6399b9bc363c2a0d50ede8c871d92bc6d235c9bb [weak] - MD5Sum:3148fbb97feeb4b5fa6b7f1646ab701d [weak] Hashes of received file: - SHA256:89f42ada72c8c8157b78b8ed173f0feedc9d788e8bcf543ddc447dbda6bf6b26 - SHA1:d835932deab7abe06bd0ee3edbf3a7fea415b2aa [weak] - MD5Sum:af435d409c99ba2950364c21886ea710 [weak] - Filesize:12223504 [weak] Last modification reported: Thu, 11 Nov 2021 23:20:36 +0000 Release file created at: Thu, 11 Nov 2021 23:22:43 +0000 E: Failed to fetch http://raspbian.raspberrypi.org/raspbian/dists/bullseye/main/binary-armhf/Packages.xz E: Some index files failed to download. They have been ignored, or old ones used instead. -- Package-specific info: -- System Information: Debian Release: bookworm/sid APT prefers testing APT policy: (500, 'testing') Architecture: amd64 (x86_64) Kernel: Linux 5.14.0-2-amd64 (SMP w/2 CPU threads) Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) (ignored: LC_ALL set to en_US.UTF-8), LANGUAGE not set Shell: /bin/sh linked to /usr/bin/dash Init: systemd (via /run/systemd/system) LSM: AppArmor: enabled Versions of packages apt-cacher-ng depends on: ii adduser 3.118 ii debconf [debconf-2.0] 1.5.79 ii dpkg 1.20.9 ii libbz2-1.0 1.0.8-4 ii libc-ares2 1.18.1-1+b1 ii libc6 2.32-4 ii libevent-2.1-7 2.1.12-stable-1 ii libevent-pthreads-2.1-7 2.1.12-stable-1 ii libfuse2 2.9.9-5 ii libgcc-s1 11.2.0-10 ii liblzma5 5.2.5-2 ii libssl1.1 1.1.1l-1 ii libstdc++6 11.2.0-10 ii libsystemd0 249.5-2 ii libwrap0 7.6.q-31 ii lsb-base 11.1.0 ii zlib1g 1:1.2.11.dfsg-2 Versions of packages apt-cacher-ng recommends: ii ca-certificates 20210119 Versions of packages apt-cacher-ng suggests: pn avahi-daemon <none> pn doc-base <none> -- Configuration Files: /etc/apt-cacher-ng/acng.conf changed [not included] /etc/apt-cacher-ng/security.conf [Errno 13] Permission denied: '/etc/apt-cacher-ng/security.conf' -- debconf information: * apt-cacher-ng/tunnelenable: false apt-cacher-ng/cachedir: keep apt-cacher-ng/bindaddress: keep apt-cacher-ng/proxy: keep apt-cacher-ng/port: keep apt-cacher-ng/gentargetmode: No automated setup