Michael Ho created KUDU-2334:
--------------------------------

             Summary: OutboundTransfer::TransferStarted() isn't stateful enough 
with TLS socket
                 Key: KUDU-2334
                 URL: https://issues.apache.org/jira/browse/KUDU-2334
             Project: Kudu
          Issue Type: Bug
          Components: rpc
            Reporter: Michael Ho
            Assignee: Michael Ho


Currently, {{OutboundTransfer::TransferStarted()}} returns true if we made 
non-zero progress in {{OutboundTransfer::SendBuffer()}}. However, this may not 
work well when using TLS socket as {{SSL_Write()}} is stateful. So, if we 
called {{SSL_Write()}} with the buffer of the first slice in an 
{{OutboundTransfer}} and failed with 0 bytes written and errno {{EAGAIN}} due 
to send buffer being full, we need to try again with the exact buffer in the 
first slice. However, it's possible that particular {{OutboundTransfer}} may be 
cancelled or timed-out before the next call to 
{{OutboundTransfer::SendBuffer()}} in {{Connection::WriteHandler()}}. In which 
case, we will skip to the next {{OutboundTransfer}} in the queue and call 
{{SSL_Write()}} with the buffers in the next {{OutboundTransfer}}, leading to 
the error message:

{noformat}
failed to write to TLS socket: error:1409F07F:SSL 
routines:SSL3_WRITE_PENDING:bad write retry:s3_pkt.c
{noformat}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to