Skip to content
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

xds: fix panic involving double close of channel in xDS transport #5959

Merged
merged 2 commits into from Jan 23, 2023

Conversation

easwars
Copy link
Contributor

@easwars easwars commented Jan 23, 2023

Existing code was using a single channel in the xDS Transport type to ensure that the LRS goroutine exited when closing LRS streams. This was leading to a double close of the associated channel when multiple streams were started and closed. This PR changes the logic such that a new channel is created every time a new stream is created. Since we know that there can be only one active stream per transport, this approach works perfectly.

Fixes internal P1 issue.

This also needs to be backported to v1.52.x.

RELEASE NOTES:

  • xds: fix panic involving double close of channel in xDS transport

@easwars easwars requested a review from dfawley January 23, 2023 21:35
@easwars easwars added this to the 1.53 Release milestone Jan 23, 2023
<-t.lrsRunnerDoneCh
t.lrsRunnerDoneCh = nil
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Technically this is unnecessary, right? Maybe remove it?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, technically unnecessary. Just paranoia I guess.

@dfawley dfawley assigned easwars and unassigned dfawley Jan 23, 2023
@easwars easwars merged commit 4075ef0 into grpc:master Jan 23, 2023
1 check passed
@easwars easwars deleted the lrs_close_of_closed_channel branch January 23, 2023 22:50
easwars added a commit to easwars/grpc-go that referenced this pull request Jan 25, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 23, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants