-
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: Profile is incorrect #16926
Comments
This profile was not generated with this binary. The profile is mostly binary but at the end there is a copy of /proc/self/maps. It says
This does not match any of the released syncthing binaries from 0.14.0 to 0.14.5. Look, for example, at the second mapping, the read-only data. It starts at file offset 0x529000 and is mapped at virtual address 0x539000. In contrast, the read-only data in each binary starts later than that:
Put another way, the text (code) segment in each of these released binaries has a larger FileSiz/MemSiz than the 0x529000 that was mapped in the binary the profile came from. Clearly the profile came from /usr/bin/syncthing, but it wasn't one of these. In the long term, Go pprof profiles will become self-contained, so that you don't need a binary. We're not there yet. But this profile definitely didn't come from this binary. |
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:However, none of the
rwFolder
methods ever callignore.parseIgnoreFile
- it's an unexported function in another package, after all - and thegithub.com/syncthing/syncthing/lib/ignore
package does not importtabwriter
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.
The text was updated successfully, but these errors were encountered: