Uploaded image for project: 'Kudu'
  1. Kudu
  2. KUDU-2334

OutboundTransfer::TransferStarted() isn't stateful enough with TLS socket

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 1.7.0
    • rpc
    • None

    Description

      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:

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

      Attachments

        Issue Links

          Activity

            People

              kwho Michael Ho
              kwho Michael Ho
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: