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

GocbDCPFeed.complete panic: negative WaitGroup counter

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 7.0.0
    • None
    • cbgt
    • Untriaged
    • Unknown

    Description

      On feed timeout, it looks like f.complete has the potential to be invoked more than once.It's already got a mutex to avoid races, but if multiple calls to complete are valid, it looks like it should be checking inside the lock whether f.active[vbId] is already false before doing f.remaining.Done().

      Hit this while running Sync Gateway integration tests:

      panic: sync: negative WaitGroup counter
       
      goroutine 1175 [running]:
       
      sync.(*WaitGroup).Add(0xc00015a0a8, 0xffffffffffffffff)
      	/root/.gvm/gos/go1.12.9/src/sync/waitgroup.go:74 +0x135
      sync.(*WaitGroup).Done(...)
      	/root/.gvm/gos/go1.12.9/src/sync/waitgroup.go:99
      github.com/couchbase/cbgt.(*GocbDCPFeed).complete(0xc00015a000, 0xc000560161)
      	/var/jenkins/workspace/sync-gateway-integration-master/godeps/src/github.com/couchbase/cbgt/feed_dcp_gocb.go:690 +0x5c
      github.com/couchbase/cbgt.(*GocbDCPFeed).initiateStreamEx.func2(0xc0007181c0, 0x0, 0x0, 0xc00015a000, 0xc000500161)
      	/var/jenkins/workspace/sync-gateway-integration-master/godeps/src/github.com/couchbase/cbgt/feed_dcp_gocb.go:395 +0x13e
      created by github.com/couchbase/cbgt.(*GocbDCPFeed).initiateStreamEx
       
      	/var/jenkins/workspace/sync-gateway-integration-master/godeps/src/github.com/couchbase/cbgt/feed_dcp_gocb.go:380 +0x194
      

      Attachments

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

        Activity

          People

            abhinav Abhi Dangeti
            adamf Adam Fraser
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty