-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
xdsclient: release lock before attempting to close underlying transport #8011
xdsclient: release lock before attempting to close underlying transport #8011
Conversation
@purnesh42H : FYI |
// This attempts to close the transport to the management server and could | ||
// take a while to complete. So, call it without holding the lock. |
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.
I would rewrite this a little. The reason to do it without the lock is not because it will "take a while" (because that implies it's purely for performance), but because the things it does could theoretically call into the xdsclient
package again and deadlock.
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.
Done. Thanks.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #8011 +/- ##
==========================================
- Coverage 82.16% 82.03% -0.14%
==========================================
Files 384 384
Lines 38745 38750 +5
==========================================
- Hits 31836 31788 -48
- Misses 5598 5636 +38
- Partials 1311 1326 +15
|
This PR fixes a rare deadlock where multiple channels are created and closed to the same target URI (with an xds scheme) at the same time. This deadlock leads to xDS client creation being stalled and therefore everything on the gRPC channel is stalled.
RELEASE NOTES: