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

net/rpc: Race condition in rpc.Client.send() #8086

Closed
gopherbot opened this issue May 23, 2014 · 3 comments
Closed

net/rpc: Race condition in rpc.Client.send() #8086

gopherbot opened this issue May 23, 2014 · 3 comments
Milestone

Comments

@gopherbot
Copy link

by mateus.a.braga:

What does 'go version' print?

go version go1.2 linux/amd64

Please provide any additional information below.

I was studying the net/rpc code and I think there is a race condition in the method send
of type *Client (net/rpc/client.go:69). 

In type Client, there is a comment saying Client.mutex protects pending, seq, request.
But client.request is been used, at net/rpc/client.go:87-89, after client.mutex is
unlocked, at net/rpc/client.go:84. Isn't this a race condition?
@ianlancetaylor
Copy link
Contributor

Comment 1:

I think the comment for the mutex field is wrong.

Labels changed: added repo-main, release-go1.4.

@gopherbot
Copy link
Author

Comment 2:

CL https://golang.org/cl/153420044 mentions this issue.

@robpike
Copy link
Contributor

robpike commented Oct 13, 2014

Comment 3:

This issue was closed by revision 968153d.

Status changed to Fixed.

@rsc rsc added this to the Go1.4 milestone Apr 14, 2015
@rsc rsc removed the release-go1.4 label Apr 14, 2015
@golang golang locked and limited conversation to collaborators Jun 25, 2016
wheatman pushed a commit to wheatman/go-akaros that referenced this issue Jun 25, 2018
Fixes golang#8086.

LGTM=bradfitz
R=golang-codereviews, bradfitz
CC=golang-codereviews
https://golang.org/cl/153420044
wheatman pushed a commit to wheatman/go-akaros that referenced this issue Jun 26, 2018
Fixes golang#8086.

LGTM=bradfitz
R=golang-codereviews, bradfitz
CC=golang-codereviews
https://golang.org/cl/153420044
wheatman pushed a commit to wheatman/go-akaros that referenced this issue Jul 9, 2018
Fixes golang#8086.

LGTM=bradfitz
R=golang-codereviews, bradfitz
CC=golang-codereviews
https://golang.org/cl/153420044
wheatman pushed a commit to wheatman/go-akaros that referenced this issue Jul 30, 2018
Fixes golang#8086.

LGTM=bradfitz
R=golang-codereviews, bradfitz
CC=golang-codereviews
https://golang.org/cl/153420044
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants