logger: fix lifetime issue of AccessLogConfig in tls callback.#18081
Merged
yanavlasov merged 5 commits intoenvoyproxy:mainfrom Sep 17, 2021
Merged
logger: fix lifetime issue of AccessLogConfig in tls callback.#18081yanavlasov merged 5 commits intoenvoyproxy:mainfrom
yanavlasov merged 5 commits intoenvoyproxy:mainfrom
Conversation
Signed-off-by: Takeshi Yoneda <takeshi@tetrate.io>
Signed-off-by: Takeshi Yoneda <takeshi@tetrate.io>
Contributor
|
/assign-from @envoyproxy/first-pass-reviewers |
|
@envoyproxy/first-pass-reviewers assignee is @tonya11en |
lambdai
previously approved these changes
Sep 13, 2021
Contributor
lambdai
left a comment
There was a problem hiding this comment.
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.
tonya11en
previously approved these changes
Sep 14, 2021
Member
tonya11en
left a comment
There was a problem hiding this comment.
LGTM on first pass. Thanks for fixing!
Member
|
Is it possible to have a test around this? |
Member
Author
|
oh yeah will do! |
Signed-off-by: Takeshi Yoneda <takeshi@tetrate.io>
Member
Author
|
mathetake@5651819 added |
lizan
approved these changes
Sep 17, 2021
Member
|
/assign-from @envoyproxy/maintainers |
|
@envoyproxy/maintainers assignee is @None |
Member
|
/assign-from @envoyproxy/envoy-maintainers |
|
@envoyproxy/envoy-maintainers assignee is @yanavlasov |
yanavlasov
approved these changes
Sep 17, 2021
This was referenced Sep 22, 2021
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.
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:]