-
Notifications
You must be signed in to change notification settings - Fork 373
Creating container DO NOT need runtime anymore in kata-shim-v2
?
#1170
Comments
Hi @BetaXOi , Where is the zombie process, in host or qemu target? If in host, can you paste some details info about the zombie processes? |
zombie process is in container, i will show my test detail below
(create
v1:
v2:
v1:
v2:
|
Hi @BetaXOi I cannot reproduce your case for v1, what's the containerd version and host you used?
|
Hi @BetaXOi, Any comments? |
Hi @BetaXOi, I spent some time to investigate this issue, and found that: In fact, you can also reproduce the zombie process in runC with host kernel later than 4.11. I think you had misunderstood the kernel's feature "CHILD SUBREAPER". Actually The child subreaper cannot
That's why kernel reparent the child process to container's (PID 1) process instead of the shim/kata-agent process. |
Thanks for the clarification, @lifupan. Yes, as @lifupan said, it's a feature, it's not a bug 😂 The zombies are caused by abusing of the kernel defect which has been fixed in new kernels, and they are not related to any kata features. However, as there are users depending on the fixed behavior, I think we should document this case at least. |
What you referenced was presented in 2016, and the shimv2 was introduced in containerd in 2018 ( containerd/containerd#2434), and the containerd PR was self-documented. In the issue #485, which was implemented in #572, we discussed with containerd guys including Michael Crosby and made sure the implementation followed the latest containerd principles and architecture. The future runtimes were encouraged to implement the shimv2 API instead of the non-standard and too process dedicated runC compatible command line interface. Hope my words could help you understand where the shimv2 came from, @BetaXOi . |
Since kata support
containerd shimv2 API
#572, creating a container viakata-shim-v2
do not needkata-runtime
anymore, but i don't think this is a good idea. It breaks the containerd original architecture. see https://github.com/crosbymichael/dockercon-2016/blob/master/Creating%20Containerd.pdfI did some test byThe reason there is zombie in container maybekata-shim-v2
, it will cause zombie process in container becausekata-shim-v2
does not listenSIGCHLD
and reap child process.kata-agent
not setCHILD SUBREAPER
, So It is not associated withkata-shim-v2
, my bad.The text was updated successfully, but these errors were encountered: