Details
-
Technical task
-
Resolution: Fixed
-
Major
-
None
-
None
Description
When running Sync Gateway's integration tests with feed_dcp_gocb, the tests are showing a very large number of goroutines deadlocked waiting for a signal after timeout.
There are many DCP rollback notifications earlier in the test run, so these may be instances of initiateStreamEx that are getting created via rollbackAndReinitiate.
Test output:
http://uberjenkins.sc.couchbase.com:8080/view/Build/job/sync-gateway-integration-master/1328/console
It doesn't appear that a signal is guaranteed to be received on timeout, even if op is non-nil.
A more general way to address this issue might be to include a terminator channel for goroutines spawned by cbgt, and close that channel on GocbDCPFeed.Close(), to allow for graceful shutdown of these goroutines, instead of waiting for them to timeout (by which point the backing connection may be lost).