Red Hat Bugzilla – Bug 460694
urllib2 fd leak, with r.recv = r.read
Last modified: 2013-04-12 12:43:28 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.
That's bug 460692
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
This bug is of interest to Dell MessageOne (related to internal ticket PUP-283); adding appropriate CCs.
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.
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.
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.
*** Bug 468282 has been marked as a duplicate of this bug. ***
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...
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.