mclenhard / ebpf-summit

20 stars 7 forks source link

"CONFIG_BPF_SYSCALL is undefined, please check your .config or ask your Linux distro to enable this feature" #1

Open tliu-confluent opened 3 years ago

tliu-confluent commented 3 years ago

Thanks for sharing the repo! It's extremely helpful. I'm using it for debugging my own service in EKS in aws. (It worked when I ran it in GCP).

When I ran the tool in aws, I got following error

./memleak-bpfcc
In file included from <built-in>:4:
/virtual/include/bcc/helpers.h:57:2: error: "CONFIG_BPF_SYSCALL is undefined, please check your .config or ask your Linux distro to enable this feature"
#error "CONFIG_BPF_SYSCALL is undefined, please check your .config or ask your Linux distro to enable this feature"
 ^
/virtual/main.c:18:37: error: expected ';' after top level declarator
BPF_STACK_TRACE(stack_traces, 10240)
                                    ^
                                    ;
2 errors generated.
Traceback (most recent call last):
  File "./memleak-bpfcc", line 387, in <module>
    bpf = BPF(text=bpf_source)
  File "/usr/lib/python2.7/dist-packages/bcc/__init__.py", line 480, in __init__
    raise Exception("Failed to compile BPF module %s" % (src_file or "<text>"))
Exception: Failed to compile BPF module <text>

Following is my setting

uname -r
4.14.243-185.433.amzn2.x86_64

/boot is empty.

It would be very appreciated if someone can help.

zekena2 commented 1 year ago

Same happened to me. I run kernel 5.4 with amazon linux 2 as well. Did you find a solution?

duongmn89 commented 1 year ago

@zekena2 @tliu-confluent : Because of wrong hostPath of boot-host mount point I created a pull request https://github.com/mclenhard/ebpf-summit/pull/2