-
Notifications
You must be signed in to change notification settings - Fork 18k
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/pprof: data race in StartCPUProfile #8365
Labels
Milestone
Comments
Thanks for the report! It's unclear why we do this double-checked locking in StartCPUProfile: // Avoid queueing behind StopCPUProfile. // Could use TryLock instead if we had it. if cpu.profiling { return fmt.Errorf("cpu profiling already in use") } The comment seems to be wrong -- cpu.Lock is not held for the whole duration of profiling. So we can just lock it and check cpu.profiling flag. Labels changed: added release-go1.4, repo-main, threadsanitizer. Owner changed to @dvyukov. Status changed to Accepted. |
CL https://golang.org/cl/116290043 mentions this issue. |
This issue was closed by revision fe7b29f. Status changed to Fixed. |
wheatman
pushed a commit
to wheatman/go-akaros
that referenced
this issue
Jun 25, 2018
It's unclear why we do this broken double-checked locking. The mutex is not held for the whole duration of CPU profiling. Fixes golang#8365. LGTM=bradfitz R=golang-codereviews, bradfitz CC=golang-codereviews https://golang.org/cl/116290043
wheatman
pushed a commit
to wheatman/go-akaros
that referenced
this issue
Jul 9, 2018
It's unclear why we do this broken double-checked locking. The mutex is not held for the whole duration of CPU profiling. Fixes golang#8365. LGTM=bradfitz R=golang-codereviews, bradfitz CC=golang-codereviews https://golang.org/cl/116290043
This issue was closed.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
by beauze.h:
The text was updated successfully, but these errors were encountered: