Execution of an eBPF script fails with an exception: 'Failed to compile BPF text'
Issue
- Execution of an eBPF script fails with an exception: 'Failed to compile BPF text'
Eg: 1
# /usr/share/bcc/tools/bashreadline
chdir(/lib/modules/4.18.0-32.el8.x86_64/build): No such file or directory
Traceback (most recent call last):
File "/usr/share/bcc/tools/bashreadline", line 51, in <module>
b = BPF(text=bpf_text)
File "/usr/lib/python3.6/site-packages/bcc/__init__.py", line 318, in __init__
raise Exception("Failed to compile BPF text")
Exception: Failed to compile BPF text
Eg: 2
# /usr/share/bcc/tools/softirqs -NT 1
chdir(/lib/modules/4.18.0-32.el8.x86_64/build): No such file or directory
Traceback (most recent call last):
File "/usr/share/bcc/tools/softirqs", line 120, in <module>
b = BPF(text=bpf_text)
File "/usr/lib/python3.6/site-packages/bcc/__init__.py", line 318, in __init__
raise Exception("Failed to compile BPF text")
Exception: Failed to compile BPF text
Environment
- Red Hat Enterprise Linux 8
- bcc-tools
- kernel-devel
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.