-
Notifications
You must be signed in to change notification settings - Fork 3.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
centos SIGSEV on custom kernel. #2327
Comments
(gdb) b bpf_prog_load
Function "bpf_prog_load" not defined.
Make breakpoint pending on future shared library load? (y or [n]) y
Breakpoint 1 (bpf_prog_load) pending.
(gdb) run hello_world.py
Starting program: /usr/bin/python hello_world.py
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
warning: JITed object file architecture unknown is not compatible with target architecture i386:x86-64.
Breakpoint 1, bpf_prog_load (file=0x2 <Address 0x2 out of bounds>, type=3897170964, pobj=0x10a8300, prog_fd=0x78) at /usr/src/debug/bcc-0.6.1/src/cc/libbpf/src/libbpf.c:3264
So looks like i have a duff pointer coming into libbc.so. |
The environment does not seem right. libbcc 0.6.1 has not used the libbpf repo yet. You can verify it by checking out the corresponding sources with tag v0.6.1. Therefore, for 0.6.1, we should not use file /usr/src/debug/bcc-0.6.1/src/cc/libbpf/src/libbpf.c at all. |
Hi Yonghong, Thanks for pointing out my error. I think this stems from my attempt to populate the libbpf directory, which i'm doing incorrectly. There is a submodule which populates libbpf from the mainline kernel, Is there another script which keeps all the instances of libbpf.c (for example) synced. |
What i'm looking for is the script/s which are keeping the code in sync the mainline kernel, so that i can subvert them to point at my kernel source code. |
@BenSimsCitrix There is no script to automate syncing with kernel source. bcc syncs with libbpf repo. The steps are at https://github.com/iovisor/bcc/blob/master/src/cc/README. Directly pointing to the kernel code is not the best way as kernel code may contain some other .c files (e.g., testing files) which is not libbpf yet. |
Ok thank you yonghong, I will close this bug, as i think i have a good hold on the situation now. |
Seems like I have a rookie configuration issue, when trying to get ebpf running on a custom kernel. It may be related to bpftrace/bpftrace#515 but i am seeing this consistently on any tracing I run.
The rpm I have built contains
I'm aware that the rpm is currently not picking libbpf, but I am installing that manually (The source code is consistent)
[root@dt74 ~]# ls -l /usr/lib64/libbpf*
-rwxr-xr-x 1 root root 401048 Apr 25 09:23 /usr/lib64/libbpf.so
-rwxr-xr-x 1 root root 401048 Apr 25 09:23 /usr/lib64/libbpf.so.0
-rwxr-xr-x 1 root root 401048 Apr 25 09:23 /usr/lib64/libbpf.so.0.0.2
Any pointers on debugging the configuration on this system?
The text was updated successfully, but these errors were encountered: