Open odeke-em opened 3 years ago
I just hit this bug -- is there any workaround other than implementing this patch to the pprof tool?
I run into the same problem when downloading the debug info from a remote server: go tool pprof -noinlines http://$IP/debug/pprof/allocs
.
As a short term workaround that seems to have move the needle for me was creating a symlink for the pkg
dir.
ln -s /home/$myUser/go/pkg pkg
Now the output displays as expected:
ROUTINE ======================== github.com/syndtr/goleveldb/leveldb/cache.(*Cache).Get in pkg/mod/github.com/syndtr/goleveldb@v1.0.0/leveldb/cache/cache.go
37MB 2.76GB (flat, cum) 0.018% of Total
. . 372: }
. . 373:
. . 374: hash := murmur32(ns, key, 0xf00)
. . 375: for {
. . 376: h, b := r.getBucket(hash)
. 122.51MB 377: done, _, n := b.get(r, h, hash, ns, key, setFunc == nil)
Please answer these questions before submitting your issue. Thanks!
What version of pprof are you using?
If you are using pprof via
go tool pprof
, what's yourgo env
output?If you run pprof from GitHub, what's the Git revision?
I am building using the latest Go version which uses the vendored version v0.0.0-20210226084205-cbba55b83ad5
What operating system and processor architecture are you using?
Linux, but this issue is agnostic of operating system
What did you do?
I have code built using Go modules, and when I try to invoke
list
it failsWhat did you expect to see?
Able to view the various profile hits successfully!
What did you see instead?
Proposed remedy
I propose that we instead change this code https://github.com/google/pprof/blob/cbba55b83ad56c9286566b96b0c82cead332b729/internal/report/source.go#L921
and then also include $GOPATH/pkg/mod as a directory to search from, and I can mail a PR for this, and I am doing so in my local source of Go, but I believe this affects everyone and will need to be distributed