Details
-
Bug
-
Resolution: Fixed
-
Major
-
None
-
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
|