[
https://issues.apache.org/jira/browse/QPID-4872?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13663330#comment-13663330
]
Ken Giusti commented on QPID-4872:
----------------------------------
Hi Jakub, you're correct in that configuring the socket to use blocking mode
will prevent this error. However I suspect that it could cause problems if a
timeout is passed to the send() call. I think that using blocking could end up
having send() block and not return within the requested timeout.
Although the non-SSL socket blocks, the python client uses select() in order to
avoid making blocking calls to the socket. So even though the socket is
blocking, the code won't make a call to the socket unless it knows it will not
block.
This won't work for SSL sockets. This is because our application cannot
control when the SSL library writes or reads from the socket. Specifically, if
a read() (or write()) is done on a blocking SSL socket, the underlying SSL
library may in turn call write() (or read()) as needed in order to perform an
SSL handshake. For example, if the python client's select() indicates that the
socket is writable (but not readable), and we call write() on the SSL socket,
the SSL library may then need to perform a read(), which could block
indefinitely. Depending on how long SSL blocks, there's no guarantee that it
will return in enough time to handle the timeout properly.
> python client occasionally fails with "[Errno 1] _ssl.c:1217:
> error:1409F07F:SSL routines:SSL3_WRITE_PENDING:bad write retry" error
> -----------------------------------------------------------------------------------------------------------------------------------
>
> Key: QPID-4872
> URL: https://issues.apache.org/jira/browse/QPID-4872
> Project: Qpid
> Issue Type: Bug
> Components: Python Client
> Affects Versions: 0.20
> Reporter: Ken Giusti
> Assignee: Ken Giusti
> Fix For: 0.23
>
> Attachments: bz950501.py
>
>
> Originally reported in JIRA QPID-3175.
> See comment
> https://issues.apache.org/jira/browse/QPID-3175?focusedCommentId=13276773&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-13276773
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]