iovisor / bcc

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

Can't get hello_world.py work on CentOS 8.2.2004 (Core) #5060

Open Gypsying opened 4 months ago

Gypsying commented 4 months ago

1. DeviceInfo CentOS Linux release 8.2.2004 (Core) 4.18.0-193.6.3.el8_2.x86_64 bcc 0.30.0+e7109fa0 python 3.6

2. HelloWorld DEMO

BPF(text='int kprobe__sys_clone(void *ctx) { bpf_trace_printk("Hello, World!\\n"); return 0; }').trace_print()

3. ERROR MSG:

bpf: Argument list too long. Program  too large (0 insns), at most 4096 insns
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python3.6/site-packages/bcc-0.30.0+e7109fa0-py3.6.egg/bcc/__init__.py", line 487, in __init__
  File "/usr/local/lib/python3.6/site-packages/bcc-0.30.0+e7109fa0-py3.6.egg/bcc/__init__.py", line 1465, in _trace_autoload
  File "/usr/local/lib/python3.6/site-packages/bcc-0.30.0+e7109fa0-py3.6.egg/bcc/__init__.py", line 527, in load_func
Exception: Failed to load BPF program b'kprobe__sys_clone': Argument list too long
image
Songrui625 commented 3 months ago

I can't reproduce your problem in my CentOS 8.3 vm.

4.18.0-348.7.1.el8_5.x86_64 bcc-0.19.0-4.el8.x86_64

Please install the newest bcc package and then try again

yum makecache && yum install bcc

Thanks