ProcSyms should treat the executable like any other mapped file when symbolizing #3498
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
As reported in #3487, when
/proc/PID/exe
's symlink points to amountns-relative path from a different mountns than the tracing process,
we can fail to open it as we don't prepend
/proc/PID/root
.A few potential solutions were discussed in that issue, we settled on
treating the main exe like any other map in
/proc/PID/maps
. Since it'salways the first map we can reuse existing code and get rid of
exe-specific helpers.
While writing this I noticed that the remaining place
get_pid_exe
is used, the USDT code, potentially also has a bug due toget_pid_exe
and shouldn't be using it either if so. Will follow upI still need to validate this. Plan on doing so with
libbpf-tools
' offcputime and hopefully some example that can be committed