You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
restart containerd if there are some exec(tty=true) processes,like crictl exec -it container-id bash,the shim-v2 does not release stdin fifo fd for exec process and the exec process bash leak.
Steps to reproduce the issue
Terminal 1: crictl exec -it container-id bash
Terminal 2: systemctl restart containerd
Describe the results you received and expected
expected:
bash process exit;
shim-v2 process release stdin FIFO fd;
received:
bash process leak;
shim-v2 process does not release stdin FIFO fd;
What version of containerd are you using?
main branch
Any other relevant information
No response
Show configuration if it is related to CRI plugin.
No response
The text was updated successfully, but these errors were encountered:
Very interesting issue, I think containerd cri need clean them up after restart.
I think the process created by crictl/kubectl exec should have the same lifecycle as the stream connection.
The current CRI plugin will keep waiting for the process to exit even if the connection is disconnected, this design also causes the exec sh process to leak
It's not just containerd restarts that cause exec processes to leak,kubectl exec and crictl exec that don't use the -ti flags, and use CTRL-C will cause exec processes to still be running. These processes can never be exited
Any exec without -d option will leak after containerd restart. It happens because exec client stop opening namedpipe and shim doesn't know that. I think a notify mechanism should be implemented, so that shim can close usingless exec actively.
Description
restart
containerd
if there are someexec(tty=true)
processes,likecrictl exec -it container-id bash
,theshim-v2
does not releasestdin fifo
fd for exec process and the exec processbash
leak.Steps to reproduce the issue
Describe the results you received and expected
expected:
received:
What version of containerd are you using?
main branch
Any other relevant information
No response
Show configuration if it is related to CRI plugin.
No response
The text was updated successfully, but these errors were encountered: