-
Notifications
You must be signed in to change notification settings - Fork 5k
hcm: Ensure operations are not called on deleted stream decoders #39346
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Previously, it was possible for the `ActiveStream` in the `HttpConnectionManager` to get deleted while still trying to process packets from the codec. This change uses the `ActiveStreamHandle` with weak pointer semantics to ensure that even with incoming data packets, methods are not called on a deleted `ActiveStream`, which represents the HCM's `RequestDecoder`. Signed-off-by: Ali Beyad <[email protected]>
cc @wu-bin |
/wait |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for working on this.
IIUC we use the ActiveStreamHandle
weak pointer semantics (the shared ptr gets dtored on when the stream is deleted) to check that the HCM ActiveStream
is still alive. We only need to do this for server-side streams since it's only an issue with HCM interactions between the two.
A release note in current.yaml is probably worth adding as a bug fix -- and CI is failing.
Otherwise LGTM.
Signed-off-by: Ali Beyad <[email protected]>
Thanks, added a note to current.yaml. |
Signed-off-by: Ali Beyad <[email protected]>
Signed-off-by: Ali Beyad <[email protected]>
Signed-off-by: Ali Beyad <[email protected]>
LGTM modulo CI |
Signed-off-by: Ali Beyad <[email protected]>
Signed-off-by: Ali Beyad <[email protected]>
Signed-off-by: Ali Beyad <[email protected]>
Thanks @yanjunxiang-google , all tests are passing now |
…oyproxy#39346) Previously, it was possible for the `ActiveStream` in the `HttpConnectionManager` to get deleted while still trying to process packets from the codec. This change uses the `ActiveStreamHandle` with weak pointer semantics to ensure that even with incoming data packets, methods are not called on a deleted `ActiveStream`, which represents the HCM's `RequestDecoder`. --------- Signed-off-by: Ali Beyad <[email protected]> Signed-off-by: Ting Pan <[email protected]>
Previously, it was possible for the
ActiveStream
in theHttpConnectionManager
to get deleted while still trying to process packets from the codec.This change uses the
ActiveStreamHandle
with weak pointer semantics to ensure that even with incoming data packets, methods are not called on a deletedActiveStream
, which represents the HCM'sRequestDecoder
.