Bug 1099101

Summary: 7.0 RC Regression: urlgrabber terminates yum upon connection interruption thinking it's been aborted
Product: Red Hat Enterprise Linux 7 Reporter: Lubomir Rintel <lkundrak>
Component: python-urlgrabberAssignee: James Antill <james.antill>
Status: CLOSED ERRATA QA Contact: Martin Frodl <mfrodl>
Severity: unspecified Docs Contact:
Priority: high    
Version: 7.0CC: h.reindl, isenfeld, mfrodl, tis, toracat, vmukhame
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: python-urlgrabber-3.10-5.el7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-03-05 10:56:50 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:
Bug Depends On:    
Bug Blocks: 1110703    

Description Lubomir Rintel 2014-05-19 13:38:18 UTC
Description of problem:

Recent addition to urlgrabber is broken (quite obviously):
http://yum.baseurl.org/gitweb?p=urlgrabber.git;a=commit;h=bf0a0be71373dec515bbb54e0613a3b9b0c00b04

I strongly suggest it's reverted.

55 and 56 errors are not keyboard interruptions and should not be propagated as such. The bug reference is broken (a private bug), I presume it was done to combat yum ctrl+c handling. It was not done correctly -- curl should either be told not to hook INT signal or use a different error to signal the condition.

With the patch applied, with repository not responding yum thinks user aborted it:

[root@lr-death-to-all ~]# yum -v -d 8 install perl-LWP-Protocol-https-6.04-4.el7.noarch
Not loading "rhnplugin" plugin, as it is disabled
Loading "fastestmirror" plugin
Loading "priorities" plugin
Loading "product-id" plugin
Loading "subscription-manager" plugin
Loading "versionlock" plugin
Updating Subscription Management repositories.
Unable to read consumer identity
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
Config time: 0.090
Yum version: 3.4.3
rpmdb time: 0.000
Setting up Package Sacks

 Current download cancelled, interrupt (ctrl-c) again within two seconds
to exit.

This is very confusing and given it aborts yum even with skip_if_unavailable=1, it makes it possible to lock out package management, making it impossible to address an issue with a package update.

Version-Release number of selected component (if applicable):

python-urlgrabber-3.10-4.el7.noarch

How reproducible:

Always

Steps to Reproduce:
1. Start a server that terminates connection immediately after accepting a client
2. Add it as a repository baseurl to yum
3. Run yum

Additional info:

strace:

2334  sendto(10, "GET /gdc-dev-us-yum/7/master/repodata/repomd.xml HTTP/1.1\r\nUser-Agent: urlgrabber/3.10 yum/3.4.3\r\nHost: localhost:3333\r\nAccept: */*\r\n\r\n", 135, MSG_NOSIGNAL, NULL, 0) = 135
2334  poll([{fd=10, events=POLLIN|POLLPRI|POLLRDNORM|POLLRDBAND}], 1, 0) = 0 (Timeout)
2334  poll([{fd=10, events=POLLIN}], 1, 1000) = 1 ([{fd=10, revents=POLLIN|POLLERR|POLLHUP}])
2334  poll([{fd=10, events=POLLIN|POLLPRI|POLLRDNORM|POLLRDBAND}], 1, 0) = 1 ([{fd=10, revents=POLLIN|POLLRDNORM|POLLERR|POLLHUP}])
2334  recvfrom(10, 0xf35f80, 16384, 0, 0, 0) = -1 ECONNRESET (Connection reset by peer)
2334  close(10)                         = 0

^^^ this is where the connection terminates

Comment 2 Valentina Mukhamedzhanova 2014-08-18 09:54:32 UTC
*** Bug 1091740 has been marked as a duplicate of this bug. ***

Comment 8 errata-xmlrpc 2015-03-05 10:56:50 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2015-0447.html