This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Valery.Khamenya
Recipients Valery.Khamenya
Date 2011-10-08.12:25:51
SpamBayes Score 1.9985378e-06
Marked as misclassified No
Message-id <1318076753.32.0.0530567720617.issue13131@psf.upfronthosting.co.za>
In-reply-to
Content
Explanation from dablitz's comment at https://bugs.pypy.org/issue867 :

<quote>
urllib2 in the stdlib leaks fd's if an exception is raised while opening a connection. The issue occurs due to a socket being opened then an exception being raised before an object with the socket is returned, leaving no way to explicitly close the object. On cpython this would not be an issue as the object would lose all references almost immediately however it lingers around with a proper GC causing FD's to build up if the same condition happens repeatedly (eg a loop/web crawling)

The file enclosed is a script to generate the leakage, to run invok it as follows <python> leak.py

pypy should start leaking FD's and can be see in /proc/<pid of leak.py>/fd

</quote>

Related issues:
http://bugs.python.org/issue3066
http://bugs.python.org/issue1208304
http://bugs.python.org/issue1601399
History
Date User Action Args
2011-10-08 12:25:53Valery.Khamenyasetrecipients: + Valery.Khamenya
2011-10-08 12:25:53Valery.Khamenyasetmessageid: <1318076753.32.0.0530567720617.issue13131@psf.upfronthosting.co.za>
2011-10-08 12:25:52Valery.Khamenyalinkissue13131 messages
2011-10-08 12:25:52Valery.Khamenyacreate