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
Fix crash related to dynamic updates to UDP proxy via CDS/EDS #33824
Conversation
Ref: envoyproxy#26206 Signed-off-by: s.adams@f5.com <s.adams@f5.com>
Hi @adams-shaun, welcome and thank you for your contribution. We will try to review your Pull Request as quickly as possible. In the meantime, please take a look at the contribution guidelines if you have not done so already. |
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!
Please also add a release note.
Assigning @danzh2010 as codeownder.
/assign @danzh2010
@@ -826,6 +826,51 @@ stat_prefix: foo | |||
EXPECT_EQ(0, config_->stats().downstream_sess_active_.value()); | |||
} | |||
|
|||
// Test updates to existing cluster (e.g. priority set changes, etc) |
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.
style-nit: comments (here and below) end with '.'
Signed-off-by: s.adams@f5.com <s.adams@f5.com>
Signed-off-by: s.adams@f5.com <s.adams@f5.com>
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!
/retest |
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 for fixing this!
Can you please add a release note.
/assign-from @envoyproxy/senior-maintainers
@envoyproxy/senior-maintainers assignee is @lizan |
Signed-off-by: s.adams@f5.com <s.adams@f5.com>
202a24d
to
ff1bfcc
Compare
Co-authored-by: phlax <phlax@users.noreply.github.com> Signed-off-by: Shaun Adams <shaun.adams@volunteers.acasi.info>
Signed-off-by: Shaun Adams <shaun.adams@volunteers.acasi.info>
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!
This was approved by a senior-maintainer, merging. |
Ref: #26206
Commit Message:
We've been experiencing a crash similar to the issue reported above. Duplicating this scenario involved causing updates to the cluster HostSet via xDS.
When the CM posts the updates to workers, a new ThreadLocalCluster object is created and the previous one will be destructed soon thereafter. We expect a new ClusterInfo which uses this new TLC to be constructed and stored in the infos map; however, it seems that is not the case:
Instead, I think this is a better option:
By using emplace with a pre-existing key, we actually do not create a new object and future calls that reference the stale ThreadLocalCluster (i.e. the call to info() down the onData() path) will cause segfault.
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:]