-
Notifications
You must be signed in to change notification settings - Fork 607
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
Strange mapping at 0 on Mach-O #409
Comments
Maybe that call is from Line 98 in cf6d271
|
If so, perhaps it might make sense to have a separate method to call like |
It definitely isn't that - it comes from
That message is only generated there. Also I added extra printf debugging and it is definitely an entry in I guess the |
My other guess would be that it could be from pprof/internal/driver/fetch.go Line 437 in cf6d271
|
I added a printf there to check and it doesn't seem to be. Makes sense because there is another mapping in that file. I guess this could be a problem with gperftools itself? |
Could be. The profiles generated by gperftools should be in text format, can you take a look at what the mapping record section looks like in the input file? |
My profile is in binary format. :-/ |
What do the mappings look like in |
Aha!
(Had to redact the names sorry; all the Anyway the problem must be number 8. What do those |
Ah apparently |
@Timmmm Which tool did you use to collect this profile? Is it from gperftools? |
Yeah gperftools. |
I am still getting this same "error" using a relatively new version of pprof (commit b9804c9) on macOS Big Sur (darwin 11.4). Edit: Same result on most recent commit as well. I am also collecting profiling data from gperftools (version 2.8) and symbolizing using llvm-symbolizer (llvm11). Testing on the file @Timmmm provided above, and also on other c/cpp files. Full output:
We can ignore the warning for setting @Timmmm @aalexand Have you guys figured out if the problem is, in fact, with gperftools, and not pprof? If so, are there other profiling tools that work with pprof that do not result in weird symbolization errors. If not, then I might try attempting to see if this persists using other profiling tools. |
Ok, by compiling with PIE and ASLR enabled (as suggested in #311 (comment)), I no longer get the warning that symbolization failed on the local binary
Are these |
This is with
master
as of now on OSX. If you create a test as described here. The code will go tosymbolizer.go
newMapping()
. It will first callobj.Open("myexe", 0x100000000, ...)
which is correct because the__TEXT
segment is mapped there. However it then also tries to callobj.Open("myexe", 0, ...
which fails because the code assumes you are trying to symbolise things in the__TEXT
segment. As far as I can see the only thing mapped to 0 is the__PAGEZERO
segment.I'm not really sure what is going on here, but something isn't right. It also doesn't seem to cause any obvious issues but maybe I am overlooking something.
The text was updated successfully, but these errors were encountered: