{"action":"created","issue":{"url":"https://api.github.com/repos/docker/docker/issues/9365","labels_url":"https://api.github.com/repos/docker/docker/issues/9365/labels{/name}","comments_url":"https://api.github.com/repos/docker/docker/issues/9365/comments","events_url":"https://api.github.com/repos/docker/docker/issues/9365/events","html_url":"https://github.com/docker/docker/issues/9365","id":50211167,"number":9365,"title":"Wrong cgroup `cpuacct,cpu` on container process","user":{"login":"grossws","id":171284,"avatar_url":"https://avatars.githubusercontent.com/u/171284?v=3","gravatar_id":"","url":"https://api.github.com/users/grossws","html_url":"https://github.com/grossws","followers_url":"https://api.github.com/users/grossws/followers","following_url":"https://api.github.com/users/grossws/following{/other_user}","gists_url":"https://api.github.com/users/grossws/gists{/gist_id}","starred_url":"https://api.github.com/users/grossws/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/grossws/subscriptions","organizations_url":"https://api.github.com/users/grossws/orgs","repos_url":"https://api.github.com/users/grossws/repos","events_url":"https://api.github.com/users/grossws/events{/privacy}","received_events_url":"https://api.github.com/users/grossws/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2014-11-26T18:15:15Z","updated_at":"2015-02-26T23:51:39Z","closed_at":null,"body":"Evaluating ibuildthecloud/systemd-docker project (it's a docker run wrapper that migrates container to appropriate systemd unit slice to allow systemd monitor container instead of docker client) I've found strange problem on CentOS 7.0. \r\n\r\nThis wrapper tries to get info from `cpuacct,cpu` cgroup which is absent. I tested same code on my ArchLinux box and on CoreOS (alpha, 509.1.0) and it works. All three systems have same `cpu,cpuacct` cgroup but no `cpuacct,cpu` which were present in error log.\r\n\r\nLooking at `systemd-docker` wrapper source I found that it takes cgroup info from `/proc/<pid>/cgroup`. And on CentOS 7.0 it contains incorrect `cpuacct,cpu` cgroup:\r\n```\r\n[root@localhost ~]# cat /proc/21992/cgroup \r\n10:hugetlb:/\r\n9:perf_event:/\r\n8:blkio:/system.slice/docker-0bd31f558c426d46f30778cefbc727282e4f257537b42b361ea5d03a44f4febe.scope\r\n7:net_cls:/\r\n6:freezer:/system.slice/docker-0bd31f558c426d46f30778cefbc727282e4f257537b42b361ea5d03a44f4febe.scope\r\n5:devices:/system.slice/docker-0bd31f558c426d46f30778cefbc727282e4f257537b42b361ea5d03a44f4febe.scope\r\n4:memory:/system.slice/docker-0bd31f558c426d46f30778cefbc727282e4f257537b42b361ea5d03a44f4febe.scope\r\n3:cpuacct,cpu:/system.slice/docker-0bd31f558c426d46f30778cefbc727282e4f257537b42b361ea5d03a44f4febe.scope\r\n2:cpuset:/\r\n1:name=systemd:/system.slice/docker-0bd31f558c426d46f30778cefbc727282e4f257537b42b361ea5d03a44f4febe.scope\r\n[root@localhost ~]# ls /sys/fs/cgroup/\r\nblkio  cpu  cpuacct  cpu,cpuacct  cpuset  devices  freezer  hugetlb  memory  net_cls  perf_event  systemd\r\n```\r\n\r\nOn ArchLinux (systemd 217, docker 1.3.1/1.15), CentOS 6.5 (docker 1.1.2/1.13), CoreOS 509.1.0 (systemd 215, docker 1.3.2/1.15) container process has correct cgroup `cpu,cpuacct`.\r\n\r\nSee also: ibuildthecloud/systemd-docker#15.\r\n\r\nSteps to reproduce:\r\n* start some container `docker run -d --name test --rm busybox /bin/sh -c 'while true; do date; sleep 5; done'`\r\n* obtain it's pid `docker inspect -f '{{ .State.Pid }}' test`\r\n* take a look at its cgroups: `cat /proc/<pid>/cgroup`\r\n* take a look at cgroups present in the system: `ls /sys/fs/cgroup`\r\n\r\nEnvironment:\r\n```\r\n[root@localhost ~]# uname -a\r\nLinux localhost.localdomain 3.10.0-123.9.3.el7.x86_64 #1 SMP Thu Nov 6 15:06:03 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux\r\n\r\n[root@localhost ~]# docker version\r\nClient version: 1.2.0\r\nClient API version: 1.14\r\nGo version (client): go1.3.3\r\nGit commit (client): 2a2f26c/1.2.0\r\nOS/Arch (client): linux/amd64\r\nServer version: 1.2.0\r\nServer API version: 1.14\r\nGo version (server): go1.3.3\r\nGit commit (server): 2a2f26c/1.2.0\r\n\r\n[root@localhost ~]# docker -D info\r\nContainers: 1\r\nImages: 17\r\nStorage Driver: devicemapper\r\n Pool Name: docker-253:1-201895152-pool\r\n Pool Blocksize: 64 Kb\r\n Data file: /var/lib/docker/devicemapper/devicemapper/data\r\n Metadata file: /var/lib/docker/devicemapper/devicemapper/metadata\r\n Data Space Used: 326.6 Mb\r\n Data Space Total: 102400.0 Mb\r\n Metadata Space Used: 1.1 Mb\r\n Metadata Space Total: 2048.0 Mb\r\nExecution Driver: native-0.2\r\nKernel Version: 3.10.0-123.9.3.el7.x86_64\r\nOperating System: CentOS Linux 7 (Core)\r\nDebug mode (server): false\r\nDebug mode (client): true\r\nFds: 12\r\nGoroutines: 10\r\nEventsListeners: 0\r\nInit SHA1: d1dac0c5b2d548aaad59205c7eae02fe57b6f104\r\nInit Path: /usr/libexec/docker/dockerinit\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/docker/docker/issues/comments/76301247","html_url":"https://github.com/docker/docker/issues/9365#issuecomment-76301247","issue_url":"https://api.github.com/repos/docker/docker/issues/9365","id":76301247,"user":{"login":"jfrazelle","id":1445228,"avatar_url":"https://avatars.githubusercontent.com/u/1445228?v=3","gravatar_id":"","url":"https://api.github.com/users/jfrazelle","html_url":"https://github.com/jfrazelle","followers_url":"https://api.github.com/users/jfrazelle/followers","following_url":"https://api.github.com/users/jfrazelle/following{/other_user}","gists_url":"https://api.github.com/users/jfrazelle/gists{/gist_id}","starred_url":"https://api.github.com/users/jfrazelle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jfrazelle/subscriptions","organizations_url":"https://api.github.com/users/jfrazelle/orgs","repos_url":"https://api.github.com/users/jfrazelle/repos","events_url":"https://api.github.com/users/jfrazelle/events{/privacy}","received_events_url":"https://api.github.com/users/jfrazelle/received_events","type":"User","site_admin":false},"created_at":"2015-02-26T23:51:39Z","updated_at":"2015-02-26T23:51:39Z","body":"what about on 1.5"}}