-
Notifications
You must be signed in to change notification settings - Fork 4k
Open
Description
recently i've encountered a strange bpf_load problem using bcc, and hopefully can find some clues here. thanks for helping first.
the Problem is : when try to attach a uprobe using bcc cpp library, the bpf program encounters a bpf_load EACCESS error Under Debian 12, while the same program can run successfully under Debian 10.
the code triggers the error:
auto attach_res =
bpf.attach_uprobe(db_exe_path, MYSQL_DISPATCH_COMMAND_FUNC, "dispatch_command_entry");
if (!attach_res.ok()) {
LOG(ERROR) << attach_res.msg();
goto clear_ebpf;
}
through a rough investigation, i thinks it is the load_func function of bcc library which triggered the error:
and when using strace to run the failed program to catch bpf system call, the following error was caught, it seems that the error occurred during BPF_LOAD

and the following has been cheked and can be considered OK:
- executable to be attached and its symbols
- bpf security issues
- i wrote a simple cpp program and directly compile and run it under the same Debian 12 host, then use a python script to test. It turned out to work fine that the bpf program can be loaded and attached.
Anyone has any suggestions? thanks for your help.
Metadata
Metadata
Assignees
Labels
No labels