Skip to content

when i want to try real-time scheduler of docker i get 'failed to write 95000 to cpu.rt_runtime_us' #31411

@huster-hh

Description

@huster-hh

Description
i meet a bug when i try to use real-time scheduler.i am sure my system config CONFIG_RT_GROUP is y.i think it is because its parent cgroup cpu.rt_runtime_us is 0. However i do not know what to do .
Here is BUG information:
docker: Error response from daemon: oci runtime error: container_linux.go:247: starting container process caused "process_linux.go:258: applying cgroup configuration for process caused "failed to write 95000 to cpu.rt_runtime_us: write /sys/fs/cgroup/cpu,cpuacct/system.slice/docker.service/Grouptest/b229f2a6d9f64e68b9e935975b7cdc2c009f9469e8db94167517133d87acf501/cpu.rt_runtime_us: invalid argument""

Steps to reproduce the issue:

  1. Firstly,i check my CONFIG_RT_GROUP is y
  2. Then i install docker 1.13.1(newest),because docker website show real-time scheduler is supported over docker 1.13.
    3.then i run : docker run -it --cpu-rt-runtime=95000 --ulimit rtprio=99 --cap-add=sys_nice --cgroup-parent=Grouptest debian:jessie
    Describe the results you received:
    however i get bug information below:
    docker: Error response from daemon: oci runtime error: container_linux.go:247: starting container process caused "process_linux.go:258: applying cgroup configuration for process caused "failed to write 95000 to cpu.rt_runtime_us: write /sys/fs/cgroup/cpu,cpuacct/system.slice/docker.service/Grouptest/b229f2a6d9f64e68b9e935975b7cdc2c009f9469e8db94167517133d87acf501/cpu.rt_runtime_us: invalid argument"".

Describe the results you expected:
i think it can run ,however it said that can not write to cpu.rt_runtime_us.i have seached some same question ,i think it is because its parent group 's cpu.rt_runtime_us is seted 0;

Additional information you deem important (e.g. issue happens only occasionally):
[huanghang@crane23 cpu]$ ls
cgroup.clone_children cgroup.sane_behavior cpuacct.usage_percpu cpu.rt_period_us cpu.stat notify_on_release tasks
cgroup.event_control cpuacct.stat cpu.cfs_period_us cpu.rt_runtime_us docker release_agent user.slice
cgroup.procs cpuacct.usage cpu.cfs_quota_us cpu.shares Grouptest system.slice

[huanghang@crane23 docker]$ pwd
/sys/fs/cgroup/cpu/docker
[huanghang@crane23 docker]$ ls
cgroup.event_control cpuacct.usage_percpu cpu.rt_runtime_us tasks
7041fa3ded8b9809183c310f80767169c689b3bfd26ff62e8bbc09943fdce071 cgroup.procs cpu.cfs_period_us cpu.shares
9681d9aebadb6655be8bf2bfa91b1746a5797fb432b12e562bee14afec7d9176 cpuacct.stat cpu.cfs_quota_us cpu.stat
cgroup.clone_children cpuacct.usage cpu.rt_period_us notify_on_release
[huanghang@crane23 docker]$ cat cpu.rt_runtime_us
0
[huanghang@crane23 docker]$ sudo sh -c "echo 90000 > cpu.rt_runtime_us"
sh: line 0: echo: write error: Invalid argument

[huanghang@crane23 system.slice]$ pwd
/sys/fs/cgroup/cpu/system.slice
[huanghang@crane23 system.slice]$ cat cpu.rt_runtime_us
0
[huanghang@crane23 system.slice]$ sudo sh -c "echo 90000 > cpu.rt_runtime_us"
sh: line 0: echo: write error: Invalid argument

Output of docker version:

Docker version 1.13.1, build 092cba3

Output of docker info:

Containers: 5
 Running: 2
 Paused: 0
 Stopped: 3
Images: 3
Server Version: 1.13.1
Storage Driver: devicemapper
 Pool Name: docker-253:0-185428-pool
 Pool Blocksize: 65.54 kB
 Base Device Size: 10.74 GB
 Backing Filesystem: xfs
 Data file: /dev/loop0
 Metadata file: /dev/loop1
 Data Space Used: 697.6 MB
 Data Space Total: 107.4 GB
 Data Space Available: 36.42 GB
 Metadata Space Used: 1.524 MB
 Metadata Space Total: 2.147 GB
 Metadata Space Available: 2.146 GB
 Thin Pool Minimum Free Space: 10.74 GB
 Udev Sync Supported: true
 Deferred Removal Enabled: false
 Deferred Deletion Enabled: false
 Deferred Deleted Device Count: 0
 Data loop file: /var/lib/docker/devicemapper/devicemapper/data
 WARNING: Usage of loopback devices is strongly discouraged for production use. Use `--storage-opt dm.thinpooldev` to specify a custom block storage device.
 Metadata loop file: /var/lib/docker/devicemapper/devicemapper/metadata
 Library Version: 1.02.107-RHEL7 (2016-06-09)
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins: 
 Volume: local
 Network: bridge host macvlan null overlay
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: aa8187dbd3b7ad67d8e5e3a15115d3eef43a7ed1
runc version: 9df8b306d01f59d3a8029be411de015b7304dd8f
init version: 949e6fa
Security Options:
 seccomp
  Profile: default
Kernel Version: 3.10.0-327.36.3.el7.x86_64
Operating System: CentOS Linux 7 (Core)
OSType: linux
Architecture: x86_64
CPUs: 20
Total Memory: 125.5 GiB
Name: crane23
ID: KJ47:UX32:LIJ7:XDZO:LJEP:NCEK:NXNY:KNM7:5EHB:CWOM:ZI4W:5JN2
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): false
Registry: https://index.docker.io/v1/
WARNING: bridge-nf-call-iptables is disabled
WARNING: bridge-nf-call-ip6tables is disabled
Experimental: false
Insecure Registries:
 127.0.0.0/8
Live Restore Enabled: false

Additional environment details (AWS, VirtualBox, physical, etc.):
Linux crane23 3.10.0-327.36.3.el7.x86_64 #1 SMP Mon Oct 24 16:09:20 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
Linux version 3.10.0-327.36.3.el7.x86_64 ([email protected]) (gcc version 4.8.5 20150623 (Red Hat 4.8.5-4) (GCC) ) #1 SMP Mon Oct 24 16:09:20 UTC 2016

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions