-
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
x/net/trace: race when rendering active requests #24231
Comments
What version of Go are you using (go version)?go1.10 What operating system and processor architecture are you using (go env)?GOARCH="amd64" Mac OS Sierra By running above program I didn't see any issue. I was able to get the stats. (url) |
Hey @subbu05. Build the code I've posted with Using the test server is probably easier, you don't need a browser for that. |
FYI: I have a fix for this, but my solution changes the template (to avoid having to add any more sync code in the |
Change https://golang.org/cl/98535 mentions this issue: |
This change protects fields mutated by Trace methods with a mutex. In particular it fixes races caused by concurrent calls to IsError, and viewing active traces in /debug/requests. Includes changes from CL/67730. Updates golang/go#24231 Change-Id: I07db54c2642efe0ea0e3ffeb54ec796ae51e70ef Reviewed-on: https://go-review.googlesource.com/98535 Run-TryBot: Hyang-Ah Hana Kim <hyangah@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (
go version
)?go1.10
Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?What did you do?
View "Active" requests in
/debug/requests
endpoint provided bygolang.org/x/net/trace
.What did you expect to see?
No races.
What did you see instead?
This Go program reproduces the issue.
The text was updated successfully, but these errors were encountered: