You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After I export c struct to skel, prog panic when load bpf code
panic message: thread 'main' panicked at /Users/l0calh0st/Git/Rust/netdig/src/bpf/netdig.skel.rs:129:26: BPF mapbssmmap pointer is NULL note: run withRUST_BACKTRACE=1environment variable to display a backtrace
example code as blow
Looks like this is the same issue I experienced here #1151. If you need a work around now, you can downgrade to an older version. Can confirm that 0.21.x works for older kernels.
Uh oh!
There was an error while loading. Please reload this page.
After I export c struct to skel, prog panic when load bpf code
panic message:
thread 'main' panicked at /Users/l0calh0st/Git/Rust/netdig/src/bpf/netdig.skel.rs:129:26: BPF map
bssmmap pointer is NULL note: run with
RUST_BACKTRACE=1environment variable to display a backtrace
example code as blow
`struct {
__uint(type, BPF_MAP_TYPE_PERF_EVENT_ARRAY);
__uint(key_size, sizeof(u32));
__uint(value_size, sizeof(u32));
__uint(max_entries, 1024);
} events SEC(".maps");
struct skb_tuple_t {
u16 sport;
};
struct skb_tuple_t _event = {}; // This code cause panic
SEC("kprobe/ip_rcv") // SEC("kprobe/ip_rcv_core")
int kprobe_ip_rcv_core(struct pt_regs *ctx) {
u16 pid = 10;
struct skb_tuple_t tupple = {};
tupple.sport = pid;
bpf_perf_event_output(ctx, &events, 0, &tupple, sizeof(tupple));
return BPF_OK;
}
char _license[] SEC("license") = "GPL";
`
osversion: Linux lima-ubuntu20 5.4.0-212-generic 2025 x86_64 x86_64 x86_64 GNU/Linux
libbpf-rs version: 0.24.8
libbpf-cargo version: master
The text was updated successfully, but these errors were encountered: