Uploaded image for project: 'Couchbase Go SDK'
  1. Couchbase Go SDK
  2. GOCBC-1387

Panic can occur on connection read after failed close

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Major
    • core-10.1.7, core-10.2.1
    • None
    • None
    • None
    • 0

    Description

      When we close a memdclient we close the underlying tcp connection and we also release the connection back into the pool. A part of releasing the connection is that we reset the buffer, which sets internal bits to nil. If a close call returns an error then we immediately release the connection, and don't use the protection mechanism that we use on successful close to prevent a read happening after we release the connection. This means that a read can occur after we release the connection, triggering a panic.

      Attachments

        For Gerrit Dashboard: GOCBC-1387
        # Subject Branch Project Status CR V

        Activity

          People

            charles.dixon Charles Dixon
            charles.dixon Charles Dixon
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty