The oomparser logic would end up stuck, unable to detect the end of a
given oom trace, for any process with a name that didn't match \w+.
This includes processes like 'python3.4' due to the '.', or
'docker-containerd' due to the '-'.
This fix was included in pr #1544 last year, but since that PR seems
dead it seems like a good idea to break this more important fix out.
I've updated the tests such that they would have caught this issue.
IN_ATTRIB inotify events are generated when atime / mtime is changed,
which would cause the tail to be reset, and reread the same log
again (generating duplicate events). Instead, watch the directory for
file delete / move.
Also, use an exponential backoff when retrying opening the file.
This ensures each goroutine is given its own Netlink connection, and
presumably avoids having a message destined for one goroutine read by
another goroutine.
Not closing the FDs manually means we have to rely on garbage collection
to run before cgroup FDs are closed. If the system is running a lot of
load probes at a high-frequency (i.e. dynamic housekeeping isn't backing
off because of load variations), we can end up hitting our FD limit due
to keeping around lots of (useless) FDs.
Formatting in 'utils/machine/machine.go' and
'utils/sysfs/sysfs.go' was incorrect and causing ./build/presubmit.sh
script to fail in Travis giving below error:
The following files are not properly formatted:
$ ./build/presubmit.sh
+./build/check_gofmt.sh .
utils/machine/machine.go utils/sysfs/sysfs.go utils/machine/machine.go
utils/sysfs/sysfs.go
Fixed the formatting using below command:
gofmt -l -w -s utils/sysfs/sysfs.go
gofmt -l -w -s utils/machine/machine.go
Looks like formatting in 'utils/machine/machine.go' and
'utils/sysfs/sysfs.go' was incorrect and causing ./build/presubmit.sh
script to fail in Travis giving below error:
The following files are not properly formatted:
$ ./build/presubmit.sh
+./build/check_gofmt.sh .
utils/machine/machine.go utils/sysfs/sysfs.go utils/machine/machine.go
utils/sysfs/sysfs.go
Fixed the formatting using below command:
gofmt -l -w -s utils/sysfs/sysfs.go
gofmt -l -w -s utils/machine/machine.go