[BP 7.0.5 MB-51318] Potential for request stall if stream operator fails to notify request that it has terminated

Description

In order to avoid panics and garbled json responses, the main ServeHTTP request needs to know that the Stream operator is dead before continuing after a network close / timeout / request termination / assert failure.
Although there is no testcase, and code inspection has found nothing, if Stream fails to notify for whatever reason, this code path will lead to a hang, and there is at least one CBSE showing these symptoms.
Proactively find ways to remove this weakness, while not affecting throughput.

Symptoms include all the active requests stuck like this:

Components

Affects versions

Fix versions

Labels

Environment

None

Link to Log File, atop/blg, CBCollectInfo, Core dump

None

Release Notes Description

None

Attachments

1

Activity

Pavan PB November 21, 2022 at 10:05 AM

The longevity run with 7.0.5-7634 did not throw any panics as confirmed by . Closing this ticket.

Pierre Regazzoni October 27, 2022 at 3:16 PM

same as . Thanks.

Marco Greco October 27, 2022 at 3:13 PM

not sure if you want to test this in longevity. Fix in elixir has already been tested.

CB robot October 27, 2022 at 1:45 PM

Build couchbase-server-7.0.5-7628 contains query commit 3b0a0b0 with commit message:
avoid waiting on results channel on stop or close

Fixed
Pinned fields
Click on the next to a field label to start pinning.

Details

Assignee

Reporter

Is this a Regression?

No

Triage

Untriaged

Story Points

Priority

Instabug

Open Instabug

PagerDuty

Sentry

Zendesk Support

Created October 24, 2022 at 1:14 PM
Updated March 24, 2023 at 5:32 PM
Resolved October 27, 2022 at 3:11 PM
Instabug