opencontainers / opencontainers/runc
Unable to handle cpuacct.stat when there are 6 fields
Open
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 13.5k
- Forks
- 2.3k
- Avg merge
- 2d 8h
- Merged PRs (30d)
- 30
Description
When the cpuacct.stat contains 6 fields as below:
#cat /sys/fs/cgroup/cpuacct/cpuacct.stat
user 8634978
system 11319890
nr_migrations 258883801
Jul 09 21:42:09 xxxxxx kubelet[2750]: W0709 21:42:09.772340 2750 container.go:507] Failed to update stats for container "%s": %s/kubepods/besteffort/pod0b2aa0e0-8345-11e8-b14c-105172252871/b06bce7484d86c5d616f3019f7cb411760d395f1f65eb6352feb24f41a6f1663failure - /sys/fs/cgroup/cpuset,cpu,cpuacct/kubepods/besteffort/pod0b2aa0e0-8345-11e8-b14c-105172252871/b06bce7484d86c5d616f3019f7cb411760d395f1f65eb6352feb24f41a6f1663/cpuacct.stat is expected to have 4 fields, continuing to push stats
here is the code where remote the error:
https://github.com/kubernetes/kubernetes/blob/master/vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs/cpuacct.go#L89:63
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the cpuacct parsing code in vendor/github.com/opencontainers/runc/libcontainer/cgroups/fs/cpuacct.go at the linked location and compare its expected field count with the shown cpuacct.stat format. Trace the related cgroups tests, then verify that six-field cpuacct.stat input no longer produces the reported parsing failure.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, linux
- Domain
- operating-systems
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100