Repository navigation
ext_proc: Refactor startStream logic and fix crash issue - #28424
Merged
Merged
Conversation
Signed-off-by: tyxia <[email protected]>
Signed-off-by: tyxia <[email protected]>
Signed-off-by: tyxia <[email protected]>
tyxia
marked this pull request as ready for review
July 17, 2023 14:08
Member
Author
|
/assign @yanavlasov @htuch |
htuch
reviewed
Jul 17, 2023
Signed-off-by: tyxia <[email protected]>
htuch
reviewed
Jul 17, 2023
htuch
left a comment
Member
There was a problem hiding this comment.
LGTM. @yanavlasov want to also have a quick look?
Signed-off-by: tyxia <[email protected]>
yanavlasov
approved these changes
Jul 18, 2023
michaelfinch
added a commit
to michaelfinch/envoy
that referenced
this pull request
Jul 19, 2023
* main: (46 commits) buffer: Disable second flaky test on windows. (envoyproxy#28483) ci/github: Fix repo contexts (envoyproxy#28482) ci/github: Minor fix for untrusted code (envoyproxy#28480) ci/github: Fixes/cleanups for env and workflows (envoyproxy#28473) examples: Warn on `golang-network` flake (envoyproxy#28478) build(deps): bump node from 20.3-bullseye-slim to 20.4-bullseye-slim in /examples/shared/node (envoyproxy#28321) ecds: add network filter dynamic config provider (envoyproxy#28407) deps: bump gRPC to 1.56.2 (envoyproxy#28449) Adding disallowed_headers in the ext_proc header forwarding rule. (envoyproxy#28468) golang filter: add VirtualClusterName getter (envoyproxy#28406) ci/github: Further fixes/cleanups for verify (envoyproxy#28467) coverage: Lower `source/common/quic` to fix permafail (93.3) (envoyproxy#28471) deps: Bump `rules_python` -> 0.24.0 (envoyproxy#28347) ci/github: Fix/improve CI env (envoyproxy#28465) improve header matcher output (envoyproxy#28389) grpc-patch: fix for oss-fuzz build (envoyproxy#28409) ext_proc: Refactor startStream logic and fix crash issue (envoyproxy#28424) add switch for setting round trip time to connection info (envoyproxy#28159) accesslog: disable resource labels (envoyproxy#28046) Remove unused header (envoyproxy#28447) ...
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue:
Full sequence of the events(
GetAndFailStreamWithInvalidSevertest added in this PR also reproduced this issue):Filter::openStreamonRemoteCloseis invoked on gRPC stream error because cluster is not availablestream_is still nullptr, which is because start has not returned yet.Later:
Filter::onDestroy: filter destroy is invoked fromConnectionManagerImpl::doDeferredStreamDestroySolution:
Refactor the start function to return nullptr (i.e. error status) when the underlying gRPC stream failed to start.
startStream: starts underlying gRPC stream(also initialize the other members). Its return bool indicates whether the start succeed or not.ExternalProcessorStreamImplifstartStreamsucceed, otherwise return nullptr, which represents start failure.Test:
GetAndFailStreamWithInvalidSevertest is added to repro the issue above and confirms the fix. Also, clean upFastFailOrderingTestin ordering test: there is no need to invoke close() etc under this new init/start logic. It should just return nullptr on start failure