Details
-
Bug
-
Resolution: Fixed
-
Major
-
None
-
None
-
1
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
- blocks
-
CBG-343 Upgrade gocb to 1.6.1 to pick up GOCBC-413
- Closed
For Gerrit Dashboard: GOCBC-413 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
106925,3 | GOCBC-413 - Fix race causing pipeline client to hang indefinitely | v7 | gocbcore | Status: MERGED | +2 | +1 |
106940,2 | GOCBC-413 - Fix race causing pipeline client to hang indefinitely | master | gocbcore | Status: MERGED | +2 | +1 |
138470,4 | Update agent_diag.go | master | gocbcore | Status: ABANDONED | -1 | 0 |