★ wanayoo — archive 1999 http://bugs.python.org/issue29406Nouvelle recherche | Portail wanayoo

classification
Title: asyncio SSL contexts leak sockets after calling close with certain Apache servers
Type: resource usage Stage:
Components: asyncio Versions: Python 3.6, Python 3.5
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: fafhrd91, gvanrossum, thehesiod, yselivanov
Priority: normal Keywords: patch

Created on 2017-02-01 00:39 by thehesiod, last changed 2017-02-01 17:22 by thehesiod.

Files
File name Uploaded Description Edit
scratch_1.py thehesiod, 2017-02-01 00:42 asyncio SSL socket leak after close
ssl_shutdown_timeout.patch fafhrd91, 2017-02-01 04:35
Messages (4)
msg286573 - (view) Author: Alexander Mohr (thehesiod) * Date: 2017-02-01 00:39
with the attached code note how HttpClient.connection_lost callback is never called for the madis server. The madis server is an apache server, I tried with the OSX apache server and could not reproduce the issue so it seems something particular about their apache version or configuration.  This is a pretty critical issue as close() does not release the socket.
msg286574 - (view) Author: Alexander Mohr (thehesiod) * Date: 2017-02-01 00:42
updating to make default the error case (madis)
msg286586 - (view) Author: Nikolay Kim (fafhrd91) Date: 2017-02-01 04:35
madis-data.ncep.noaa.gov side does not complete ssl shutdown process.
msg286664 - (view) Author: Alexander Mohr (thehesiod) * Date: 2017-02-01 17:22
Thanks so much for the patch!

may want to change spelling of what was supposed to be "shutdown" =)  Also think it's worth a comment stating why it's needed?  Like certain Apache servers were noticed to not complete the SSL shutdown process.
History
Date User Action Args
2017-02-01 17:22:29thehesiodsetmessages: + msg286664
2017-02-01 04:35:54fafhrd91setversions: + Python 3.6
2017-02-01 04:35:25fafhrd91setfiles: + ssl_shutdown_timeout.patch

nosy: + fafhrd91
messages: + msg286586

keywords: + patch
2017-02-01 00:42:25thehesiodsetfiles: - scratch_1.py
2017-02-01 00:42:01thehesiodsetfiles: + scratch_1.py

messages: + msg286574
2017-02-01 00:39:05thehesiodcreate