Skip to content
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

http: abort filter chain after reset stream was called #31775

Merged
merged 2 commits into from
Jan 16, 2024

Conversation

wbpcode
Copy link
Member

@wbpcode wbpcode commented Jan 11, 2024

Commit Message: http: abort filter chain after reset stream was called
Additional Description:

To close #26994. The #26994 is caused by that the filter chain still continue and try to send reply after the whole stream is closed. We should abort the filter chain to avoid any possible further logic after the stream is reset.

Also see #30835 for more context.

Risk Level: low.
Testing: integration.
Docs Changes: n/a.
Release Notes: n/a.
Platform Specific Features: n/a.

@wbpcode
Copy link
Member Author

wbpcode commented Jan 11, 2024

Copy link
Contributor

@alyssawilk alyssawilk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks like a good change. Please runtime guard just in case though, include on release notes and tag both if we should backport, and if we think this needs to land before the release
/wait

@alyssawilk
Copy link
Contributor

cc @phlax @RyanTheOptimist @yanavlasov for release context

Signed-off-by: wbpcode <[email protected]>
Copy link

CC @envoyproxy/runtime-guard-changes: FYI only for changes made to (source/common/runtime/runtime_features.cc).

🐱

Caused by: #31775 was synchronize by wbpcode.

see: more, trace.

@wbpcode
Copy link
Member Author

wbpcode commented Jan 11, 2024

It take too much time to run these tests on my PC. Let the ci check it. orz

@alyssawilk alyssawilk merged commit 4af13c7 into envoyproxy:main Jan 16, 2024
@wbpcode wbpcode deleted the dev-fix-http-filter-chain branch January 17, 2024 09:35
@alyssawilk
Copy link
Contributor

hmmm, I just realized it's possible we need to do the same here for the 2 other resetStream calls in the filter_manager so have
https://github.com/envoyproxy/envoy/blob/main/source/common/http/filter_manager.cc#L966
and
https://github.com/envoyproxy/envoy/blob/main/source/common/http/filter_manager.cc#L1007
call your newly enhanced resetStream function rather than call the filter manager callbacks directly.

You want to fix or shall I?
h/t @fredyw for making me look at this code today =P

@wbpcode
Copy link
Member Author

wbpcode commented Jan 24, 2024

@alyssawilk I knew that code when I doing the fix.

The change is optional because the sendLocalReply self will handle the status correctly.

Basically, I treat the resetStream and sendLocalReply of FilterManager as two independent methods that will stop the filter chain. And they will handle the status and reset behaviour by themselves respectively.

Anyway, it's up to you. Changing it should also be harmless. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

wasm: assertion failure on close request in response header callback
3 participants