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.

classification
Title: Socket leak in logging.handlers
Type: behavior Stage: patch review
Components: Library (Lib) Versions: Python 3.4
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: vinay.sajip Nosy List: Esa.Peuha, python-dev, vinay.sajip
Priority: normal Keywords: patch

Created on 2013-10-06 13:39 by Esa.Peuha, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
logging.handlers.diff Esa.Peuha, 2013-10-06 13:39 patch to fix the bug review
Messages (3)
msg199074 - (view) Author: Esa Peuha (Esa.Peuha) Date: 2013-10-06 13:39
Running test_logging produces the following:

/home/peuha/python/cpython/Lib/logging/handlers.py:550: ResourceWarning: unclosed <socket.socket fd=4, family=1, type=2049, proto=0>
  self.retryTime = now + self.retryPeriod
/home/peuha/python/cpython/Lib/logging/handlers.py:550: ResourceWarning: unclosed <socket.socket fd=4, family=1, type=2049, proto=0>
  self.retryTime = now + self.retryPeriod

This turns out to be a bug in SocketHandler.makeSocket; the attachment should fix it.
msg199104 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2013-10-06 17:36
New changeset bd314db5532d by Vinay Sajip in branch 'default':
Issue #19182: Fixed socket leak on exception when connecting.
http://hg.python.org/cpython/rev/bd314db5532d
msg199105 - (view) Author: Vinay Sajip (vinay.sajip) * (Python committer) Date: 2013-10-06 17:40
Thanks for the report and patch. This issue only applies to Python 3.4 - it was in new code added in the default branch, and so does not apply to earlier Python releases.
History
Date User Action Args
2022-04-11 14:57:51adminsetgithub: 63381
2013-10-06 17:40:04vinay.sajipsetstatus: open -> closed
resolution: fixed
messages: + msg199105

versions: - Python 2.7, Python 3.3
2013-10-06 17:36:11python-devsetnosy: + python-dev
messages: + msg199104
2013-10-06 15:07:30pitrousetassignee: vinay.sajip
stage: patch review

nosy: + vinay.sajip
versions: + Python 2.7, Python 3.3, Python 3.4
2013-10-06 13:39:44Esa.Peuhacreate