-
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
Envoy Lua
filter causes a crash when code in either envoy_on_request
or envoy_on_response
calls requestInfo():dynamicMetadata()
#4305
Comments
@yskopets thanks for this. This happens when the |
It's missing resetting |
@dio Thanks a lot for the quick feedback! I have another question about correctness of my approach. As you can see, I'm trying to change response entity inside Since
So, I'm wondering if I'm using Do you have any plans to add support for |
I've notice that the issue is also reproducible when Repro steps:
Config: Here is the minimal Envoy configuration to reproduce the issue:
Call Stack:
|
Lua
filter causes a crash when code inside function envoy_on_response(response_handle)
calls response_handle:requestInfo():dynamicMetadata()
Lua
filter causes a crash when code in either envoy_on_request
or envoy_on_response
calls requestInfo():dynamicMetadata()
@yskopets yes, thanks to you that I can reproduce the issue well. Would you mind building envoy with this patch: #4312 and see if that fixes yours? (If you have a problem on building envoy from the source you can ping me via slack (@dio at https://envoyslack.cncf.io/) or email). Thanks! |
@dio Thanks a lot! I confirm that your changes fixed my problem. |
…s marked dead This PR makes sure we reset dynamic metadata wrapper when its parent (request info wrapper) is marked dead. Risk Level: Low Testing: Add integration testing Docs Changes: N/A Release Notes: N/A Fixes #4305 Signed-off-by: Dhi Aurrahman <[email protected]>
@yskopets after this patch was your code for redirecting on status code 401 working? |
Issue
Envoy
Lua
filter causes a crash when code insidefunction envoy_on_response(response_handle)
callsresponse_handle:requestInfo():dynamicMetadata()
Description:
I'm trying to use
Lua
filter to implement redirect to a Login Page whenever HTTP Status 401 happens.Here is my
Envoy
config (relevant part):and here are Envoy logs:
Repro steps:
Envoy
(google proxy) and add the followingLua
code:Envoy
crashes consistently after 5-10 requests)Config:
Here is the minimal Envoy configuration to reproduce the issue:
Call Stack:
The text was updated successfully, but these errors were encountered: