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

[3.5] server/embed: fix data race when start insecure grpc #15517

Merged
merged 1 commit into from
Mar 20, 2023

Conversation

fuweid
Copy link
Member

@fuweid fuweid commented Mar 20, 2023

There are two goroutines accessing the gs grpc server var. Before insecure gs server start, the gs can be changed to secure server and then the client will fail to connect to etcd with insecure request. It is data-race. We should use argument for reference in the new goroutine.

fix: #15495

(cherry picked from commit a9988e2)

Please read https://github.com/etcd-io/etcd/blob/main/CONTRIBUTING.md#contribution-flow.

cherry-pick: #15509

There are two goroutines accessing the `gs` grpc server var. Before
insecure `gs` server start, the `gs` can be changed to secure server and
then the client will fail to connect to etcd with insecure request. It
is data-race. We should use argument for reference in the new goroutine.

fix: etcd-io#15495

Signed-off-by: Wei Fu <fuweid89@gmail.com>
(cherry picked from commit a9988e2)
Signed-off-by: Wei Fu <fuweid89@gmail.com>
@fuweid fuweid marked this pull request as ready for review March 20, 2023 13:24
Copy link
Member

@ahrtr ahrtr left a comment

Choose a reason for hiding this comment

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

LGTM

Thank you @fuweid

@ahrtr ahrtr merged commit fe37277 into etcd-io:release-3.5 Mar 20, 2023
@fuweid fuweid deleted the cp-15509-to-3.5 branch March 22, 2023 05:56
tjungblu pushed a commit to tjungblu/etcd that referenced this pull request Jul 26, 2023
[3.5] server/embed: fix data race when start insecure grpc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants