-
Notifications
You must be signed in to change notification settings - Fork 17.8k
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: data race in (*TCPConn).File #24483
Comments
Ideally |
(CC @ianlancetaylor for polling internals.) |
As an aside, #24481 is more specific to |
Ah, ok. |
Let's use #24481 for
|
This is apparently a race between the That said this is easy enough to fix if we think it's worth fixing. We just need to copy the |
For realistic context, we have a program and we want to check the tcp queue depth of long lived connections occasionally. We will be updating it to use I would be satisfied if documentation warned of the issue -- fixing this in the runtime guts is not strictly necessary. |
@ianlancetaylor says that this will be solved by #24481, which is fine. Note that this wouldn't otherwise be worth fixing necessarily: race between File and Close seems worth reporting, since the code is profoundly confused. If we can't report it, oh well. |
Change https://golang.org/cl/119955 mentions this issue: |
What version of Go are you using (
go version
)?go version go1.7.6 linux/amd64
go version go1.8.3 linux/amd64
go version go1.9.2 linux/amd64
go version go1.10 linux/amd64
go version devel +7974f0815e Mon Mar 19 21:51:23 2018 +0000 linux/amd64
Does this issue reproduce with the latest release?
Yes.
What operating system and processor architecture are you using (
go env
)?What did you do?
https://play.golang.org/p/7nPiZfCjbgq
What did you expect to see?
What did you see instead?
This is different from #24481 because one of the two races is present back in old versions of Go as well. The first (destroy + dup) is old. The second is likely from
0f3ab149ec4
.The text was updated successfully, but these errors were encountered: