contrib/golang: address race condition in Go HTTP filter#44429
Merged
botengyao merged 3 commits intoenvoyproxy:mainfrom Apr 16, 2026
Merged
contrib/golang: address race condition in Go HTTP filter#44429botengyao merged 3 commits intoenvoyproxy:mainfrom
botengyao merged 3 commits intoenvoyproxy:mainfrom
Conversation
addresses envoyproxy#44320 the issue here arises when the client sends data and the data is pending to be dispatched. Previously, the stream could have been destroyed already by the time `continueStatusInternal` was invoked. This PR adds safety-checks in the Go shim, and on the C++ filter side to avoid it this was tested by building Envoy + a test client that sends HTTP/1.1 + POST with a body, and verifying the crash happens before consistently, and no longer crashes with the patch Signed-off-by: Henry Wang <henry.wang@datadoghq.com>
20f2d36 to
c1d75a0
Compare
Signed-off-by: Henry Wang <henry.wang@datadoghq.com>
wdauchy
approved these changes
Apr 14, 2026
Signed-off-by: Henry Wang <henry.wang@datadoghq.com>
botengyao
approved these changes
Apr 16, 2026
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.
Commit Message:
addresses #44320
the issue here arises when the client sends data and the data is pending to be dispatched. Previously, the stream could have been destroyed already by the time
continueStatusInternalwas invoked. This PR adds safety-checks in the Go shim, and on the C++ filter side to avoid itAdditional Description: n/a
Risk Level: n/a
Testing:
this was tested by building Envoy + a test client that sends HTTP/1.1 + POST with a body, and verifying the crash happens before consistently, and no longer crashes with the patch
also added a test to confirm the behavior - the test fails on main but passes with the patch
Docs Changes: n/a
Release Notes: n/a
Platform Specific Features: n/a
[Optional Runtime guard:]
[Optional Fixes #Issue]
[Optional Fixes commit #PR or SHA]
[Optional Deprecated:]
[Optional API Considerations:]