-
Notifications
You must be signed in to change notification settings - Fork 699
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
multiple candidates for *btf.Func
error when loading bpf objects
#723
Comments
FUNC entry with I have no idea how to handle this kind of problem. |
What kernel are you on (uname -a)?
…On 27 June 2022 09:47:03 Harai Akihiro ***@***.***> wrote:
FUNC entry with __unused parameter might be the correct one because the
only __x64_sys_mprotect FUNC entry in Ubuntu has the parameter.
I have no idea how to handle this kind of problem.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
This machine is Ubuntu 20.04 LTS with newer kernel installed:
|
@lmb I think you missed this text in the OP: My host kernel doesn't have any duplicates FUNCs that I can immediately spot, but a bunch of syscalls point to an FWD pt_regs:
while a bunch of others point to a satisfied pt_regs:
This seems to be about 50/50, I have 234 with satisfied pt_regs and 198 with FWDs. 🤔 It's not clear to me what we should do in case there's a duplicate. I have plenty of in-use syscalls (even @harai Could you experiment by replacing the call to |
@ti-mo Since I've found many syscalls with such duplication, I investigated
|
I run into this issue on Amazon Linux 2. Since it offers a newer kernel, I've tested if updating the kernel resolves the issue: sudo amazon-linux-extras install kernel-5.15 $ uname -a
Linux ip-10-1-1-209.ap-northeast-1.compute.internal 5.15.43-20.123.amzn2.x86_64 #1 SMP Fri May 27 00:28:44 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux And it does. No duplicated entries after the update:
So if you are running Amazon Linux 2 and run into this issue, updating kernel might be the easiest way to avoid it. |
Updating to the newer kernel caused another issue. Now the only
and I always get the error mentioned previously when I tried to read
I suspect |
Can you dump the full verifier log with |
@lmb I got the following full verifier log with
|
I think you're right, the problem is that This could be a bug in how |
Add context if the last verifier log line indicates a context access error. See cilium#723
@lmb No. This is the only entry. |
Add context if the last verifier log line indicates a context access error. See #723
@harai a bit of a stab in the dark: do you know whether the kernels were compiled with gcc or with clang? I think this might be a case for [email protected] |
@lmb I got the following kernel configuration:
|
@lmb Kernel developers are working on this issue now: |
That's great news! I'll follow the mailing list post and close this issue for now. |
This issue has been fixed in Linux 5.15.78. |
Great, thanks for pushing this upstream! |
Describe the bug
I got the following error when I tried to load BPF objects:
output:
I found multiple
__x64_sys_mprotect
entries in/sys/kernel/btf/vmlinux
:However, one of them is named as
__unused
:I don't know much about BTF, but I think this entry should be ignored when parsing to avoid this kind of error.
To Reproduce
Expected behavior
BTF entries named as
__unused
are simply ignored when parsing.The text was updated successfully, but these errors were encountered: