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/http: Data race in net/http in 1.10.3 [1.10 backport] #27129

Closed
LK4D4 opened this issue Aug 21, 2018 · 5 comments

Comments

Projects
None yet
5 participants
@LK4D4
Copy link
Contributor

commented Aug 21, 2018

What version of Go are you using (go version)?

go1.10.3

Does this issue reproduce with the latest release?

No

What did you do?

The race is between ServerMux.Handle and ServerMux.Handler, but it was fixed in 2fd1b52
I just want to be sure that it'll be backported to 1.10.4, because it makes continuous race detection hard and also race is fatal because it's between map read and write.

@LK4D4 LK4D4 changed the title Data race in net/http in 1.10.3 net/http: Data race in net/http in 1.10.3 [1.10 backport] Aug 21, 2018

@gopherbot gopherbot added this to the Go1.10.4 milestone Aug 21, 2018

@ianlancetaylor

This comment has been minimized.

Copy link
Contributor

commented Aug 21, 2018

@gopherbot

This comment has been minimized.

Copy link

commented Aug 21, 2018

Change https://golang.org/cl/95775 mentions this issue: [release-branch.go1.11] net/http: lock the read-only mutex in shouldRedirect

@LK4D4

This comment has been minimized.

Copy link
Contributor Author

commented Aug 22, 2018

People also were concerned about the performance hit which https://golang.org/cl/113996 mitigated.
Not sure if it's worth to backport it too.

@bradfitz

This comment has been minimized.

Copy link
Member

commented Aug 22, 2018

@LK4D4, we do not backport performance changes. People can move forward to Go 1.11 if they want new goodies.

@gopherbot

This comment has been minimized.

Copy link

commented Aug 22, 2018

Closed by merging ba5e308 to release-branch.go1.10.

@gopherbot gopherbot closed this Aug 22, 2018

gopherbot pushed a commit that referenced this issue Aug 22, 2018

[release-branch.go1.10] net/http: lock the read-only mutex in shouldR…
…edirect

Since that method uses `mux.m`, we need to lock the mutex to avoid data races.

Fixes #27129

Change-Id: I998448a6e482b5d6a1b24f3354bb824906e23172
Reviewed-on: https://go-review.googlesource.com/95775
Reviewed-by: Andrew Bonventre <andybons@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.