cilium / pwru

Packet, where are you? -- eBPF-based Linux kernel networking debugger
Apache License 2.0
2.77k stars 171 forks source link

Failing to load on bpf-next: calipso_skbuff_delattr: opening perf event: cannot assign requested address #284

Closed brb closed 7 months ago

brb commented 11 months ago
Opening kprobe calipso_skbuff_delattr: creating perf_kprobe PMU (arch-specific fallback for "calipso_skbuff_delattr"): token calipso_skbuff_delattr: opening perf event: cannot assign requested address

From https://github.com/cilium/pwru/actions/runs/6719026297/job/18259892769?pr=283

brb commented 11 months ago

@lmb suggested that https://elixir.bootlin.com/linux/v6.6/source/kernel/trace/trace_kprobe.c#L884 might be the case. Indeed, we are using symbols instead of addrs - https://github.com/cilium/pwru/blob/v1.0.4/main.go#L314.

brb commented 11 months ago

This is the new behavior introduced in 6.6 - https://lore.kernel.org/all/20231020104250.9537-1-flaniel@linux.microsoft.com/.

lmb commented 11 months ago

For now you could skip attaching if EADDRNOTAVAIL is generated and log a warning or something like that?

brb commented 11 months ago

if EADDRNOTAVAIL is generated and log a warning or something like that

Yep, but we try to attach the same kprobe to multiple functions in a single go. We would need to figure out which function name is causing us troubles. I think we need to switch to addrs instead of syms.

darox commented 9 months ago

I patched my vm and now I'm facing the same issue:

./pwru 
2023/12/20 09:49:21 Attaching kprobes (via kprobe)...
712 / 2208 [------------------------>__________________________________________________] 32.25% ? p/s2023/12/20 09:49:21 Opening kprobe esp_input_restore_header: creating perf_kprobe PMU (arch-specific fallback for "esp_input_restore_header"): token esp_input_restore_header: opening perf event: cannot assign requested address
ubuntu# uname -a
Linux ubuntu 6.5.13-orbstack-00116-gb64875927ef8 #1 SMP Wed Dec  6 22:19:46 UTC 2023 aarch64 aarch64 aarch64 GNU/Linux

I applied https://github.com/cilium/pwru/pull/297/commits so that I can continue on the json output PR.

brb commented 9 months ago

@darox We have released v1.0.5 which should have the tmp fix for the loading problem.

darox commented 9 months ago

I just rebased and it works. Thx!