From 07bf4e71896cdc7ed966607b39ad7fe053a86068 Mon Sep 17 00:00:00 2001 From: Ivan Babrou Date: Tue, 12 Sep 2023 16:47:39 -0700 Subject: [PATCH] Tolerate if we miss a short lived cgroup in fanotify --- cgroup/fanotify.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cgroup/fanotify.go b/cgroup/fanotify.go index b319fd6f..d7d4ac06 100644 --- a/cgroup/fanotify.go +++ b/cgroup/fanotify.go @@ -128,7 +128,9 @@ func (m *fanotifyMonitor) handleFanotify(_ *unix.FanotifyEventMetadata, buf []by inode, err := inode(path) if err != nil { - return fmt.Errorf("error resolving inode for %q: %v", path, err) + // Sometimes we can't get the inode in type and it shouldn't be a fatal error + log.Printf("error resolving inode for %q: %v", path, err) + return nil } m.mapping[inode] = path