iovisor / bcc

BCC - Tools for BPF-based Linux IO analysis, networking, monitoring, and more
Apache License 2.0
20.49k stars 3.87k forks source link

Segv on bpf_module_create_c_from_string #3231

Open NicoRobert opened 3 years ago

NicoRobert commented 3 years ago

Hi !

Well I have some troubles with all bcc programs, all of them are segfaulting on lib.bpf_module_create_c_from_string from BPF() call and I don't know how am I supposed to troubleshoot this.

I drop that just in case:

$ uname -r -> 5.10.7-arch1-1 $ python --version -> Python 3.9.1

Thanks by advance for any help !

yonghong-song commented 3 years ago

could you post a reproducible test case here?

NicoRobert commented 3 years ago

Just the example segv for me :

$ cd bcc/examples
$ ./hello_world.py
[1]    4893 segmentation fault (core dumped)  ./hello_world.py
yonghong-song commented 3 years ago

Cannot reproduce locally. Since you know segfault happens with function bpf_module_create_c_from_string(). Could you build from source (see INSTALL.md), add some debugging code and check what is the issue?

NicoRobert commented 3 years ago

Well I don't have the problem with the self compiled version

yonghong-song commented 3 years ago

that means it is fixed afterwards. Just use a recent package or latest trunk.

NicoRobert commented 3 years ago

Well ok, thanks a lot for the responses!

SPYFF commented 3 years ago

Same happens on my setup too so I can confirm this error (linux-5.10.7). Nice if its already fixed waiting for the release