amazon-linux-2023 icon indicating copy to clipboard operation
amazon-linux-2023 copied to clipboard

[Package Request] - bcc update for eBPF compilation on Kubernetes 1.33 kernel

Open manueleiria opened this issue 3 months ago • 1 comments

bcc exists, however, the current bcc version cannot properly compile some of the necessary code on a Kubernetes 1.33 kernel. In AL2023 only 6.1.x headers are available (whereas kubernetes uses a 6.15.8 kernel). As such, compilation errors such as these are occurring:

  • Missing BPF Structures (incomplete types):
error: invalid application of 'sizeof' to an incomplete type 'struct bpf_wq'
error: invalid application of 'sizeof' to an incomplete type 'struct bpf_rb_root'
error: invalid application of 'sizeof' to an incomplete type 'struct bpf_rb_node'
error: invalid application of 'sizeof' to an incomplete type 'struct bpf_refcount'
  • Undefined BPF Constants:
error: use of undeclared identifier 'BPF_LOAD_ACQ'
error: use of undeclared identifier 'BPF_STORE_REL'
  • Kernel Version Mismatch: AL2023 BCC: 0.26.0 (released for older kernels) Host Kernel: 6.15.8 (modern Kubernetes 1.33 kernel) AL2023 Headers: Only 6.1.x series available

-Final Compilation Result:

✗ TCP BPF compilation failed: Failed to compile BPF module b'/app/pollect/sources/bpf/tcp.c'bpf: Failed to load program: Operation not permitted

Root Cause Summary: BCC 0.26.0 (AL2023 default) - lacks support for modern kernel structures Kubernetes 1.33 kernel (6.15.x) - uses newer BPF API features

manueleiria avatar Oct 02 '25 15:10 manueleiria

I'm afraid that naturally we can only provide support for Amazon Linux' own kernels, which would be 6.1 and 6.12 on AL2023. If you roll your own kernel, you'd also have to use a more recent bcc.

Amazon Linux plans to release kernel 6.18 for AL2023 in Q1 2026, which would address your issue.

bjoernd avatar Nov 11 '25 09:11 bjoernd