-
Notifications
You must be signed in to change notification settings - Fork 181
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
Failed to inject filter ebpf for kprobe_skb_2: register r8 used twice #245
Comments
Thanks for the issue. Does the same appear with v1.0.0? |
v1.0.0 seems to get past the filter generation, but fails while attaching kprobes because it doesn't have 5e6011d. |
@jschwinger233 Mind taking a look? |
Update: Just built v1.0.0 with the rlimit increased (as a workaround) and it seems to work fine. |
The pwru v1.0.1 amd64 build also has this issue on kernel 5.4 |
Interesting, if I build v1.0.1 pwru from scratch (Archlinux, LLVM 16, gcc 13), I get it working. But with the released version (built by https://github.com/cilium/pwru/actions/runs/6071926301/job/16470942060, LLVM 13, gcc 12) I'm bumping into the same problem:
|
Checking out upstream locally and running |
I think it could be caused by wrong registers found for In a good
In a bad one, we have
In the pwru, the searching for registers is implemented inflexibly: pwru/internal/libpcap/inject.go Lines 126 to 145 in 80d7973
So pwru found |
libpcap.a built with LLVM 13 produces the following [1]: Failed to inject filter ebpf for kprobe_skb_2: register r8 used twice [1]: #245 (comment) Signed-off-by: Martynas Pumputis <m@lambda.lt>
libpcap.a built with LLVM 13 produces the following [1]: Failed to inject filter ebpf for kprobe_skb_2: register r8 used twice [1]: #245 (comment) Signed-off-by: Martynas Pumputis <m@lambda.lt>
libpcap.a built with LLVM 13 produces the following [1]: Failed to inject filter ebpf for kprobe_skb_2: register r8 used twice [1]: #245 (comment) Signed-off-by: Martynas Pumputis <m@lambda.lt>
To avoid situations like #245. Signed-off-by: Martynas Pumputis <m@lambda.lt>
To avoid situations like #245. Signed-off-by: Martynas Pumputis <m@lambda.lt>
v1.0.2 works for me on arm64. Thanks for the quick fix! |
v1.0.2 amd64 build also works for me |
With the static arm64 build of pwru v1.0.1, trying to use a filter results in the following error:
Kernel version: 6.4.14
Distro: Alpine edge
The text was updated successfully, but these errors were encountered: