Red Hat Bugzilla – Bug 487680
DNS can hang on slow internet connections, making Control-C less usable
Last modified: 2014-01-21 18:08:17 EST
Description of problem:
Ctrl-C doesn't close yum when on a slow connection [e.g. currently my internet is shaped at around 120kbps (yum shows downloads around 15k/s).]
Problem doesn't really seem to happen when I'm on normal higher speeds.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. yum -y install foo
2. yum starts to download
3. press Ctrl-C
Install 59 Package(s)
Update 91 Package(s)
Remove 0 Package(s)
Total size: 155 M
Total download size: 113 M
Is this ok [y/N]: y
(1/29): htmlview-4.0.0-3.fc7.noarch.rpm | 8.8 kB 00:00
(2/29): fprintd-pam-0.1-7.git04fd09cfa.fc11.i386.rpm | 10 kB 00:00
(3/29): fprintd-0.1-7.git04fd09cfa.fc11.i386.rpm | 39 kB 00:02
(4/29): libusb1-1.0.0- (0%) 15% [=- ] 0.0 B/s | 8.0 kB --:-- ETA (4/29): libusb1-1.0.0-1.fc11.i386.rpm | 8.0 kB 00:00
Current download cancelled, interrupt (ctrl-c) again within two seconds to exit.
Hitting ctrl-c again works as advertised.
There isn't much we can do about this, eventually you should hit a mirror where the DNS resolves within a normal amount of time. Running a local caching DNS server will also help.
I must say that I come up against this bug constantly, including when on a wireless connection on my laptop.
The following has almost become muscle memory as a workaround for this buggy behaviour.
sudo kill -9 <pid>
Is a fix, to have a tiny sleep before the next mirror is contacted, so that control-c actually does works.
I think it is really bad behaviour to have information given to the user
"Current download cancelled, interrupt (ctrl-c) again within two seconds to
that isn't correct.
Either one lookup gets stuck, or holding ctrl-c down goes through every mirror, instead of cancelling the yum command.