Open ccoqueiro opened 7 months ago
The first set of errors (include/linux/bpf.h), at first glance, could be due to some internal inconsistency in the kernel headers. For example take the first error:
so there should be a full definition -- curious.
@ccoqueiro would the package repository used to install the packages contain recent versions of the headers? Is the kernel on that machine a recent release in the distro?
The two errors in bpf_tcp_send_recv.h:
msg->msg_iter
is a struct iov_iter
, defined here
$ git describe --contains de4f5fed3f231
v6.4-rc1~214^2~10
So we'd want to figure out what Iter_iov() does and handle the modified structure with an #if LINUX_VERSION_CODE < KERNEL_VERSION(6, 4, 0)
(edit: the <
case would contain old code, and the #else
for the new)
Hello @yonch , I understand that yes, I'm using the chart opentelemetry ebpf package -> https://github.com/open-telemetry/opentelemetry-helm-charts/tree/main/charts/opentelemetry-ebpf
@ccoqueiro I'm wondering if the header package might somehow be old/broken, is one of these true in your case:
and if the answer is no, a couple of things to try:
apt-get upgrade
, see if that fixes the headerssudo apt-get install --yes linux-headers-$(uname -r)
, so letting the network collector fetch its own headersnote that these will probably only fix the first set of errors. The second set requires modifications in the eBPF code. Are you in a position to pursue those, or should we search for community contributors?
Hello @yonch
Answering questions:
updating the packages on the system apt-get upgrade, see if that fixes the headers. Done but not fixed the headers. running on a machine that does not have headers (e.g., without first running sudo apt-get install --yes linux-headers-$(uname -r), so letting the network collector fetch its own headers. I ran this command, installing the package reader before installing the ebpf otel, but it didn't help, it kept giving the same error.
The second set requires modifications in the eBPF code. Are you in a position to pursue those, or should we search for community contributors? To be quite honest with you, I have no idea how I would do this.
Got it @ccoqueiro, I marked with "help wanted" and will direct contributors here if asked. I'm sorry I don't have anything more immediate for you. If you find anyone who would like to tackle, happy to work with them!
What happened?
Description
When installing ebpf, the collector kernel pod, although running, emits the following error:
2024-04-25 17:47:50.398732+00:00 debug [p:28721 t:28721] TCPChannel::connect: Conectando a la entrada @ opentelemetry-ebpf-reducer:7000 En el archivo incluido de .. /.. /.. /src/collector/kernel/bpf_src/render_bpf.c:39: En el archivo incluido de include/net/tcp.h:35: En el archivo incluido de include/net/sock_reuseport.h:5: En el archivo incluido de include/linux/filter.h:9: include/linux/bpf.h:321:10: Error: Aplicación no válida de 'sizeof' a un tipo incompleto 'struct bpf_rb_root' return sizeof(struct bpf_rb_root); ^
~~~~include/linux/bpf.h:321:24: Nota: declaración directa de 'struct bpf_rb_root' return sizeof(struct bpf_rb_root); ^ include/linux/bpf.h:323:10: Error: Aplicación no válida de 'sizeof' a un tipo incompleto 'struct bpf_rb_node' return sizeof(struct bpf_rb_node);Important that the following command was run before installation:
sudo apt-get install --yes linux-headers-$(uname -r)
Kernel version: Linux show-no-config-i-05bbcdabc7509e781 6.5.0-1018-aws #18~22.04.1-Ubuntu SMP Fri Apr 5 17:44:33 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
Steps to Reproduce
helm repo add open-telemetry https://open-telemetry.github.io/opentelemetry-helm-charts helm repo update open-telemetry helm install my-opentelemetry-ebpf -f ./otel-ebpf-values.yaml open-telemetry/opentelemetry-ebpf check logs of kernel collector pod
Expected Result
transmission of metrics
Actual Result
Errors in data collection.
eBPF Collector version
latest
Environment information
Environment
Kernel version: Linux show-no-config-i-05bbcdabc7509e781 6.5.0-1018-aws #18~22.04.1-Ubuntu SMP Fri Apr 5 17:44:33 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
PRETTY_NAME="Ubuntu 22.04.4 LTS" NAME="Ubuntu" VERSION_ID="22.04" VERSION="22.04.4 LTS (Jammy Jellyfish)" VERSION_CODENAME=jammy ID=ubuntu ID_LIKE=debian HOME_URL="https://www.ubuntu.com/" SUPPORT_URL="https://help.ubuntu.com/" BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/" PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy" UBUNTU_CODENAME=jammy
eBPF Collector configuration
Log output
Additional context
No response