Open raulsh opened 7 months ago
This looks like it could be a kernel bug. This thread from the lkml mentions that it's possible to certain ftrace kernel configs that lead to undefined functions. That thread links to https://lore.kernel.org/all/202211212249.livTPi3Y-lkp@intel.com/, which has the same undeclared function 'arch_ftrace_get_regs'
error.
I need to investigate further when that was merged upstream and to see what kernels versions are impacted from that bug.
This issue is also happening for AL23 AMIs for ARM64.
Linux ip-10-0-1-40.eu-central-1.compute.internal 6.1.109-118.189.amzn2023.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Sep 10 08:59:12 UTC 2024 x86_64 GNU/Linux
I'm still in the process of investigating the Pixie fix for this, but I believe installing Bottlerocket's or AL's kernel-headers package should fix this issue in the meantime. Installing the upstream distro's kernel headers is preferred as it's guaranteed to match the kernel.
A note for myself for later: https://github.com/torvalds/linux/commit/26299b3f6ba26bfc234b73126d14bdf4dec5275a#diff-b621eca3cc730521fecf3f5632328c396ce6eab735845cfe6a2b88c85a1721a7R311 was backported to Amazon Linux 2023's 6.1 kernel. This was merged upstream in a Linux 6.2 rc. That change should fix the BPF program compilation, but it's unclear to me why CONFIG_HAVE_DYNAMIC_FTRACE_WITH_ARGS=y
causes compilation issues when using 6.1.x upstream headers.
Describe the bug vizier-pem can't initialize BPF program in Kernel, because an undeclared function
arch_ftrace_get_regs
. the impact of this, of course, i'm only receiving a subset of metrics (CPU, mem), but not HTTP events.but this doesn't happen in AMD64 version (with kernel 6.1 too).
We "fixed" it using AL2 ARM64 AMIs instead of Bottlerocket (because they have kernel 5.10).
To Reproduce Just use Bottlerocket ARM64 AMI with Kernel 6.1 version (in my case, the AMI for k8s 1.28).
Expected behavior Start BPF program in linux Kernel
Logs
App information (please complete the following information):
Additional context
AWS AMI: Bottlerocket ARM64 Kernel 6.1.77