Skip to content

cmd/pprof: Profile is incorrect #16926

Closed
Closed
@calmh

Description

@calmh

Go 1.7. I was inspecting a CPU profile sent to me for an ARM binary by a user. The top level items make sense but the deeper you get into the stack the more it veers off into cyberspace, with the call stack implicating functions and packages than can never be called from the higher levels. I'll link to the relevant files here and point out some of the discrepancies in the hope that the cause may be obvious to someone.

The profiled binary: https://github.com/syncthing/syncthing/releases/download/v0.14.5/syncthing-linux-arm-v0.14.5.tar.gz (compiled with Go 1.7 on linux-amd64 for linux-arm)

The profile: https://nym.se/t/syncthing-cpu-linux-arm-v0.14.5-142747.pprof

A "web" overview: https://nym.se/r/dbqn.svg

An interesting branch to look at here is the 5.37s one slightly to the right. It shows:

github.com/s/s/model.(*rwFolder).pullerIteration
  |
  v
github.com/s/s/model.(*rwFolder).pullerRoutine
  |
  v
github.com/s/s/lib/ignore.parseIgnoreFile
  |
  v
tabwriter.(*Writer).writeN

However, none of the rwFolder methods ever call ignore.parseIgnoreFile - it's an unexported function in another package, after all - and the github.com/syncthing/syncthing/lib/ignore package does not import tabwriter nor do anything to cause calls to it via some other package.

I'm fairly sure the profile is from the binary in question, as it has a function to create such a profile and tags it with the platform and release version as seen in the profile name.

Metadata

Metadata

Assignees

No one assigned

    Labels

    FrozenDueToAgeNeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions