-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
dynamic_modules: don't call on_http_filter_destroy_ if filter is null #37899
dynamic_modules: don't call on_http_filter_destroy_ if filter is null #37899
Conversation
Signed-off-by: Ben Plotnick <[email protected]>
/assign @mathetake |
bplotnick is not allowed to assign users. |
Signed-off-by: Ben Plotnick <[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.
thank you for finding this out.. but i am still not sure when does this happen. Can you add a test case in filter_test.cc
to cover this case as well as a basic integration test?
i'm not sure 🫤. I can't think of why it would, but I know it happens and segfaults when i use it and that this PR fixes the issue. I will take a look at reproing with an integration test though. |
Signed-off-by: Ben Plotnick <[email protected]>
@mathetake I was able to repro the issue with an integration test and confirmed that this PR fixes things. I still don't know why it is happening though. If you want to repro on this branch as well, you can comment out https://github.com/envoyproxy/envoy/pull/37899/files#diff-c3823903be9c28689c8502bf6bbcc3ec6e771b6903b4cdf2317f99c82ce679caR21-R23 and run |
Signed-off-by: Ben Plotnick <[email protected]>
cool, thank you for adding the integration test that hits the case! |
Signed-off-by: Ben Plotnick <[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. Thank you for scaffolding the integration test. Deferring to @mattklein123
I tested dynamic modules from rust and was getting a segfault. I noticed that drop was getting called twice. It turns out that
onDestroy
gets called twice. The right solution here is probably to preventonDestroy()
from being called twice... but barring that, this change works.Commit Message: dynamic_modules: don't call on_http_filter_destroy_ if filter is null
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:]