Bug 1059508 - dnf isn't downloading packages (not trying another mirror?)
Summary: dnf isn't downloading packages (not trying another mirror?)
Keywords:
Status: CLOSED WORKSFORME
Alias: None
Product: Fedora
Classification: Fedora
Component: librepo
Version: 20
Hardware: x86_64
OS: Linux
unspecified
urgent
Target Milestone: ---
Assignee: Radek Holy
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-01-30 02:32 UTC by Ankur Sinha (FranciscoD)
Modified: 2015-10-06 02:14 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-01-31 09:26:43 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Ankur Sinha (FranciscoD) 2014-01-30 02:32:54 UTC
Description of problem:
Since a few days, dnf get stuck when downloading packages or metadata. It's just not working..

Version-Release number of selected component (if applicable):
[asinha@ankur-laptop  ~]$ rpm -q dnf librepo
dnf-0.4.12-1.fc20.noarch
librepo-1.5.2-2.fc20.x86_64
[asinha@ankur-laptop  ~]$

How reproducible:
Most of the time

Steps to Reproduce:
1. Clean dnf cache and try to install something
2.
3.

Actual results:
[asinha@ankur-laptop  ~]$ sudo dnf -v install cvs
Config time: 0.007
cachedir: /var/cache/dnf/x86_64/20
Loaded plugins: kickstart, noroot
initialized Noroot plugin
dnf version: 0.4.12
repo: using cache for: updates-testing
repo: using cache for: fedora
not found deltainfo for: Fedora 20 - x86_64
repo: using cache for: rpmfusion-free-updates
not found deltainfo for: RPM Fusion for Fedora 20 - Free - Updates
repo: using cache for: adobe-linux-x86_64
not found deltainfo for: Adobe Systems Incorporated
repo: using cache for: Dropbox
not found deltainfo for: Dropbox Repository
repo: using cache for: rpmfusion-nonfree-updates
not found deltainfo for: RPM Fusion for Fedora 20 - Nonfree - Updates
repo: using cache for: rpmfusion-free
not found deltainfo for: RPM Fusion for Fedora 20 - Free
repo: using cache for: fedora-rawhide-kernel-nodebug
not found deltainfo for: Rawhide kernels built without debugging turned on
repo: using cache for: updates
repo: using cache for: rpmfusion-nonfree
not found deltainfo for: RPM Fusion for Fedora 20 - Nonfree
repo: using cache for: ryanlerch-corebird-unstable
not found deltainfo for: Copr repo for corebird-unstable owned by ryanlerch
hawkey sack setup time: 0.318
Resolving dependencies
--> Starting dependency resolution
---> Package cvs.x86_64 1.11.23-33.fc20 will be installed
--> Finished dependency resolution
Depsolve time: 0.051
Dependencies resolved.

========================================================================================================================================================================
 Package                            Arch                                  Version                                           Repository                             Size
========================================================================================================================================================================
Installing:
 cvs                                x86_64                                1.11.23-33.fc20                                   fedora                                568 k

Transaction Summary
========================================================================================================================================================================
Install  1 Package

cvs-1.11.23-33.fc20.x86_64: sha256 check failed: !581144!e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 vs e28c63b748470f559d31e6d692946e6901e3500bbe5bc7447913a15e473a1e3c
Total download size: 568 k
Installed size: 1.0 M
Is this ok [y/N]: y
Downloading Packages:
cvs-1.11.23-33.fc20.x86_64.rpm                                    0% [                                                                ] ---  B/s |   0  B     --:-- ETA

Expected results:
Should just download the package. I used yumdownloader and it immediately downloaded the package:

[asinha@ankur-laptop  ~]$ yumdownloader cvs
Loaded plugins: langpacks, refresh-packagekit
Dropbox                                                                                                                                          |  951 B  00:00:00
adobe-linux-x86_64                                                                                                                               |  951 B  00:00:00
fedora/20/x86_64/metalink                                                                                                                        | 4.2 kB  00:00:00
fedora-rawhide-kernel-nodebug                                                                                                                    | 2.9 kB  00:00:00
rpmfusion-free                                                                                                                                   | 3.3 kB  00:00:00
rpmfusion-free-updates                                                                                                                           | 3.3 kB  00:00:00
rpmfusion-nonfree                                                                                                                                | 3.3 kB  00:00:00
rpmfusion-nonfree-updates                                                                                                                        | 3.3 kB  00:00:00
ryanlerch-corebird-unstable                                                                                                                      | 3.0 kB  00:00:00
updates/20/x86_64/metalink                                                                                                                       | 3.6 kB  00:00:00
updates                                                                                                                                          | 4.6 kB  00:00:00
updates-testing/20/x86_64/metalink                                                                                                               | 3.9 kB  00:00:00
updates-testing                                                                                                                                  | 4.6 kB  00:00:00
(1/3): fedora-rawhide-kernel-nodebug/x86_64/primary_db                                                                                           | 9.3 kB  00:00:00
(2/3): updates/20/x86_64/primary_db                                                                                                              | 7.1 MB  00:00:01
(3/3): updates-testing/20/x86_64/primary_db                                                                                                      | 2.0 MB  00:00:01
(1/4): updates/20/x86_64/updateinfo                                                                                                              | 635 kB  00:00:00
(2/4): updates-testing/20/x86_64/updateinfo                                                                                                      | 200 kB  00:00:00
updates/20/x86_64/pkgtags      FAILED                                          =======================================================]  0.0 B/s | 1.3 MB  --:--:-- ETA
http://mirror.as24220.net/pub/fedora/linux/updates/20/x86_64/repodata/pkgtags.sqlite.gz: [Errno -1] Metadata file does not match checksum0.0 B/s | 1.3 MB  --:--:-- ETA
Trying other mirror.
updates-testing/20/x86_64/pkgt FAILED
http://mirror.as24220.net/pub/fedora/linux/updates/testing/20/x86_64/repodata/pkgtags.sqlite.gz: [Errno -1] Metadata file does not match checksum| 1.3 MB  --:--:-- ETA
Trying other mirror.
(3/4): updates/20/x86_64/pkgtags                                                                                                                 | 834 kB  00:00:00
(4/4): updates-testing/20/x86_64/pkgtags                                                                                                         | 834 kB  00:00:00
cvs-1.11.23-33.fc20.x86_64.rpm                                                                                                                   | 568 kB  00:00:00

Additional info:
Is it because dnf too hits a bad mirror but doesn't try another mirror?

Comment 1 Ankur Sinha (FranciscoD) 2014-01-30 02:40:18 UTC
Now it worked:

[asinha@ankur-laptop  ~]$ sudo dnf install cvs
Config time: 0.008
cachedir: /var/cache/dnf/x86_64/20
Loaded plugins: kickstart, noroot
initialized Noroot plugin
dnf version: 0.4.12
Command: dnf install cvs
Installroot: /
Base command: install
Extra commands: ['cvs']
repo: downloading from remote: updates-testing
Fedora 20 - x86_64 - Test Updates                                                                                                       5.2 MB/s | 5.1 MB     00:00
repo: downloading from remote: fedora
Fedora 20 - x86_64                                                                                                                      5.2 MB/s |  36 MB     00:06
not found deltainfo for: Fedora 20 - x86_64
repo: downloading from remote: rpmfusion-free-updates
RPM Fusion for Fedora 20 - Free - Updates                                                                                               2.4 MB/s | 143 kB     00:00
not found deltainfo for: RPM Fusion for Fedora 20 - Free - Updates
repo: downloading from remote: adobe-linux-x86_64
Adobe Systems Incorporated                                                                                                              1.3 kB/s | 1.8 kB     00:01
not found deltainfo for: Adobe Systems Incorporated
repo: downloading from remote: Dropbox
Dropbox Repository                                                                                                                      7.6 kB/s | 2.4 kB     00:00
not found deltainfo for: Dropbox Repository
repo: downloading from remote: rpmfusion-nonfree-updates
determining the fastest mirror (1 hosts).. done.
RPM Fusion for Fedora 20 - Nonfree - Updates                                                                                            1.4 MB/s |  37 kB     00:00
not found deltainfo for: RPM Fusion for Fedora 20 - Nonfree - Updates
repo: downloading from remote: rpmfusion-free
RPM Fusion for Fedora 20 - Free                                                                                                         3.5 MB/s | 487 kB     00:00
not found deltainfo for: RPM Fusion for Fedora 20 - Free
repo: downloading from remote: fedora-rawhide-kernel-nodebug
Rawhide kernels built without debugging turned on                                                                                       158 kB/s | 211 kB     00:01
not found deltainfo for: Rawhide kernels built without debugging turned on
repo: downloading from remote: updates
Fedora 20 - x86_64 - Updates                                                                                                            4.9 MB/s |  14 MB     00:02
repo: downloading from remote: rpmfusion-nonfree
RPM Fusion for Fedora 20 - Nonfree                                                                                                      3.2 MB/s | 289 kB     00:00
not found deltainfo for: RPM Fusion for Fedora 20 - Nonfree
repo: downloading from remote: ryanlerch-corebird-unstable
Copr repo for corebird-unstable owned by ryanlerch                                                                                      7.0 kB/s | 2.9 kB     00:00
not found deltainfo for: Copr repo for corebird-unstable owned by ryanlerch
hawkey sack setup time: 56.262
Resolving dependencies
--> Starting dependency resolution
---> Package cvs.x86_64 1.11.23-33.fc20 will be installed
--> Finished dependency resolution
Depsolve time: 0.054
Dependencies resolved.

========================================================================================================================================================================
 Package                            Arch                                  Version                                           Repository                             Size
========================================================================================================================================================================
Installing:
 cvs                                x86_64                                1.11.23-33.fc20                                   fedora                                568 k

Transaction Summary
========================================================================================================================================================================
Install  1 Package

Total download size: 568 k
Installed size: 1.0 M
Is this ok [y/N]: y
Downloading Packages:
cvs-1.11.23-33.fc20.x86_64.rpm                                                                                                          3.4 MB/s | 568 kB     00:00
populate_rpm_ts: install: cvs-1.11.23-33.fc20.x86_64
Running transaction check
Transaction check succeeded.
Transaction check time: 0.054
Running transaction test
Transaction test succeeded.
Transaction test time: 0.161
Running transaction
runTransaction: rpm transaction start.
  Installing  : cvs-1.11.23-33.fc20.x86_64                                                                                                                          1/1
runTransaction: rpm transaction over.
  Verifying   : cvs-1.11.23-33.fc20.x86_64                                                                                                                          1/1
VerifyTransaction time: 0.963
/var/cache/dnf/x86_64/20/fedora/packages/cvs-1.11.23-33.fc20.x86_64.rpm removed
Transaction time: 2.883

Installed:
  cvs.x86_64 1.11.23-33.fc20

Complete!
[asinha@ankur-laptop  ~]$


I added some stuff to dnf.conf.

[asinha@ankur-laptop  ~]$ cat /etc/dnf/dnf.conf
[main]
gpgcheck=1
installonly_limit=5
clean_requirements_on_remove=true
debuglevel=10
skip_if_unavailable=true
fastestmirror=true
[asinha@ankur-laptop  ~]$

Comment 2 Ales Kozumplik 2014-01-30 07:03:19 UTC
Radek can you please take a look? I think zpavlas and tmlcoch (the librepo upstream maintainer) might have some insights into this situation.

Comment 3 Zdeněk Pavlas 2014-01-30 11:19:23 UTC
> cvs-1.11.23-33.fc20.x86_64: sha256 check failed: !581144!e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 vs e28c63b748470f559d31e6d692946e6901e3500bbe5bc7447913a15e473a1e3c

This indicates there already was an incomplete package downloaded.. Seems there's a librepo problem with resuming a partial download.  Could you run some HTTP monitoring tool (httpry, tcpflow, tcpdump, wireshark ..) and check the output?

Comment 4 Ankur Sinha (FranciscoD) 2014-01-31 01:09:17 UTC
(In reply to Zdeněk Pavlas from comment #3)
> > cvs-1.11.23-33.fc20.x86_64: sha256 check failed: !581144!e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 vs e28c63b748470f559d31e6d692946e6901e3500bbe5bc7447913a15e473a1e3c
> 
> This indicates there already was an incomplete package downloaded.. Seems
> there's a librepo problem with resuming a partial download.  Could you run
> some HTTP monitoring tool (httpry, tcpflow, tcpdump, wireshark ..) and check
> the output?

If you give me instructions, I'll be happy to give you the info you need. I'm not much of a network guy myself :)

Btw, I've since moved on to using the nightlies and it hasn't happened again:

[asinha@ankur-laptop  ~]$ rpm -q dnf librepo hawkey
dnf-0.4.12-1.git3584018.fc20.noarch
librepo-1.5.2-2.gitb9bafb7.fc20.x86_64
hawkey-0.4.8-1.gitd07d8f7.fc20.x86_64
[asinha@ankur-laptop  ~]$


I'll keep an eye out for it though.


Thanks, 
Ankur

Comment 5 Zdeněk Pavlas 2014-01-31 09:26:43 UTC
I've tried to reproduce this problem with the latest librepo from github and failed, too. Please reopen if you could reproduce this. In cases dnf seems stuck, the following info usually helps to pinpoint the problem:

1) find the PID, check the CPU usage, if the process loops in userspace, or blocks on I/O (ps, top, ...).

2) strace -p <PID>, to see the syscall it's stucked in.

3) if it involves a file, check /proc/<PID>/fd/<FD>.

4) Esp. when the problem is reproducible, start "httpry -i <outgoing network interface>" in another window and reproduce the problem. The last few request and replies should give a hint what went wrong.


Note You need to log in before you can comment on or make changes to this bug.