retis-org / retis

Tracing packets in the Linux networking stack & friends
https://retis.readthedocs.io/en/stable/
102 stars 14 forks source link

Fix the shared library detection logic to avoid being killed by the oom #66

Closed atenart closed 1 year ago

atenart commented 1 year ago

When parsing a process we're looking for all shared libraries mentioned in /proc//maps. The issue was we were only rejecting paths matching the process one, and letting various files which where not actually a shared library. This become an issue when entries like /dev/zero where found as we ended up endlessly reading those until we were killed by the oom. This was the case when running our runtime unit tests as when a program loads an eBPF object, /dev/zero is found in its maps file.

Fix this by reworking the shared library detection.

atenart commented 1 year ago

Rebased to include fixes from #69. No other change.