Uploaded image for project: 'Couchbase Server'
  1. Couchbase Server
  2. MB-35702

SSL write failures may not reset the connection in the write phase

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Critical
    • 5.5.6, 6.0.3, 6.5.0
    • 3.1.0, 3.1.1, 3.1.2, 3.1.3, 3.1.4, 3.1.5, 3.1.6, 4.0.0, 4.1.0, 4.1.1, 4.1.2, 4.5.0, 4.5.1, 4.6.0, 4.6.1, 4.6.4, 4.6.2, 4.6.3, 4.6.5, 5.0.0, 5.0.1, 5.1.0, 5.1.1, 5.1.2, 5.1.3, 5.5.0, 5.5.1, 5.5.2, 5.5.3, 5.5.4, 5.5.5, 5.5.6, 6.0.0, 6.0.1, 6.0.2, 6.0.3, 6.5.0
    • memcached
    • Untriaged
    • Unknown
    • KV-Engine MH 2nd Beta

    Description

      As part of sending the IO vector a connection reset may get lost if one of the individual methods to send the data fails (this will most likely end up in a protocol error causing the client to disconnect at a later time)

      The code to send data looks like:

         for (int ii = 0; ii < int(m->msg_iovlen); ++ii) {
                  int n = sslWrite(reinterpret_cast<char*>(m->msg_iov[ii].iov_base),
                                   m->msg_iov[ii].iov_len);
                  if (n > 0) {
                      res += n;
                  } else {
                      return res > 0 ? res : -1;
                  }
              }
      

      If we're able to send something over SSL we won't reset the connection as the -1 isn'tpropagated to the caller and we'll continue our state machinery (and might try to read or write to the socket again).

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              ritam.sharma Ritam Sharma
              trond Trond Norbye
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes

                  PagerDuty