-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
ext_proc fuzzer test exposed a race issue which leads to ENVOY_BUG #27639
ext_proc fuzzer test exposed a race issue which leads to ENVOY_BUG #27639
Conversation
… ext_proc filter when opens a gRPC stream. Signed-off-by: Yanjun Xiang <[email protected]>
This is the fuzzer crash traceback: ./bazel-bin/test/extensions/filters/http/ext_proc/unit_test_fuzz/ext_proc_unit_test_fuzz test/extensions/filters/http/ext_proc/unit_test_fuzz/ext_proc_corpus/crash-232906f11069ff930e29c13c1a3ae5a2c3202c57 -l trace [2023-05-25 18:54:41.702][154380][trace][ext_proc] [source/extensions/filters/http/ext_proc/ext_proc.cc:189] decodeHeaders: end_stream = false GMOCK WARNING: GMOCK WARNING: |
This is the test case: cat test/extensions/filters/http/ext_proc/unit_test_fuzz/ext_proc_corpus/crash-232906f11069ff930e29c13c1a3ae5a2c3202c57 |
The fuzzer can easily trigger this race since it sends back and handles the spurious response right within onData() when the body request is sent to the ext_proc server. This is after the first openStream() but before the 2nd openStream() / sendTrailers() in onData() function. |
The test is failed with the issue addressed by: #27619. So wait for that PR to be merged first. |
/wait |
…stream_fuzzer_crash Signed-off-by: Yanjun Xiang <[email protected]>
…stream_fuzzer_crash Signed-off-by: Yanjun Xiang <[email protected]>
Signed-off-by: Yanjun Xiang <[email protected]>
/assign @tyxia As codeowner |
Signed-off-by: Yanjun Xiang <[email protected]>
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.
LGTM! Thanks.
A small nit for future: If possible, It will be great if we include fuzzer crash traceback
as attachment. I just feel it is too long to fit in the comment section,
/assign @stevenzzzz @mpwarres I think we also want the review from team that is using this filter. Also, cced @yanavlasov and @htuch, please feel free to chime in and comment/review. Thanks! |
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.
/wait
Generally looks good, thanks
Signed-off-by: Yanjun Xiang <[email protected]>
Signed-off-by: Yanjun Xiang <[email protected]>
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.
Thanks!
* ext_proc should not open an additional stream if we've completed processing. Signed-off-by: Yanjun Xiang <[email protected]> Signed-off-by: Ryan Eskin <[email protected]>
ext_proc fuzzer test exposed a race issue which leads to ENVOY_BUG() get triggered when opening a gRPC stream.
The issue is that
The solution is that:
openStream() actually already has the check for processing_complete_ then return error. Just needs to move that check to front.
Commit Message:
Additional Description:
Risk Level:
Testing:
Docs Changes:
Release Notes:
Platform Specific Features:
[Optional Runtime guard:]
[Optional Fixes #Issue]
[Optional Fixes commit #PR or SHA]
[Optional Deprecated:]
[Optional API Considerations:]