conmon
conmon copied to clipboard
OOM detection on cgroup v2 not always working
Continuing the investigation that started in https://github.com/cri-o/cri-o/pull/6973
Apparently, sometimes systemd removes the cgroup before conmon can read its memory.events
. I don't have any ideas about how to work around that race (in conmon; that is).
Another small issue I found is sometimes OOM can be misdetected because the code use the same static counter variable for both oom
and oom_kill
, which appears to be wrong.
https://github.com/containers/conmon/blob/ebc6717071589813b3eb4d2f18ef5999b7d263b0/src/cgroup.c#L269-L310