[New-bugs-announce] [issue32219] SSLWantWriteError being raised by blocking SSL socket

Nathaniel Smith report at bugs.python.org
Mon Dec 4 23:01:08 EST 2017


New submission from Nathaniel Smith <njs at pobox.com>:

I have a test case that sets up a blocking SSLSocket, and eventually calls unwrap() to do a proper SSL shutdown.

Every once in a while, the test blows up, because unwrap() unexpectedly raises SSLWantWriteError. This is very unexpected for a blocking socket.

Unfortunately, since this is intermittent, I don't have a reliable reproducer.

Both of the times I've seen this so far, it was on MacOS with CPython 3.6 (the official python.org build, so whichever openssl it uses), and it was specifically in unwrap():

    https://travis-ci.org/python-trio/trio/jobs/298164123
    https://travis-ci.org/python-trio/trio/jobs/311618077

Here's the code that fails -- as you can see it's just a straightforward blocking echo server using SSLContext.wrap_socket:

    https://github.com/python-trio/trio/blob/3e62bf64946b1dcbf42c2d03e39435d4b1ba00ac/trio/tests/test_ssl.py#L92

----------
assignee: christian.heimes
components: SSL
messages: 307634
nosy: alex, christian.heimes, dstufft, janssen, njs
priority: normal
severity: normal
status: open
title: SSLWantWriteError being raised by blocking SSL socket
versions: Python 3.6

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue32219>
_______________________________________


More information about the New-bugs-announce mailing list