Fix eBPF FD PID map iteration (#22436)
fix ebpf fd pid map iteration
Stelios Fragkakis committed
May 7, 2026 at 19:50 UTC
de9a825ebf5df6ee8b48d83985266f4a29f8da4c
1 file changed
+2
-1
src/collectors/ebpf.plugin/ebpf_fd.c
+2
-1
@@ -778,6 +778,8 @@ static void ebpf_read_fd_apps_table(int maps_per_core)
778
if (ebpf_plugin_stop())
779
break;
780
781
+ key = next_key;
782
+
783
if (bpf_map_lookup_elem(fd, &key, fv)) {
784
netdata_log_error("Failed to lookup PID %u in FD map", key);
785
goto end_fd_loop;
@@ -804,7 +806,6 @@ static void ebpf_read_fd_apps_table(int maps_per_core)
806
end_fd_loop:
807
// We are cleaning to avoid passing data read from one process to other.
808
memset(fv, 0, length);
807
- key = next_key;
809
}
810
}
811