Skip to content
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

libbpf: failed to find valid kernel BTF #3

Open
Chris-hhc opened this issue Oct 6, 2024 · 3 comments
Open

libbpf: failed to find valid kernel BTF #3

Chris-hhc opened this issue Oct 6, 2024 · 3 comments

Comments

@Chris-hhc
Copy link

After executingsudo docker run --rm -it --privileged ghcr.io:
libbpf: failed to find valid kernel BTF
libbpf: Error loading vmlinux BTF: -3
libbpf: failed to load object 'bootstrap_bpf'
libbpf: failed to load BPF skeleton 'bootstrap_bpf': -3
Failed to load and verify BPF skeleton

Github workflow has passed!

@yunwei37
Copy link
Member

yunwei37 commented Oct 8, 2024

Can you run https://github.com/libbpf/libbpf-bootstrap?

Can you run it without docker?

What's your kernel version?

@xuebatian
Copy link

i meet the same problem ,and my kernel version info
6.8.0-31-generic #31-Ubuntu SMP PREEMPT_DYNAMIC Sat Apr 20 00:40:06 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
root@VM-12-4-ubuntu:~/ebpf_demo/mysql_slow_sql# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 24.04 LTS
Release: 24.04
Codename: noble

docker run --rm -it --privileged ghcr.io/eunomia-bpf/libbpf-template:latest
libbpf: failed to determine tracepoint 'sched/sched_process_exec' perf event ID: No such file or directory
libbpf: prog 'handle_exec': failed to create tracepoint 'sched/sched_process_exec' perf event: No such file or directory
libbpf: prog 'handle_exec': failed to auto-attach: -2
Failed to attach BPF skeleton

@Officeyutong
Copy link
Contributor

i meet the same problem ,and my kernel version info 6.8.0-31-generic #31-Ubuntu SMP PREEMPT_DYNAMIC Sat Apr 20 00:40:06 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux root@VM-12-4-ubuntu:~/ebpf_demo/mysql_slow_sql# lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 24.04 LTS Release: 24.04 Codename: noble

docker run --rm -it --privileged ghcr.io/eunomia-bpf/libbpf-template:latest libbpf: failed to determine tracepoint 'sched/sched_process_exec' perf event ID: No such file or directory libbpf: prog 'handle_exec': failed to create tracepoint 'sched/sched_process_exec' perf event: No such file or directory libbpf: prog 'handle_exec': failed to auto-attach: -2 Failed to attach BPF skeleton

Hi, If you want to run eBPF programs in docker, you may need to mount /sys from your host machine into docker container

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants