cilium / ebpf

ebpf-go is a pure-Go library to read, modify and load eBPF programs and attach them to various hooks in the Linux kernel.
https://ebpf-go.dev
MIT License
6.33k stars 698 forks source link

ci: arm64 tests fail #1460

Open lmb opened 6 months ago

lmb commented 6 months ago

Describe the bug

Tests on arm64 fail since the new kernel doesn't have the necessary config for kprobe_multi.

=== Failed
=== FAIL: link TestKprobeMulti (0.00s)
    kprobe_multi_test.go:16: Feature 'bpf_link_kprobe_multi' isn't supported even though kernel is newer than v5.18

=== FAIL: link TestKprobeMultiErrors (0.00s)
    kprobe_multi_test.go:59: Feature 'bpf_link_kprobe_multi' isn't supported even though kernel is newer than v5.18

=== FAIL: link TestKprobeMultiCookie (0.00s)
    kprobe_multi_test.go:79: Feature 'bpf_link_kprobe_multi' isn't supported even though kernel is newer than v5.18

=== FAIL: link TestKprobeMultiProgramCall (0.00s)
    kprobe_multi_test.go:94: Feature 'bpf_link_kprobe_multi' isn't supported even though kernel is newer than v5.18

=== FAIL: link TestHaveBPFLinkKprobeMulti (0.00s)
    feature.go:30: Feature 'bpf_link_kprobe_multi' isn't supported even though kernel is newer than v5.18

How to reproduce

Run the arm64 ci task.

Version information

main

lmb commented 6 months ago

Seems pretty clear that CONFIG_FPROBE is needed: https://elixir.bootlin.com/linux/latest/source/kernel/trace/bpf_trace.c#L3090 Further debugging in https://github.com/cilium/ebpf/pull/1462

alexellis commented 6 months ago

Hi, I added everything you asked for and redeployed to all CNCF servers:

https://github.com/cilium/ebpf/pull/1245#issuecomment-2102431551

If you could run grep /boot/config-6.9.10 you should see CONFIG_FPROBE etc as per above.

lmb commented 6 months ago

Here is the equivalent of the grep you mentioned: https://github.com/cilium/ebpf/actions/runs/9031025998/job/24816484288?pr=1462#step:5:275

Maybe you are missing some of the dependencies? https://cateee.net/lkddb/web-lkddb/FPROBE.html

alexellis commented 6 months ago

I've added these dependencies, but I'm not sure if this is supported for 64-bit Arm, because olddefconfig removes them when I run it. This typically means a dependent CONFIG_ is missing or the feature is not available.