autopprof
autopprof copied to clipboard
Cannot start pprof UI: exit status 1
Hi,
Thanks for really helpful project.
I tested autopprof on Ubuntu 18.04.1 LTS with go 1.10.4, but got the error Cannot start pprof UI: exit status 1
.
I changed your code a little bit to use exec.CombinedOutput()
and got this message from stderr: invalid port number: strconv.Atoi: parsing "": invalid syntax
.
I also tried to run this pprof command go tool pprof -http=: /tmp/profile-673928358
and got the same error so it seems we have to use a specific port for go tool pprof -http
rather than just :
.
My suggestion is we can just use a fixed port, it should be simple enough. Thanks
I wanted a random port so you can view multiple profiles. It is weird that ":" is not behaving on Linux. Does escaping works? go tool pprof -http=":"?
I contributed the http flag to pprof and should also fix the behavior there.
I will get back to this issue when I can ssh into a linux box :)
I think we can just randomize a port in range 30000-32767 and check if it's in used or not.
It's easier than contribute and wait for go tool
to update.
I can make a PR for this issue if you're ok with my suggestion.
Thanks