| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
|
Sorry, something went wrong.
There was a problem hiding this comment.
Fixes the eBPF FD collector’s per-PID map iteration so that the loop uses the PID returned by bpf_map_get_next_key() before attempting a bpf_map_lookup_elem(). This removes the per-cycle “Failed to lookup PID 0 in FD map” error and ensures the iteration processes the actual map entries (including the last key).
Changes:
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Sorry, something went wrong.
There was a problem hiding this comment.
No issues found during runtime. LGTM!
Sorry, something went wrong.
fix ebpf fd pid map iteration (cherry picked from commit de9a825)
| Back | FazBrowse Home | New Git URL |
Summary
Fix the eBPF FD collector's per-PID map iteration so it consumes the key returned by bpf_map_get_next_key() before looking up the map entry.
The previous loop seeded key with 0, received the first real PID in next_key, but still attempted to look up PID 0. When PID 0 was not present in the FD map, ebpf.plugin
logged:
once per collection cycle.
Root Cause
ebpf_read_fd_apps_table() used the stale input key after a successful bpf_map_get_next_key() call instead of the returned next_key.
Changes
Summary by cubic
Fix per-PID map iteration in the eBPF FD collector by assigning key = next_key before bpf_map_lookup_elem() lookups. This eliminates incorrect PID 0 lookups and the repeated "Failed to lookup PID 0 in FD map" log.
Written for commit ee2ad7d. Summary will update on new commits.