pprof
pprof copied to clipboard
pprof: problem fetching source profiles: inconsistent samples type count: 2 != 4
Please answer these questions before submitting your issue. Thanks!
What version of pprof are you using?
pprof
Built on Oct 25 2018 01:08:44 (1540454924)
Built by [email protected]:/google/src/files/218645428/depot/branches/pprof_release_branch/218638946.1/OVERLAY_READONLY/google3
Built as //perftools/profiles:pprof
Built from changelist 218645428 with baseline 218645428 with version map map 0 { // } in a mint client based on //depot/branches/pprof_release_branch/218638946.1/google3
Build label: pprof_20181025_00_RC00
Build tool: Blaze, release blaze-2018.10.17-3 (mainline @217419960)
Build target blaze-out/k8-opt/bin/perftools/profiles/pprof
Built with --verifiable=true
Build FDO type: plain
Build LTO type: none
No MPM version info
If you are using pprof via go tool pprof, what's your go env output?
If you run pprof from GitHub, what's the Git revision?
--> Neither: it might have been pre-installed on my version of rodete.
What operating system and processor architecture are you using?
4.17.0-3rodete2-amd64 #1 SMP Debian 4.17.17-1rodete2 (2018-08-28) x86_64 GNU/Linux Intel(R) Xeon(R) CPU E5-1650 v3 @ 3.50GHz
What did you do?
I was getting data that didn't look right from a C++ program, so I tried to change the sampling frequency by setting HEAP_PROFILE_TIME_INTERVAL=10 when running my program. I also tried an interval of 2. Now when I run:
pprof -http=localhost:9999 $envoy "$out_prefix"*
If possible, provide a recipe for reproducing the error.
--> this is possible but it involves building https://github.com/envoyproxy/envoy which has a complex build process.
Attaching a profile you are trying to analyze is good. --> working on it
What did you expect to see?
chrome window showing memory profile. I do get this when I don't specify the time interval. However then I get data that I don't believe. Specifically I think I'm only seeing a small number of the allocations I expect.
What did you see instead?
pprof: problem fetching source profiles: inconsistent samples type count: 2 != 4
Could you run dpkg -S /usr/bin/pprof command and paste the output here? I have a suspicion that you are using the previous incarnation of pprof from gperftools. If so, you could either verify by installing the newer Go version of pprof from this repo or report your issue against the pprof from gperftools. Or both.
dpkg -S /usr/bin/pprof
pprof: /usr/bin/pprof
Yes I think the theory was wrong. Looks like pprof from this repo does think that the first profile has 2 metrics only:
$ pprof -tags -sample_index 5 envoy.hprof.0001.heap
pprof: sample_index 5 is outside the range [0..1]
$ pprof -tags -sample_index 5 envoy.hprof.0002.heap
pprof: sample_index 5 is outside the range [0..3]
$ pprof -tags -sample_index 5 envoy.hprof.0003.heap
pprof: sample_index 5 is outside the range [0..3]
$ pprof -tags -sample_index 5 envoy.hprof.0004.heap
pprof: sample_index 5 is outside the range [0..3]
As a workaround, try removing the 0001 file, it has smaller size and just a single sample (you can view the file using a text editor, it's plain text format if you are curious).
I'll take a look at why pprof thinks the first profile has only 2 metrics.
@jmarantz Could you confirm that all profiles here were from the same program run? That is, I want to confirm that the 0001 file was not generated in a separate run with different profiler settings.
confirmed; all from the same run. The script I used to generate them did
rm -f "$out_prefix"* before running the profiled binary.