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

Pipeline client can hang under timeout

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 1.6.1, 2.0.0-alpha2
    • None
    • library
    • None
    • 1

    Description

      Under the right circumstances a timeout (or cancellation) can cause a pipeline client to hang and never recover. This seems to be an edge case where the request times out whilst it is being prepared for sending. This can lead to the request being cancelled before or during the call to `takeRequestOwnership`. This then causes that function to return false causing the SendRequest to return ErrCancelled, leading to us to call the request callback with no isCompleted checks.

      Under these circumstances the callback in gocb or synclient has already been processed by the timeout and so our call to the callback blocks on the signal write as there is nothing to read said signal. This then prevents the pipeline client send loop from ever ending, blocking shutdown, and therefore renewal, of the client.

      This fix for this is to use req.tryCallback rather than req.Callback.

      Attachments

        Issue Links

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

          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:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes

                  PagerDuty