-
Notifications
You must be signed in to change notification settings - Fork 17.8k
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
cmd/pprof: list command cannot find stdlib sources #13231
Comments
The default GOROOT baked into the binaries is /usr/local/go. See the docs: https://golang.org/doc/install#tarball_non_standard |
No difference with the set and exported GOROOT.
I think this doesn't work as expected. |
Rebuild your main binary? |
@bradfitz
|
Removed $GOPATH/pkg/ and reinstalled ( |
I'll reopen this bug, but I have no advice. I've never seen this problem myself, and I use pprof regularly, with my GOROOT under my $HOME, not in /usr/local/go. |
Repeated all the steps from the very beginning. Here's the full log.
|
The problem is that pprof won't attempt to translate from the compiled-in GOROOT to the working GOROOT. Thus compiling a binary for one GOROOT and then installing it in a different directory means that pprof can't find the standard package sources. Setting the GOROOT environment variable doesn't help, as pprof ignores it. This is a real bug that is worth fixing. |
Just curious if there is any workaround for this issue? |
@joegrasse I suppose creating a symlink /usr/local/go -> /home/$USERNAME/go should solve the issue. |
Yeah, If you don't have permission to do that though, I guess there isn't a workaround. |
Can you check if this happens with https://github.com/google/pprof ? If not, it will be closed by #16184 |
Seems to work seamlessly even with the off-the-shelf |
I guess this can be closed then. |
Closing. Anyone, please comment if you still see this problem with 1.8. |
I never had Go in /usr/local/go, I just unpacked the official tarball into my home directory (Linux x86_64) and set
PATH
accordingly;pprof
tool seems to disregard that.The text was updated successfully, but these errors were encountered: