Bug 1268301

Summary: UX: dnf reports checksum doesn't match when downloading, won't install anything
Product: [Fedora] Fedora Reporter: Justin Yackoski <justin>
Component: dnfAssignee: rpm-software-management
Status: CLOSED UPSTREAM QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: low    
Version: 26CC: jmracek, justin, mluscon, packaging-team-maint, pnemade, tim.lauridsen, vmukhame
Target Milestone: ---Keywords: Triaged
Target Release: ---   
Hardware: armv7hl   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-06-27 07:27:39 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Justin Yackoski 2015-10-02 13:20:30 UTC
Description of problem:
dnf does not install any packages.  It reports:
error: Downloading successful, but checksum doesn't match.  Either dnf is calculating wrong, or the mirrors have bad checksums.  Seems to be the former.

Version-Release number of selected component (if applicable):
DNF 1.1.0.  I am using Fedora-Minimal-armhfp-23_Beta-1-sda.raw.xz downloaded from the arm fedora prereleases, haven't updated anything (because of this issue).

How reproducible:
Always.  Tried two separate fresh installs of that image about a day apart in case it was due to some cache issue that wasn't clearing properly, etc.

Steps to Reproduce:
1. install the 23 beta image, login
2. sudo dnf -v install wget
3. (same error regardless of what package you try to install)

Actual results:
[sdna@localhost ~]$ sudo dnf -v install wget                                    cachedir: /var/cache/dnf
Loaded plugins: Query, config-manager, generate_completion_cache, copr, needs-restarting, reposync, protected_packages, debuginfo-install, download, playground, builddep, noroot
DNF version: 1.1.0
Fedora 23 - armhfp - Updates                    1.1 kB/s | 257  B     00:00
not found deltainfo for: Fedora 23 - armhfp - Updates
not found updateinfo for: Fedora 23 - armhfp - Updates
Fedora 23 - armhfp - Test Updates               1.9 MB/s |  16 MB     00:08
error: Downloading successful, but checksum doesn't match. Calculated: 89c0c5f9639ede770c7e4a2fdd829596ffb1ff1f450ccca308261b619343b42c(sha256)  Expected: 04531d4fa744f67c01735560303207c0f5b910ff841dac588b9a057542d8e786(sha256)  (http://mirror.pnl.gov/fedora/linux/development/23/armhfp/os/repodata/04531d4fa744f67c01735560303207c0f5b910ff841dac588b9a057542d8e786-primary.xml.gz).
error: Downloading successful, but checksum doesn't match. Calculated: 5edc30bb05d127e56f20e07c4b8fca5f9753b09de36d2be9156e8e38625f4661(sha256)  Expected: 548343e949e295688784bf882c9e3f135c2b1a98db8f065f9056365c733a2185(sha256)  (http://mirror.pnl.gov/fedora/linux/development/23/armhfp/os/repodata/548343e949e295688784bf882c9e3f135c2b1a98db8f065f9056365c733a2185-filelists.xml.gz).
error: Downloading successful, but checksum doesn't match. Calculated: 7231e6d51ca250fd805fd81de9c8f6cf504b39fc7f8d9752bf6fef4a7df59875(sha256)  Expected: 548343e949e295688784bf882c9e3f135c2b1a98db8f065f9056365c733a2185(sha256)  (http://mirror.nexcess.net/fedora/development/23/armhfp/os/repodata/548343e949e295688784bf882c9e3f135c2b1a98db8f065f9056365c733a2185-filelists.xml.gz).
error: Downloading successful, but checksum doesn't match. Calculated: 1ba9c173aebe91dc52b18c2a6bd003211014f4e4af177ad1da780c03d5edb243(sha256)  Expected: 548343e949e295688784bf882c9e3f135c2b1a98db8f065f9056365c733a2185(sha256)  (ftp://mirror.nexcess.net/fedora/development/23/armhfp/os/repodata/548343e949e295688784bf882c9e3f135c2b1a98db8f065f9056365c733a2185-filelists.xml.gz).
error: Downloading successful, but checksum doesn't match. Calculated: c9d608ee34e22cc127a748d735ebc56bbe3bc92974974b4d97e602094526b421(sha256)  Expected: 548343e949e295688784bf882c9e3f135c2b1a98db8f065f9056365c733a2185(sha256)  (http://mirror.sfo12.us.leaseweb.net/fedora/linux/development/23/armhfp/os/repodata/548343e949e295688784bf882c9e3f135c2b1a98db8f065f9056365c733a2185-filelists.xml.gz).
^CTerminated.rmhfp   59% [===========-        ] 518 kB/s |  23 MB     00:31 ETA

*the same error occurs many times, for every single mirror tried.  I let it sit for a long time, it never finds any that is correct.

Expected results:
the package should be installed 

Additional info:
Doing a manual curl of the file and running sha256, I see that the checksum calculations are weird.

On the arm fc23b1 device:
[sdna@localhost ~]$ curl http://mirror.pnl.gov/fedora/linux/development/23/armhfp/os/repodata/04531d4fa744f67c01735560303207c0f5b910ff841dac588b9a057542d8e786-primary.xml.gz > test.gz
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 10.3M  100 10.3M    0     0  1420k      0  0:00:07  0:00:07 --:--:-- 1347k
[sdna@localhost ~]$ sha256sum test.gz
537ffe4036322ba15be429d6118134ab7fdc97d9bb3049869fe9eab61e1a1830  test.gz
[sdna@localhost ~]$

On my ubuntu 14.04 PC:
me@mypc:~⟫ wget http://mirror.pnl.gov/fedora/linux/development/23/armhfp/os/repodata/04531d4fa744f67c01735560303207c0f5b910ff841dac588b9a057542d8e786-primary.xml.gz
--2015-10-02 09:15:56--  http://mirror.pnl.gov/fedora/linux/development/23/armhfp/os/repodata/04531d4fa744f67c01735560303207c0f5b910ff841dac588b9a057542d8e786-primary.xml.gz
Resolving mirror.pnl.gov (mirror.pnl.gov)... 192.101.102.2
Connecting to mirror.pnl.gov (mirror.pnl.gov)|192.101.102.2|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 10837525 (10M) [application/x-gzip]
Saving to: ‘04531d4fa744f67c01735560303207c0f5b910ff841dac588b9a057542d8e786-primary.xml.gz’

100%[=====================================================================================================================================================================>] 10,837,525  2.82MB/s   in 6.0s   

2015-10-02 09:16:02 (1.71 MB/s) - ‘04531d4fa744f67c01735560303207c0f5b910ff841dac588b9a057542d8e786-primary.xml.gz’ saved [10837525/10837525]

me@mypc:~⟫ sha256sum 04531d4fa744f67c01735560303207c0f5b910ff841dac588b9a057542d8e786-primary.xml.gz 
04531d4fa744f67c01735560303207c0f5b910ff841dac588b9a057542d8e786  04531d4fa744f67c01735560303207c0f5b910ff841dac588b9a057542d8e786-primary.xml.gz

Comment 1 Justin Yackoski 2015-10-02 13:26:48 UTC
Another wrinkle, the file dnf has in the cache seems to have a good checksum:

(Note that I have previously done a dnf clean all, and manually deleted /var/cache/dnf/* to no avail)

[sdna@localhost ~]$ find /var/cache/dnf/
/var/cache/dnf/
/var/cache/dnf/updates.solv
/var/cache/dnf/updates-testing-presto.solvx
/var/cache/dnf/last_makecache
/var/cache/dnf/updates-testing-1d530b99b7b2db06
/var/cache/dnf/updates-testing-1d530b99b7b2db06/repodata
/var/cache/dnf/updates-testing-1d530b99b7b2db06/repodata/fe58153d57c9c3f5e416714d1235da89da1213a01b6585a2b026d5b81eee7241-comps-f23.xml.xz
/var/cache/dnf/updates-testing-1d530b99b7b2db06/repodata/repomd.xml
/var/cache/dnf/updates-testing-1d530b99b7b2db06/repodata/7bc58d5e3d2ecb9a61e8accd4718145015809c9675fe07de5bb8457269e25088-filelists.xml.gz
/var/cache/dnf/updates-testing-1d530b99b7b2db06/repodata/ee347b690992204d16418688fef969be658cc2763a262d930e0d7a99fcc5ed22-updateinfo.xml.xz
/var/cache/dnf/updates-testing-1d530b99b7b2db06/repodata/d4ac481ee81cb7a71b48b106a1fdf9f5b6ccafd4c54b193a8ca4da4cbf2ef423-prestodelta.xml.xz
/var/cache/dnf/updates-testing-1d530b99b7b2db06/repodata/60211612947a6d9114578d5699fc4e9212a10df32198f26b34e1d75fa75c0160-primary.xml.gz
/var/cache/dnf/updates-testing-1d530b99b7b2db06/metalink.xml
/var/cache/dnf/@System.solv
/var/cache/dnf/expired_repos.json
/var/cache/dnf/updates-testing.solv
/var/cache/dnf/updates-filenames.solvx
/var/cache/dnf/updates-testing-updateinfo.solvx
/var/cache/dnf/updates-d14f1592916ab8e0
/var/cache/dnf/updates-d14f1592916ab8e0/repodata
/var/cache/dnf/updates-d14f1592916ab8e0/repodata/dabe2ce5481d23de1f4f52bdcfee0f9af98316c9e0de2ce8123adeefa0dd08b9-primary.xml.gz
/var/cache/dnf/updates-d14f1592916ab8e0/repodata/repomd.xml
/var/cache/dnf/updates-d14f1592916ab8e0/repodata/401dc19bda88c82c403423fb835844d64345f7e95f5b9835888189c03834cc93-filelists.xml.gz
/var/cache/dnf/updates-d14f1592916ab8e0/metalink.xml
/var/cache/dnf/updates-testing-filenames.solvx
/var/cache/dnf/.gpgkeyschecked.yum
[sdna@localhost ~]$ sha256sum /var/cache/dnf/updates-testing-1d530b99b7b2db06/repodata/60211612947a6d9114578d5699fc4e9212a10df32198f26b34e1d75fa75c0160-primary.xml.gz
60211612947a6d9114578d5699fc4e9212a10df32198f26b34e1d75fa75c0160  /var/cache/dnf/updates-testing-1d530b99b7b2db06/repodata/60211612947a6d9114578d5699fc4e9212a10df32198f26b34e1d75fa75c0160-primary.xml.gz
[sdna@localhost ~]$

Comment 2 Honza Silhan 2015-10-13 13:48:43 UTC
Do you still experience this? It could be possible mirrors were not synchronized at that time.

Comment 3 Justin Yackoski 2015-10-16 19:51:42 UTC
Yes it is still broken:

[me@localhost ~]$ sudo rm -rf /var/cache/dnf/*
[me@localhost ~]$ sudo dnf -v install wget
cachedir: /var/cache/dnf
Loaded plugins: config-manager, generate_completion_cache, copr, debuginfo-install, download, protected_packages, builddep, needs-restarting, noroot, playground, reposync, Query
DNF version: 1.1.1
error: Downloading successful, but checksum doesn't match. Calculated: c7f4bb825754d586309e39a8ecbf2ec7fe1f7fc0d1647af6d4d915f32a46c25d(sha256)  Expected: 1d3e207a927a144f4402aababfb9b9bade648bb0d8d8e2bf4236fbfcd5e086af(sha256)  (http://mirror.symnds.com/distributions/fedora/development/23/armhfp/os/repodata/1d3e207a927a144f4402aababfb9b9bade648bb0d8d8e2bf4236fbfcd5e086af-filelists.xml.gz).
error: Curl error (7): Couldn't connect to server for ftp://mirror.symnds.com/distributions/fedora/development/23/armhfp/os/repodata/1d3e207a927a144f4402aababfb9b9bade648bb0d8d8e2bf4236fbfcd5e086af-filelists.xml.gz [Failed to connect to mirror.symnds.com port 21: Connection refused] (ftp://mirror.symnds.com/distributions/fedora/development/23/armhfp/os/repodata/1d3e207a927a144f4402aababfb9b9bade648bb0d8d8e2bf4236fbfcd5e086af-filelists.xml.gz).
error: Downloading successful, but checksum doesn't match. Calculated: 7817275f6bb12abb00739e3d7633586066236dec345c6d13e706bc925453b71c(sha256)  Expected: 1d3e207a927a144f4402aababfb9b9bade648bb0d8d8e2bf4236fbfcd5e086af(sha256)  (ftp://ftp.gtlib.gatech.edu/pub/fedora.redhat/linux/development/23/armhfp/os/repodata/1d3e207a927a144f4402aababfb9b9bade648bb0d8d8e2bf4236fbfcd5e086af-filelists.xml.gz).
Fedora 23 - armhfp   27% [=====               ] 3.1 MB/s |  11 MB     00:08 ETA
Fedora 23 - armhfp   27% [=====               ] 3.1 MB/s |  11 MB     00:08 ETA

error: Curl error (28): Timeout was reached for http://www.gtlib.gatech.edu/pub/fedora.redhat/linux/development/23/armhfp/os/repodata/1d3e207a927a144f4402aababfb9b9bade648bb0d8d8e2bf4236fbfcd5e086af-filelists.xml.gz [Connection timed out after 120001 milliseconds] (http://www.gtlib.gatech.edu/pub/fedora.redhat/linux/development/23/armhfp/os/repodata/1d3e207a927a144f4402aababfb9b9bade648bb0d8d8e2bf4236fbfcd5e086af-filelists.xml.gz).
error: Curl error (28): Timeout was reached for http://mirror.pnl.gov/fedora/linux/development/23/armhfp/os/repodata/1d3e207a927a144f4402aababfb9b9bade648bb0d8d8e2bf4236fbfcd5e086af-filelists.xml.gz [Operation too slow. Less than 1000 bytes/sec transferred the last 120 seconds] (http://mirror.pnl.gov/fedora/linux/development/23/armhfp/os/repodata/1d3e207a927a144f4402aababfb9b9bade648bb0d8d8e2bf4236fbfcd5e086af-filelists.xml.gz).
error: Downloading successful, but checksum doesn't match. Calculated: 398a78eb33bb72db8f0bad6d9a6cc07687980eb94d3bd3c0e701a75f3f6564f9(sha256)  Expected: 1d3e207a927a144f4402aababfb9b9bade648bb0d8d8e2bf4236fbfcd5e086af(sha256)  (ftp://ftp.linux.ncsu.edu/pub/fedora/linux/development/23/armhfp/os/repodata/1d3e207a927a144f4402aababfb9b9bade648bb0d8d8e2bf4236fbfcd5e086af-filelists.xml.gz).
error: Downloading successful, but checksum doesn't match. Calculated: cb8c72153696f8af50f867b2b3ff4d52c2dd2eea0702abbbbbc19564dd8d55e8(sha256)  Expected: 1d3e207a927a144f4402aababfb9b9bade648bb0d8d8e2bf4236fbfcd5e086af(sha256)  (http://ftp.linux.ncsu.edu/pub/fedora/linux/development/23/armhfp/os/repodata/1d3e207a927a144f4402aababfb9b9bade648bb0d8d8e2bf4236fbfcd5e086af-filelists.xml.gz).
error: Downloading successful, but checksum doesn't match. Calculated: d753965571d5468f9aa17b3908ec169c75840c7f692b4f0c998376411ed08071(sha256)  Expected: 1d3e207a927a144f4402aababfb9b9bade648bb0d8d8e2bf4236fbfcd5e086af(sha256)  (http://mirror.cogentco.com/pub/linux/fedora/linux/development/23/armhfp/os/repodata/1d3e207a927a144f4402aababfb9b9bade648bb0d8d8e2bf4236fbfcd5e086af-filelists.xml.gz).
error: Downloading successful, but checksum doesn't match. Calculated: 1b092ebfa9e42235b05a61025b73ec6ab45cd8932c9b1131370ac33333f79bba(sha256)  Expected: 1d3e207a927a144f4402aababfb9b9bade648bb0d8d8e2bf4236fbfcd5e086af(sha256)  (ftp://mirror.cogentco.com/pub/linux/fedora/linux/development/23/armhfp/os/repodata/1d3e207a927a144f4402aababfb9b9bade648bb0d8d8e2bf4236fbfcd5e086af-filelists.xml.gz).
error: Downloading successful, but checksum doesn't match. Calculated: 44ef395aa957f37797c999600d7ad2949f4ca5cbb25c33861be0c68b89669fcf(sha256)  Expected: 1d3e207a927a144f4402aababfb9b9bade648bb0d8d8e2bf4236fbfcd5e086af(sha256)  (ftp://mirror.lstn.net/fedora/development/23/armhfp/os/repodata/1d3e207a927a144f4402aababfb9b9bade648bb0d8d8e2bf4236fbfcd5e086af-filelists.xml.gz).
error: Downloading successful, but checksum doesn't match. Calculated: 80079385248bd0f33715c8c6c02a6fa7e7d677f5264d2f877599dc2ed612a21e(sha256)  Expected: 1d3e207a927a144f4402aababfb9b9bade648bb0d8d8e2bf4236fbfcd5e086af(sha256)  (http://fedora.mirror.lstn.net/development/23/armhfp/os/repodata/1d3e207a927a144f4402aababfb9b9bade648bb0d8d8e2bf4236fbfcd5e086af-filelists.xml.gz).
error: Downloading successful, but checksum doesn't match. Calculated: 51d96d78eb1e21cd9a7c4ab8036ca24468e5aaf1ffd68e94a9676646d06787f0(sha256)  Expected: 1d3e207a927a144f4402aababfb9b9bade648bb0d8d8e2bf4236fbfcd5e086af(sha256)  (ftp://fedora.mirrors.pair.com/fedora/linux/development/23/armhfp/os/repodata/1d3e207a927a144f4402aababfb9b9bade648bb0d8d8e2bf4236fbfcd5e086af-filelists.xml.gz).
error: Downloading successful, but checksum doesn't match. Calculated: b828fcd4127c0e470cb66dae8e05c5fff6b763c4ca0a730f6779c9d51e2a66b6(sha256)  Expected: 1d3e207a927a144f4402aababfb9b9bade648bb0d8d8e2bf4236fbfcd5e086af(sha256)  (http://fedora.mirrors.pair.com/linux/development/23/armhfp/os/repodata/1d3e207a927a144f4402aababfb9b9bade648bb0d8d8e2bf4236fbfcd5e086af-filelists.xml.gz).
error: Downloading successful, but checksum doesn't match. Calculated: ea2448c663d64e840b1576548b2882c3337a5b20c956105c5aaab7f3b07cc38e(sha256)  Expected: 1d3e207a927a144f4402aababfb9b9bade648bb0d8d8e2bf4236fbfcd5e086af(sha256)  (ftp://fedora.mirrors.tds.net/pub/fedora/development/23/armhfp/os/repodata/1d3e207a927a144f4402aababfb9b9bade648bb0d8d8e2bf4236fbfcd5e086af-filelists.xml.gz).
error: Downloading successful, but checksum doesn't match. Calculated: cabb5f3594bd296032d251fc5ddc673da4e7d13a7fb26a002ac005ed9a88b0bc(sha256)  Expected: 1d3e207a927a144f4402aababfb9b9bade648bb0d8d8e2bf4236fbfcd5e086af(sha256)  (http://fedora.mirrors.tds.net/pub/fedora/development/23/armhfp/os/repodata/1d3e207a927a144f4402aababfb9b9bade648bb0d8d8e2bf4236fbfcd5e086af-filelists.xml.gz).
error: Downloading successful, but checksum doesn't match. Calculated: df989d43f2e0d68da3fd2dd24ad1e1d7ff5bd9f1f61fd2e9bb112504c5846efa(sha256)  Expected: 1d3e207a927a144f4402aababfb9b9bade648bb0d8d8e2bf4236fbfcd5e086af(sha256)  (ftp://mirror.web-ster.com/fedora/development/23/armhfp/os/repodata/1d3e207a927a144f4402aababfb9b9bade648bb0d8d8e2bf4236fbfcd5e086af-filelists.xml.gz).
error: Downloading successful, but checksum doesn't match. Calculated: 3029e3eb8c3b495a15d2a1a07e45b54c6a44ed580b4230840781b7771be00576(sha256)  Expected: 1d3e207a927a144f4402aababfb9b9bade648bb0d8d8e2bf4236fbfcd5e086af(sha256)  (http://mirror.web-ster.com/fedora/development/23/armhfp/os/repodata/1d3e207a927a144f4402aababfb9b9bade648bb0d8d8e2bf4236fbfcd5e086af-filelists.xml.gz).
error: Downloading successful, but checksum doesn't match. Calculated: 1748c0003e52e3b56353f0898a4f4073cea88f7f05331c9acc1f272a800eabb1(sha256)  Expected: 1d3e207a927a144f4402aababfb9b9bade648bb0d8d8e2bf4236fbfcd5e086af(sha256)  (http://mirrors.syringanetworks.net/fedora/development/23/armhfp/os/repodata/1d3e207a927a144f4402aababfb9b9bade648bb0d8d8e2bf4236fbfcd5e086af-filelists.xml.gz).
error: Downloading successful, but checksum doesn't match. Calculated: ac5951ce0fffb7f5b228530f274789d42a11d19730a3733967cc1c3baedc14d3(sha256)  Expected: 1d3e207a927a144f4402aababfb9b9bade648bb0d8d8e2bf4236fbfcd5e086af(sha256)  (ftp://mirrors.syringanetworks.net/fedora/development/23/armhfp/os/repodata/1d3e207a927a144f4402aababfb9b9bade648bb0d8d8e2bf4236fbfcd5e086af-filelists.xml.gz).

Comment 4 Fedora Admin XMLRPC Client 2016-07-08 09:37:40 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 5 Fedora End Of Life 2016-11-24 12:40:58 UTC
This message is a reminder that Fedora 23 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 23. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '23'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 23 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 6 Honza Silhan 2016-11-30 09:18:42 UTC
DNF could write more understandable error for normal user. E.g.: "Downloaded packages were corrupted. Try to repeat DNF transaction later.". The checksum numbers error message should still go into log though.

Comment 7 Fedora End Of Life 2017-02-28 09:49:38 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 26 development cycle.
Changing version to '26'.

Comment 8 Jaroslav Mracek 2017-06-27 07:27:39 UTC
Due to that we do not have other reports with same problem since Fedora 23, I do believe that the problem was already solved (in version dnf-2.5.1). We also changed the problem reporter therefore the bug I should be fixed in upstream. Please if anyone will be able to reproduce the issue with dnf-2.5.1+ that is available for rawhide, Fedora 26 or from our testing repository for Fedora 24+ (dnf copr enable rpmsoftwaremanagement/dnf-nightly), don't hesitate to reopen the bug report and I will investigate it.