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

Pipeline client can hang under timeout

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.6.1, 2.0.0-alpha2
    • Component/s: library
    • Labels:
      None

      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

            Hide
            build-team Couchbase Build Team added a comment -

            Build sync_gateway-2.6.0-37 contains gocbcore commit c7cd9d8 with commit message:
            GOCBC-413 - Fix race causing pipeline client to hang indefinitely

            Show
            build-team Couchbase Build Team added a comment - Build sync_gateway-2.6.0-37 contains gocbcore commit c7cd9d8 with commit message: GOCBC-413 - Fix race causing pipeline client to hang indefinitely
            Hide
            build-team Couchbase Build Team added a comment -

            Build sync_gateway-2.5.1-8 contains gocbcore commit c7cd9d8 with commit message:
            GOCBC-413 - Fix race causing pipeline client to hang indefinitely

            Show
            build-team Couchbase Build Team added a comment - Build sync_gateway-2.5.1-8 contains gocbcore commit c7cd9d8 with commit message: GOCBC-413 - Fix race causing pipeline client to hang indefinitely

              People

              • Assignee:
                charles.dixon Charles Dixon
                Reporter:
                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

                    Error rendering 'com.pagerduty.jira-server-plugin:PagerDuty'. Please contact your Jira administrators.