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 vstinner
Recipients asvetlov, vstinner, yselivanov
Date 2018-05-28.20:37:18
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
While debugging bpo-32458 (functional test on START TLS), I found a race condition in SSLProtocol of asyncio/

Sometimes, _sslpipe.feed_ssldata() is called before _sslpipe.shutdown().

* SSLProtocol.connection_made() -> SSLProtocol._start_handshake(): self._loop.call_soon(self._process_write_backlog)
* SSLProtoco.data_received(): direct call to self._sslpipe.feed_ssldata(data)
* Later, self._process_write_backlog() calls self._sslpipe.do_handshake()

The first write is delayed by call_soon(), whereas the first read is a direct call to the SSL pipe.
Date User Action Args
2018-05-28 20:37:18vstinnersetrecipients: + vstinner, asvetlov, yselivanov
2018-05-28 20:37:18vstinnersetmessageid: <>
2018-05-28 20:37:18vstinnerlinkissue33674 messages
2018-05-28 20:37:18vstinnercreate