Skip to content

Occasional failure to start container with failing to write to cgroup.procs error #31230

@delcypher

Description

@delcypher

Description

I'm using a custom written python script that launches and destroys many docker containers using the docker-py interface. I am using quite an old version of docker-py (1.6.0) unfortunately but with a reasonably new version of Docker.

Very occasionally I get back errors from the Docker daemon when trying to start a container

Traceback (most recent call last):

  File "/home/schemmel/venv/lib/python3.5/site-packages/docker/client.py", line 170, in _raise_for_status
    response.raise_for_status()

  File "/home/schemmel/venv/lib/python3.5/site-packages/requests/models.py", line 893, in raise_for_status
    raise HTTPError(http_error_msg, response=self)

requests.exceptions.HTTPError: 500 Server Error: Internal Server Error for url: http+docker://localunixsocket/v1.24/containers/0eecc9b405968c12d7b1c16d16c39c3d0c174e23c75ee5720aff08c617d1203f/start


During handling of the above exception, another exception occurred:


docker.errors.APIError: 500 Server Error: Internal Server Error ("b'{"message":"oci runtime error: process_linux.go:258: applying cgroup configuration for process caused \\"failed to write 74341 to cgroup.procs: write /sys/fs/cgroup/cpu,cpuacct/docker/0eecc9b405968c12d7b1c16d16c39c3d0c174e23c75ee5720aff08c617d1203f/cgroup.procs: invalid argument\\""}'")

Steps to reproduce the issue:

I can't provide this because I do not have a reliable way to reproduce the issue. It only happened once during the creation and destruction of 1376 containers. I know this is really unhelpful but the best I can do is document what I have observed in the hope that someone might know why this error occurred.

Describe the results you received:

Occasionally containers fail to start with the error

oci runtime error: process_linux.go:258: applying cgroup configuration for process caused 
"failed to write 74341 to cgroup.procs: write /sys/fs/cgroup/cpu,cpuacct/docker/0eecc9b405968c12d7b1c16d16c39c3d0c174e23c75ee5720aff08c617d1203f/cgroup.procs: invalid argument"

Describe the results you expected:

I expect the container to start without this error.

Additional information you deem important (e.g. issue happens only occasionally):

Output of docker version:

Docker version 1.12.5, build 7392c3b0ce

Output of docker info:

docker info
Containers: 0
 Running: 0
 Paused: 0
 Stopped: 0
Images: 65
Server Version: 1.12.5
Storage Driver: btrfs
 Build Version: Btrfs v4.8.5
 Library Version: 101
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
 Volume: local
 Network: null host bridge overlay
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Security Options: seccomp
Kernel Version: 4.8.13-1-ARCH
Operating System: Arch Linux
OSType: linux
Architecture: x86_64
CPUs: 12
Total Memory: 251.8 GiB
Name: sloth
ID: <redacted>
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): false
Registry: https://index.docker.io/v1/
Insecure Registries:
 127.0.0.0/8

Additional environment details (AWS, VirtualBox, physical, etc.):

Run on physical machine with Arch Linux host.

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