Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
x/net/http2: curGoroutineID is called in production #13691
When I was looking at http2 benchmark profiles, I found calls to curGoroutineID. This should not happen unless DEBUG_HTTP2_GOROUTINES=1, but it is inexplicably happening anyway.
All three calls to curGoroutineID are in gotrack.go, and all three are protected by the boolean. If you make the following patch to gotrack.go, so that the boolean is unambiguously false:
And then you run the benchmarks, the panic happens:
This is with: go version devel +97f854c Sat Dec 19 10:00:04 2015 +0000 darwin/amd64
(I am profiling on MacOS 10.10 with rsc's kernel patch installed. The profile looks correct in all other aspects.)