-
Notifications
You must be signed in to change notification settings - Fork 4k
Open
Description
I just spent way too long debugging why execsnoop
failed with this error:
<built-in>:1:10: fatal error: './include/linux/kconfig.h' file not found
#include "./include/linux/kconfig.h"
^~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
Traceback (most recent call last):
File "/nix/store/7dgdpsd8lrclqzl4s5vmlm8hwm0y91d2-bcc-0.24.0/share/bcc/tools/.execsnoop-wrapped", line 228, in <module>
b = BPF(text=bpf_text)
File "/nix/store/7dgdpsd8lrclqzl4s5vmlm8hwm0y91d2-bcc-0.24.0/lib/python3.10/site-packages/bcc/__init__.py", line 475, in __init__
raise Exception("Failed to compile BPF module %s" % (src_file or "<text>"))
Exception: Failed to compile BPF module <text>
The reason was that I had a directory /tmp/kheaders-5.18.15
containing nothing but an empty include/uapi
directory. I have no idea how this happened. rm -r /tmp/kheaders-5.18.15
fixed it.
A few ideas on what needs to be done:
- make sure the kheaders directory is always in a consistent state when the program exits
- improve the existence check, à la Check for kconfig.h presence, not just build dir #3588
I'm on Linux 5.18.15, NixOS unstable, BCC 0.24.0.
picnoir, ananthakumaran and charles-typ
Metadata
Metadata
Assignees
Labels
No labels