-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
"No probes to attach" with uretprobe in a shared library #2065
Comments
Was able to reproduce this, just spin up the We definitly have some confusing behaviour, the
This behaviour makes sense as we use the namespaced version but its also annoying We don't seem to look at shared libs at all. |
Running this in a terminal somewhere.
So the short libname seems to work as expected. Now to use the full lib path:
So somethings going wrong there, have to dig into the code |
ah so we have this bit of code:
So for So the proper way to attach now is to do I think it makes sense to transform this into:
That way we use the pid exe if the probe only has 2 parts ( The manual states
sufficient is not required so both behaviours should work. Although this behaviour was there before we added that feature:
@viktormalik @danobi , thoughts on this? |
Yes, this is definitely a problem that should be fixed. The proposed change looks good, the only problem might be that we are breaking the existing (although incorrect) behaviour. If someone had a script that used a PID and a custom target which didn't match the pid exe, then the script will stop working now (it was overridden by the pid exe before). We should at least properly document the PID behaviour. |
I'd need to look at the code more, but I think the reported issue does need fixing.
I'm not concerned about this case. It's kind of nonsensical anyways |
Well, I'd see that as a feature - better to quit on typos immediately than to sit in the terminal and not telling the user that something is wrong... |
If both a PID and a path is specified for uprobe, symbols from /proc/PID/exe are used. On the other hand, if a shortname for a library is used (e.g. u:libc:*), then symbols from the library are used. This unifies the behaviour by: - using /proc/PID/exe only if no path is specified - otherwise the path (or library) that the user specified is used. See bpftrace#2065 for details.
If both a PID and a path is specified for uprobe, symbols from /proc/PID/exe are used. On the other hand, if a shortname for a library is used (e.g. u:libc:*), then symbols from the library are used. This unifies the behaviour by: - using /proc/PID/exe only if no path is specified - otherwise the path (or library) that the user specified is used. See bpftrace#2065 for details.
If both a PID and a path is specified for uprobe, symbols from /proc/PID/exe are used. On the other hand, if a shortname for a library is used (e.g. u:libc:*), then symbols from the library are used. This unifies the behaviour by: - using /proc/PID/exe only if no path is specified - otherwise the path (or library) that the user specified is used. See bpftrace#2065 for details.
If both a PID and a path is specified for uprobe, symbols from /proc/PID/exe are used. On the other hand, if a shortname for a library is used (e.g. u:libc:*), then symbols from the library are used. This unifies the behaviour by: - using /proc/PID/exe only if no path is specified - otherwise the path (or library) that the user specified is used. See bpftrace#2065 for details.
If both a PID and a path is specified for uprobe, symbols from /proc/PID/exe are used. On the other hand, if a shortname for a library is used (e.g. u:libc:*), then symbols from the library are used. This unifies the behaviour by: - using /proc/PID/exe only if no path is specified - otherwise the path (or library) that the user specified is used. See #2065 for details.
What reproduces the bug?
All these as root:
Seems that
uprobes
in a shared library aren't found for this process.There are probes, though -- but only ones in the binary:
bpftrace --info
That might be another thing to fix... can't I get
--info
as a user??bpftrace=0.14.0-1
, Debian packageThe text was updated successfully, but these errors were encountered: