-
there are no issues if i am running same binary on the host where i run perfetto.
i assume that symbols.pftrace is correctly generated so i
but the callstacks are empty (only kernel is there, that was collected before symbolization) |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 13 replies
-
Do you have llvm-symbolizer available (installed) inside your container? We need the ability to run it as a subprocess to be able to symbolize correctly. |
Beta Was this translation helpful? Give feedback.
-
My guess: you're running the recording process without sufficient capabilities/permissions to access /proc/$pid/maps, and/or the loaded ELF libraries of the profiled processes. ERROR_INVALID_MAP & ERROR_INVALID_ELF indicate there are unwinding errors at the time of recording, so there are no callframes to symbolise (and I would guess the ELF build IDs are therefore missing in the trace, leaving the symboliser with nothing to match, but I didn't double-check whether we log any errors in this situation). The "simplest" approach would be to try running the recording process as root. Otherwise you'll need to make sure that the recording process has access to procfs (could be a matter of "hidepid" mounting option), has matching UID as the target process or another way to satisfy PTRACE_MODE_READ kernel permission checks, and can access the ELF files loaded into the target process (to recover the build id). I can't provide the full steps for the non-root setup since different linux distributions have different setups for procfs and file permissions. |
Beta Was this translation helpful? Give feedback.
Right, so it's the mount namespace filepaths. We don't currently support /map_files, though it's been prototyped before. And I can't immediately think of any alternatives without local patching (or trying to run a second traced_perf inside of the container, if the mounts aren't process-private).
If your setup uses frame pointers everywhere, one option would be to try fp unwinding [1]. But you'd still need to manually guide the offline symbolisation as we'd still be missing the ELF build ids.
So at the moment I can only suggest trying to work around this limitation. But if you believe this setup is important to support, please create an issue in this github project.
[1] https://source.chro…