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

CCCP looper can fail to stop for global agent

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Major
    • core-10.3.0
    • None
    • None
    • None
    • 1
    • SDK36

    Description

      When gocb.Connect is called we create a "global agent", when .Bucket is called we shutdown the global agent and create a bucket bound agent. If .Bucket is called immediately after .Connect this can cause a race in the global agent where Stop is called on the poller controller before it has fully started up.

      For a global level agent we do not run HTTP polling. In Run we assign the active controller to cccp, release the lock, and then call runSinglePoller. If Stop is called whilst this happens then Stop sits waiting for the lock, once obtained it gets the active poller and calls Stop on it. In between the Run loop releasing the lock and then re-obtaining it in runSinglePoller, Stop has called Stop on the poller which means that it indefinitely sits waiting for a channel to close.

      Attachments

        For Gerrit Dashboard: GOCBC-1471
        # 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