eunomia-bpf / libbpf-starter-template

Template designed to get new developers with libbpf development.
https://eunomia.dev/blogs/github-templates/
MIT License
40 stars 17 forks source link

[BUG]src/bootstarp failed #2

Closed Charlie17Li closed 3 months ago

Charlie17Li commented 3 months ago

Describe the bug

根据步骤执行完make build得到 src/bootstarp以后,运行src/bootstrap失败

➜  libbpf-starter-template git:(master) ✗ src/bootstrap
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

To Reproduce 按照 README 执行

Expected behavior

Screenshots

Desktop (please complete the following information):

所用环境是本地的 Docker(ubuntu22.04 特权容器),物理机 Mac(m2)

Additional context

Charlie17Li commented 3 months ago

FIXED

原因:没有挂载debugfs; 可通过mount | grep debugfs查看

挂载:sudo mount -t debugfs none /sys/kernel/debug