-
Notifications
You must be signed in to change notification settings - Fork 131
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 output in uprobe #874
Comments
One random guess I have is that your kernel is lacking a fix for PID filtering (I don't have a link right now) and you are using an old To verify that this is indeed the issue, try not providing a PID to the attach call. |
Assuming this is the issue, you should now be able to upgrade to libbpf-sys-1.4.3+v1.4.5 and it should address the problem |
Hi @danielocfb and @d-e-s-o, thank you both for the quick responses. I ran this cargo add libbpf-sys@=1.4.3+v1.4.5. |
Probably different issue then. Please try with the same |
@sebastiaoamaro to disable PID filtering you need to provide -1, not zero. Zero is "current process only", which is still filtering by PID. |
Reporter missing in action, nothing is pointing to a bug in the library. Closing. |
Hi,
I tried with libbpf-sys 1.1.1,1.12.0 and the most recent one previously suggested, and it shows the same behaviour. |
Can you provide complete reproducible example? |
Hi, |
Thanks. I think you should really be using more up-to-date version of That being said, your issue is that you are immediately dropping the --- src/main.rs
+++ src/main.rs
@@ -45,8 +45,8 @@ fn main() -> Result<()>{
binary_path.clone(),
symbol_location as usize,
);
- match uprobe {
- Ok(uprobe) => {
+ match &uprobe {
+ Ok(..) => {
println!("Inserted probe with name {}", function);
}
Err(e) => { |
Oh, thanks for the quick answer and for the help! |
Hi everyone I am running a simple uprobe:
For a simple C function called my_test_function. When using libbpf-c I have no problems and I see the bpf_printk output in the tracelog, however when using libbpf-rs (version 0.23), ubuntu 22.04, kernel version 6.5.0-1025-oem, I see no output.
Below is the userspace code:
The probe is correctly attached, the symbol_location value is the same as the one in libbpf-c.
Is this a problem on my end?
Thanks in advance.
The text was updated successfully, but these errors were encountered: