-
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
logger: fix lifetime issue of AccessLogConfig in tls callback. #18081
logger: fix lifetime issue of AccessLogConfig in tls callback. #18081
Conversation
Signed-off-by: Takeshi Yoneda <takeshi@tetrate.io>
Signed-off-by: Takeshi Yoneda <takeshi@tetrate.io>
/assign-from @envoyproxy/first-pass-reviewers |
@envoyproxy/first-pass-reviewers assignee is @tonya11en |
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! The tls lambda removes this
and replaced by either value or the scope.
Unlike the config_
member, scope is the topic should be resolve separately as in the comment.
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 on first pass. Thanks for fixing!
Is it possible to have a test around this? |
oh yeah will do! |
Signed-off-by: Takeshi Yoneda <takeshi@tetrate.io>
mathetake@5651819 added |
/assign-from @envoyproxy/maintainers |
@envoyproxy/maintainers assignee is @None |
/assign-from @envoyproxy/envoy-maintainers |
@envoyproxy/envoy-maintainers assignee is @yanavlasov |
Signed-off-by: Takeshi Yoneda takeshi@tetrate.io
Commit Message: This commit fixes the lifetime issue of Http/TcpAccessLogConfig owned by HttpGrpcAccessLog and TcpGrpcAccessLog loggers. These logger objects may have died before the thread local callback for initializing thread local access loggers is actually executed in each thread. In the previous implementation, the callback only captures the reference to the AccessLogConfig object owned by HttpGrpcAccessLog/TcpGrpcAccessLog which might not outlive, and therefore potentially this causes the invalid memory access and crashes the Envoy in any thread. This happens especially when an xDS resource is NACKed.
Related Issues: #18066
Additional Description:
Risk Level:
Testing:
Docs Changes:
Release Notes:
Platform Specific Features:
[Optional Runtime guard:]
[Optional Fixes #Issue]
[Optional Deprecated:]
[Optional API Considerations:]