Bug 460694 - urllib2 fd leak, with r.recv = r.read
urllib2 fd leak, with r.recv = r.read
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: python (Show other bugs)
All Linux
medium Severity medium
: rc
: ---
Assigned To: James Antill
Alexander Todorov
: 468282 (view as bug list)
Depends On: 471224
  Show dependency treegraph
Reported: 2008-08-29 14:53 EDT by James Antill
Modified: 2013-04-12 12:43 EDT (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2009-01-20 15:34:39 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description James Antill 2008-08-29 14:53:40 EDT
Description of problem:

 This is a local tracker for the upstream bug:


...I've made a patch for it, and we could test that.

 It was found by using yum/reposync, and being unlucky and not getting a GC cellect.

 This varient doesn't really affect RHEL/RHN as we are really hit by 460692, due to using SSL. However non-RHN repos. like EPEL, etc. will hit this varient.

 I'm going to propose it for 5.3, as python is an approved component, and we can at least test the fix to see what happens.
Comment 1 James Antill 2008-08-29 14:54:28 EDT
 That's bug 460692
Comment 2 RHEL Product and Program Management 2008-08-29 15:12:29 EDT
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update
Comment 3 Charles Duffy 2008-08-29 16:30:20 EDT
This bug is of interest to Dell MessageOne (related to internal ticket PUP-283); adding appropriate CCs.
Comment 8 Petr Šplíchal 2008-10-21 08:59:15 EDT
Well, the reproducer works ok with the new version of python package. But the issue is still present when tested with yumdownloader or reposync. There are as many file descriptors opened as there are packages downloaded (for example 333 packages, 337 opened file descriptors). When the number of downloaded packages exceeds current ulimit settings, it fails with:

IOError: [Errno 24] Too many open files

This can be reproduced with any repository which allows keep-alive connections. With keep-alive disabled the issue is not present. I don't know how many repositories allow keep-alive connections and are therefore affected with this.
Comment 10 Charles Duffy 2008-10-21 12:44:38 EDT

When testing against yumdownloader or reposync, was this from a HTTP or HTTPS source? If the latter (as James noted), <A HREF="https://bugzilla.redhat.com/show_bug.cgi?id=460692">bug 460692</A> is relevant.
Comment 11 Petr Šplíchal 2008-10-22 03:23:33 EDT
I've tested with my local HTTP repository:

    name=Python urllib2 fd leak testing repository

So this case should not be affected with bug 460692.
Comment 12 James Antill 2008-10-23 17:22:24 EDT
*** Bug 468282 has been marked as a duplicate of this bug. ***
Comment 13 Petr Šplíchal 2008-10-30 07:10:50 EDT
Moving the bug back to ASSIGNED as the yumdownloader/reposync issue is not fixed in current version (see comment #8), James is already looking into it...
Comment 22 errata-xmlrpc 2009-01-20 15:34:39 EST
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.


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