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/pprof: profiling isn't cancelled when the client hangs up #13833

Closed
alexflint opened this issue Jan 6, 2016 · 2 comments
Closed

net/http/pprof: profiling isn't cancelled when the client hangs up #13833

alexflint opened this issue Jan 6, 2016 · 2 comments

Comments

@alexflint
Copy link

go version go1.5.2 darwin/amd64

If I use go tool pprof to collect a profile from a server running the net/http/pprof endpoints then kill the HTTP client before the profile is completed, the server keeps profiling for the full 30s. This means that any further attempts to collect profiles during this time period will fail with 500 Internal Server Error because it multiple CPU profiles cannot be collected simultaneously.

It seems that the server should detect termination of the TCP connection and call pprof.StopCPUProfile in: https://golang.org/src/net/http/pprof/pprof.go

@bradfitz
Copy link
Contributor

bradfitz commented Jan 6, 2016

@gopherbot
Copy link

CL https://golang.org/cl/18283 mentions this issue.

@golang golang locked and limited conversation to collaborators Jan 7, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants