Skip to content

re-parented shim is not able to be reaped #2078

@cpuguy83

Description

@cpuguy83

Description

Normally when a containerd-shim exits it is handled by terminating the process that was running (assuming it was running).
If containerd is restarted (or most likely if containerd is not the parent process of containerd-shim) the exit is not handled.

When this happens ctr t ls does not show the task corresponding to the shim.
If you attempt to start a new task you get an error like:

ctr: mkdir /var/run/docker/containerd/daemon/io.containerd.runtime.v1.linux/moby/c548dfcd2ba36c863b5a8dc194fb01c82a4de715fb56582a2ab2c3c18ab1d254: file exists: already exists

Steps to reproduce the issue:

  1. Create container + start task
  2. restart containerd
  3. kill (either SIGKILL or SIGTERM) containerd-shim

Describe the results you received:

  • containerd-shim is not reaped
  • containerd-shim socket is left behind
  • container is unusable, must delete and recreate.

Describe the results you expected:

containerd should be able to reap shim resources

Output of containerd --version:

containerd github.com/containerd/containerd v1.0.1 9b55aab90508bd389d7654c4baf173a981477d55

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions