zombie containerd-shim processes
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 35/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- docker, shell
- 领域
- devops, infrastructure
调研方向
使用 docker:20-dind 重现 issue 中的命令,然后将正常执行与使用 --init 的执行以及以 containerd 作为 PID 1 的执行进行比较。检查由此产生的 containerd-shim 进程和相关的 containerd 行为,包括链接的 containerd issue,以确定它们为何会持续存在。完成的标准是,反复运行短生命周期容器后不再留下僵尸 shim。
由索引模型根据 Issue 内容生成。
描述
$ docker pull docker:20-dind
20-dind: Pulling from library/docker
Digest: sha256:4e1e22f471afc7ed5e024127396f56db392c1b6fc81fc0c05c0e072fb51909fe
Status: Image is up to date for docker:20-dind
docker.io/library/docker:20-dind
$ docker run -dit --privileged --name test docker:20-dind dockerd
1ee25dc98bf4bc5e232abe27a9e651b18cbfb8b3f6ca981c3ae64c894584e7b4
$ docker exec test ps faux
PID USER TIME COMMAND
1 root 0:00 dockerd
33 root 0:00 containerd --config /var/run/docker/containerd/containerd.toml --log-level info
154 root 0:00 ps faux
$ docker exec test docker run --rm tianon/true
Unable to find image 'tianon/true:latest' locally
latest: Pulling from tianon/true
c53fb220cbad: Pulling fs layer
c53fb220cbad: Verifying Checksum
c53fb220cbad: Download complete
c53fb220cbad: Pull complete
Digest: sha256:009cce421096698832595ce039aa13fa44327d96beedb84282a69d3dbcf5a81b
Status: Downloaded newer image for tianon/true:latest
$ docker exec test ps faux
PID USER TIME COMMAND
1 root 0:00 dockerd
33 root 0:00 containerd --config /var/run/docker/containerd/containerd.toml --log-level info
220 root 0:00 [containerd-shim]
294 root 0:00 ps faux
$ docker exec test docker run --rm tianon/true
$ docker exec test docker run --rm tianon/true
$ docker exec test docker run --rm tianon/true
$ docker exec test ps faux
PID USER TIME COMMAND
1 root 0:00 dockerd
33 root 0:00 containerd --config /var/run/docker/containerd/containerd.toml --log-level info
220 root 0:00 [containerd-shim]
331 root 0:00 [containerd-shim]
429 root 0:00 [containerd-shim]
529 root 0:00 [containerd-shim]
600 root 0:00 ps faux
If I do the same test with --init or ... docker:20-dind docker-init dockerd, then we get no zombies.
I think this is technically a bug in containerd, because I can reproduce with bare containerd as pid1 as well, but it doesn't seem quite the same as https://github.com/containerd/containerd/issues/5708 (although perhaps related).
cc @thaJeztah @cpuguy83
$ docker run -dit --privileged --name test --volume /var/lib/containerd docker:20-dind containerd
2fa1f7a0b543808572a7a2da7ad28fd165d783f1ac8f3e9c59ebb30417f43b9f
$ docker exec test ps faux
PID USER TIME COMMAND
1 root 0:00 containerd
44 root 0:00 ps faux
$ docker exec test ctr i pull docker.io/tianon/true:latest
...
$ docker exec test ctr run --rm docker.io/tianon/true:latest foo
$ docker exec test ps faux
PID USER TIME COMMAND
1 root 0:00 containerd
110 root 0:00 [containerd-shim]
152 root 0:00 ps faux
- 主要语言
- Shell
- 星标
- 1.5k
- 派生
- 643
- 平均合并
- 21 小时 57 分钟
- 30 天内合并 PR
- 2
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
docker-library/docker 的其他 Issue
-
难度 4/5 3-5 天 新手友好度 35/100
docker-library/docker#524 · 2 条评论 · 1 个 reaction ·
-
Request
难度 4/5 3-5 天 新手友好度 42/100
docker-library/docker#306 · 13 条评论 · 52 个 reaction ·
-
Request
难度 2/5 1-3 小时 新手友好度 45/100
docker-library/docker#242 · 2 条评论 · 1 个 reaction ·
查看 docker-library/docker 的全部 Issue
相似的 Issue
-
bot-found documentation priority: P3
难度 1/5 1-3 小时 新手友好度 88/100
madenvel/KalinkaPlayer#602 ·
-
bug
难度 2/5 1-3 小时 新手友好度 65/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
huggingface/kernels#1006 ·
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 94/100
维护者通常 2 天内回复
-
severity: low
难度 2/5 1-3 小时 新手友好度 84/100
luainkernel/lunatik#2594 ·
维护者通常 1 天内回复