Open phemmer opened 6 years ago
CC @matloob @rauls5382
Have similar issue, i have binaries built by CI where $GOPATH set to /go. When we get profile file from remote host and try to use it locally with different GOPATH set, the described error occurs.
It is possible to create simlink ($GOPATH -> /go), to trick pprof so it start working correctly, but it is requiring root privileges and not very convenient.
I just ran into this issue today in class :(. Is there any other solution?
FWIW this was fixed in upstream pprof by using heuristics to automatically trim the paths in the profiles, and adding a new trim_path option for when the heuristics fail.
Brilliant and Thank You!
im currently on the same machine, not on a different one. And I can't run -web. This is what I get when I run pprof -web cpu.prof
FATAL[0000] couldn't read file: /Users/xxx/go/src/github.com/marwan-at-work/xxx/var/folders/n4/35bgdnkd6vlgqrdzbyl0x1ycmhcndx/T/pprof002.svg error=open /Users/xxx/go/src/github.com/marwan-at-work/xxx/var/folders/n4/35bgdnkd6vlgqrdzbyl0x1ycmhcndx/T/pprof002.svg: no such file or directory
pprof: exit status 1
Same thing when I do -weblist <arg>
from inside the pprof cli.
@marwan-at-work Please open a different issue. That's not what this one is about.
What version of Go are you using (
go version
)?go version go1.9.2 darwin/amd64
Does this issue reproduce with the latest release?
yes
What operating system and processor architecture are you using (
go env
)?What did you do?
Attempted to profile a heap dump from a binary built on another host and use
list foo
What did you expect to see?
The source code with corresponding data for each line.
What did you see instead?
On my local system, this source code can instead be found in
/Users/phemmer/.go/...
.Ref #13231 which is related, but I can't use $GOROOT, as I don't have a full go toolkit in my home directory, only application source.