[issue32219] SSLWantWriteError being raised by blocking SSL socket

2021-06-11 Thread Kyle Altendorf


Change by Kyle Altendorf :


--
nosy: +altendky

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32219] SSLWantWriteError being raised by blocking SSL socket

2021-04-17 Thread Nathaniel Smith


Nathaniel Smith  added the comment:

I don't know :-( After filing this upstream we started ignoring these 
exceptions, to make our CI less flaky: 
https://github.com/python-trio/trio/pull/365/files

But unfortunately that means I don't know if we've been hitting them since then 
or not.

--
status: pending -> open

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32219] SSLWantWriteError being raised by blocking SSL socket

2021-04-17 Thread Christian Heimes


Christian Heimes  added the comment:

Nathaniel, is this still an issue with recent OpenSSL and Python versions?

--
status: open -> pending

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32219] SSLWantWriteError being raised by blocking SSL socket

2017-12-05 Thread Nathaniel Smith

Nathaniel Smith  added the comment:

There's no timeout. The man page claims SSL_ERROR_WANT_WRITE can't happen on a 
blocking socket, but who knows...

Re: EINTR, this is all happening in a child thread. On Linux, this would mean 
that it almost certainly isn't receiving any signals. I'm not sure about MacOS, 
though. (POSIX allows signals to be delivered to any thread, but most Unixes 
are much more conservative in practice.)

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32219] SSLWantWriteError being raised by blocking SSL socket

2017-12-05 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

You might want to add debugging code in _ssl__SSLSocket_shutdown_impl() 
(Modules/_ssl.c) and see what happens exactly.

Does your socket have a timeout?  If not, you may want to ask the OpenSSL 
mailing-list whether it's possible for SSL_shutdown to return 
SSL_ERROR_WANT_WRITE on a blocking socket...

PS: it seems the _ssl module doesn't retry I/O routines on EINTR. See also 
https://stackoverflow.com/questions/24188013/openssl-and-signals

--
components: +Library (Lib)
nosy: +pitrou
type:  -> behavior
versions: +Python 3.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32219] SSLWantWriteError being raised by blocking SSL socket

2017-12-04 Thread Nathaniel Smith

Nathaniel Smith  added the comment:

Oh darn, I restarted the 311618077 build on Travis and apparently that makes it 
delete the log. Well, it was the same traceback as the one that's left, but 
triggered by a different test.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue32219] SSLWantWriteError being raised by blocking SSL socket

2017-12-04 Thread Nathaniel Smith

New submission from Nathaniel Smith :

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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com