Title: SSL server sockets that haven't completed handshake lead to log spew on loop close · Issue #487 · python/asyncio · GitHub
Open Graph Title: SSL server sockets that haven't completed handshake lead to log spew on loop close · Issue #487 · python/asyncio
X Title: SSL server sockets that haven't completed handshake lead to log spew on loop close · Issue #487 · python/asyncio
Description: This is very similar in root cause to issue #483 - SSL handshakes that have been initiated but not completed. This code in sslproto.py: if compat.PY34: def __del__(self): if not self._closed: warnings.warn("unclosed transport %r" % self,...
Open Graph Description: This is very similar in root cause to issue #483 - SSL handshakes that have been initiated but not completed. This code in sslproto.py: if compat.PY34: def __del__(self): if not self._closed: warni...
X Description: This is very similar in root cause to issue #483 - SSL handshakes that have been initiated but not completed. This code in sslproto.py: if compat.PY34: def __del__(self): if not self._closed: warni...
Opengraph URL: https://github.com/python/asyncio/issues/487
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"SSL server sockets that haven't completed handshake lead to log spew on loop close","articleBody":"This is very similar in root cause to issue #483 - SSL handshakes that have been initiated but not completed. This code in sslproto.py:\r\n\r\n if compat.PY34:\r\n def __del__(self):\r\n if not self._closed:\r\n warnings.warn(\"unclosed transport %r\" % self, ResourceWarning)\r\n self.close()\r\n\r\nleads to annoying log spew that is out of the control of the server developer. The cause is wrapped SSL sockets that have not completed their handshake and that therefore the transport has not been provided to the protocol's connection_made() callback. As server developer I therefore have no way to cleanly close down these transports. So when the server admin shuts down the server, which does cleanly close all the transports it is aware of then does a loop.close() and exits, he is left with many messages like this sent to the logs. This is unsightly and frustrating as I am unable to prevent it.\r\n\r\nPerhaps the above code in `__del__() `should not be executed if the loop has been closed?\r\n\r\n017-01-20 19:32:16.331209500 Exception ignored in: \u003cbound method _SSLProtocolTransport.__del__ of \u003casyncio.sslproto._SSLProtocolTransport object at 0x80a8e5e10\u003e\u003e\r\n2017-01-20 19:32:16.331215500 Traceback (most recent call last):\r\n2017-01-20 19:32:16.331218500 File \"/usr/local/lib/python3.5/asyncio/sslproto.py\", line 328, in __del__\r\n2017-01-20 19:32:16.331220500 self.close()\r\n2017-01-20 19:32:16.331222500 File \"/usr/local/lib/python3.5/asyncio/sslproto.py\", line 319, in close\r\n2017-01-20 19:32:16.331224500 self._ssl_protocol._start_shutdown()\r\n2017-01-20 19:32:16.331340500 File \"/usr/local/lib/python3.5/asyncio/sslproto.py\", line 542, in _start_shutdown\r\n2017-01-20 19:32:16.331343500 self._write_appdata(b'')\r\n2017-01-20 19:32:16.331345500 File \"/usr/local/lib/python3.5/asyncio/sslproto.py\", line 547, in _write_appdata\r\n2017-01-20 19:32:16.331347500 self._process_write_backlog()\r\n2017-01-20 19:32:16.331349500 File \"/usr/local/lib/python3.5/asyncio/sslproto.py\", line 649, in _process_write_backlog\r\n2017-01-20 19:32:16.331359500 self._on_handshake_complete(exc)\r\n2017-01-20 19:32:16.331361500 File \"/usr/local/lib/python3.5/asyncio/sslproto.py\", line 587, in _on_handshake_complete\r\n2017-01-20 19:32:16.331364500 self._wakeup_waiter(exc)\r\n2017-01-20 19:32:16.331366500 File \"/usr/local/lib/python3.5/asyncio/sslproto.py\", line 445, in _wakeup_waiter\r\n2017-01-20 19:32:16.331368500 self._waiter.set_exception(exc)\r\n2017-01-20 19:32:16.331378500 File \"/usr/local/lib/python3.5/asyncio/futures.py\", line 349, in set_exception\r\n2017-01-20 19:32:16.331393500 self._schedule_callbacks()\r\n2017-01-20 19:32:16.331395500 File \"/usr/local/lib/python3.5/asyncio/futures.py\", line 242, in _schedule_callbacks\r\n2017-01-20 19:32:16.331398500 self._loop.call_soon(callback, self)\r\n2017-01-20 19:32:16.331400500 File \"/usr/local/lib/python3.5/asyncio/base_events.py\", line 497, in call_soon\r\n2017-01-20 19:32:16.331403500 handle = self._call_soon(callback, args)\r\n2017-01-20 19:32:16.331412500 File \"/usr/local/lib/python3.5/asyncio/base_events.py\", line 506, in _call_soon\r\n2017-01-20 19:32:16.331414500 self._check_closed()\r\n2017-01-20 19:32:16.331416500 File \"/usr/local/lib/python3.5/asyncio/base_events.py\", line 334, in _check_closed\r\n2017-01-20 19:32:16.331419500 raise RuntimeError('Event loop is closed')\r\n2017-01-20 19:32:16.331421500 RuntimeError: Event loop is closed\r\n20","author":{"url":"https://github.com/kyuupichan","@type":"Person","name":"kyuupichan"},"datePublished":"2017-01-20T10:57:57.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":4},"url":"https://github.com/487/asyncio/issues/487"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:275bd5da-74bf-27b2-2740-3289dad2f4db |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 980C:254E6C:5817991:7350F05:696D4EB6 |
| html-safe-nonce | b261b29e0805f5107630c913353d77a0de1a802f2b98a2bc6bd9dd697e02e6d4 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5ODBDOjI1NEU2Qzo1ODE3OTkxOjczNTBGMDU6Njk2RDRFQjYiLCJ2aXNpdG9yX2lkIjoiODExMDExMjA4NzM4OTA2NDg4NiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 3cd6228fc7b2e9afc99e8f9a13259407ba065ac95d7f31b84927a5d40fccb3b6 |
| hovercard-subject-tag | issue:202111872 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python/asyncio/487/issue_layout |
| twitter:image | https://opengraph.githubassets.com/8d9c1af653e62efbac26e44cdb70a66423b42c1879d70661e2b2217772186f87/python/asyncio/issues/487 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/8d9c1af653e62efbac26e44cdb70a66423b42c1879d70661e2b2217772186f87/python/asyncio/issues/487 |
| og:image:alt | This is very similar in root cause to issue #483 - SSL handshakes that have been initiated but not completed. This code in sslproto.py: if compat.PY34: def __del__(self): if not self._closed: warni... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | kyuupichan |
| hostname | github.com |
| expected-hostname | github.com |
| None | 0944e430045f4fb5f7bd103e0660080acfe593174063212555773ca41c144a14 |
| turbo-cache-control | no-preview |
| go-import | github.com/python/asyncio git https://github.com/python/asyncio.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 33739295 |
| octolytics-dimension-repository_nwo | python/asyncio |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 33739295 |
| octolytics-dimension-repository_network_root_nwo | python/asyncio |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 66b6e773801d28660016072069017cfcc851f54b |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width