docker / cli

The Docker CLI
Apache License 2.0
4.76k stars 1.89k forks source link

When creating or starting a container, there is a prompt indicating that the container has failed to start. #4955

Open YXY0721 opened 4 months ago

YXY0721 commented 4 months ago

Description

When creating or starting a container, there is a prompt indicating that the container has failed to start. Error is : Error response from daemon: OCI runtime create failed: container_linux.go:380: starting container process caused: process_linux.go:385: applying cgroup configuration for process caused: failed to write "800000": write /dev/cpu/docker/ea7fe7db9a81f8658a23f4c742c299cbec02e2f7f453894408a8381af27afd89/cpu.rt_runtime_us: invalid argument: unknown Error

Reproduce

docker container create -h test1 --name test1 --cpu-rt-runtime=800000 --ulimit rtprio=10 --cap-add=sys_nice -m 12G --network bridge --restart=always -v /data/local/lxc_instance1:/data android:latest instance1 docker start test1 Error response from daemon: OCI runtime create failed: container_linux.go:380: starting container process caused: process_linux.go:385: applying cgroup configuration for process caused: failed to write "800000": write /dev/cpu/docker/ea7fe7db9a81f8658a23f4c742c299cbec02e2f7f453894408a8381af27afd89/cpu.rt_runtime_us: invalid argument: unknown Error

Expected behavior

container start

docker version

docker version
Client:
 Version:           20.10.9
 API version:       1.41
 Go version:        go1.16.8
 Git commit:        c2ea9bc
 Built:             Mon Oct  4 16:03:36 2021
 OS/Arch:           linux/arm64
 Context:           default
 Experimental:      true

Server: Docker Engine - Community
 Engine:
  Version:          20.10.9
  API version:      1.41 (minimum version 1.12)
  Go version:       go1.16.8
  Git commit:       79ea9d3
  Built:            Mon Oct  4 16:07:19 2021
  OS/Arch:          linux/arm64
  Experimental:     false
 containerd:
  Version:          v1.4.11
  GitCommit:        5b46e404f6b9f661a205e28d59c982d3634148f8
 runc:
  Version:          1.0.2
  GitCommit:        v1.0.2-0-g52b36a2d
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0

docker info

docker info
Client:
 Context:    default
 Debug Mode: false

Server:
 Containers: 2
  Running: 2
  Paused: 0
  Stopped: 0
 Images: 1
 Server Version: 20.10.9
 Storage Driver: overlay2
  Backing Filesystem: f2fs
  Supports d_type: true
  Native Overlay Diff: true
  userxattr: false
 Logging Driver: json-file
 Cgroup Driver: cgroupfs
 Cgroup Version: 1
 Plugins:
  Volume: local
  Network: bridge host ipvlan macvlan null overlay
  Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
 Swarm: inactive
 Runtimes: crun io.containerd.runc.v2 io.containerd.runtime.v1.linux runc
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: 5b46e404f6b9f661a205e28d59c982d3634148f8
 runc version: v1.0.2-0-g52b36a2d
 init version: de40ad0
 Security Options:
  seccomp
   Profile: default
 Kernel Version: 5.15.78-qki-consolidate-android13-8-g1bbb10d5af67-dirty-ab574
 OSType: linux
 Architecture: aarch64
 CPUs: 6
 Total Memory: 14.91GiB
 Name: localhost
 ID: 5UDI:XINQ:FRSJ:XFB7:5V7S:2FM3:IIX6:XAVG:MLLR:FYPS:CLYS:LS3X
 Docker Root Dir: /var/lib/docker
 Debug Mode: false
 Registry: https://index.docker.io/v1/
 Labels:
 Experimental: false
 Insecure Registries:
  127.0.0.0/8
 Live Restore Enabled: false
 Product License: Community Engine

WARNING: API is accessible on http://0.0.0.0:2375 without encryption.
         Access to the remote API is equivalent to root access on the host. Refer
         to the 'Docker daemon attack surface' section in the documentation for
         more information: https://docs.docker.com/go/attack-surface/
WARNING: No blkio throttle.read_bps_device support
WARNING: No blkio throttle.write_bps_device support
WARNING: No blkio throttle.read_iops_device support
WARNING: No blkio throttle.write_iops_device support

Additional Info

dockerd.log

YXY0721 commented 4 months ago

kernek version : 5.15.78

YXY0721 commented 4 months ago

I did not encounter this issue on kernel version 4.19.81.