iovisor / bcc

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

Exception: Failed to load BPF program b'tracepoint__sock__inet_sock_set_state': Permission denied #3841

Open ghost opened 2 years ago

ghost commented 2 years ago

Hi, I am getting an error running tcpstates

Traceback (most recent call last): File "tcpstates", line 422, in b = BPF(text=bpf_text) File "/usr/lib/python3/dist-packages/bcc/init.py", line 483, in init self._trace_autoload() File "/usr/lib/python3/dist-packages/bcc/init.py", line 1456, in _trace_autoload fn = self.load_func(func_name, BPF.TRACEPOINT) File "/usr/lib/python3/dist-packages/bcc/init.py", line 522, in load_func raise Exception("Failed to load BPF program %s: %s" % Exception: Failed to load BPF program b'tracepointsockinet_sock_set_state': Permission denied

chenhengqi commented 2 years ago

sudo ?

jackpgao commented 2 years ago

it's already be root, sudo doesn't help.

yonghong-song commented 2 years ago

Only this bcc tool has issue, or other bcc tool also has the issue? If they all have the issues, maybe this is due to some other factors, like some kind of security system on the host.

htliu6 commented 2 years ago

So, does anyone solve this problem?

davemarchevsky commented 2 years ago

I was able to run tcpstates.py on a few of my test environments. We'll need more information to be able to help you investigate, something like: