New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
containerd-shim hangs on reboot/shutdown (live restore + runc v2 runtime) #41831
Comments
@AkihiroSuda @cpuguy83 any ideas? |
Hi, I am also facing this issue. I finally find a workaround from this issue: containerd/containerd#386 (comment) |
Thanks @lantica. Shim v1 handles SIGINT/SIGTERM at |
I don't think Per https://www.freedesktop.org/wiki/Software/systemd/ControlGroupInterface/, I think that My workaround: (for
|
@zhangyoufu I just wanted to note that your workaround will not allow restarting the containers upon reboot, if previously the Edit: Simply leaving out the |
@sebastianFast I'm using |
@zhangyoufu Sadly, I have to use |
@sebastianFast AFAIK, I'm not familiar with |
Thanks for sharing your workaround, @zhangyoufu! It didn't work for me out-of-the-box, but with a little modification. My containers are configured for restart policy I added a delay between the termination and removal of containers. Furthermore, I inspected the man pages of
I don't know the exact reason why it works this way, but maybe it is helpful for others. I really hope that containerd/containerd#5502 gets fixed to get rid of the workaround. |
@git-developer Glad to see that helps. It seems that the PID 1 process of your container did not handle SIGTERM properly. You can test its behavior with IMHO, the PID 1 process is responsible for graceful shutdown of the whole container. That's why I didn't send signal to all process inside container, nor sending a SIGKILL. |
Thanks for your fast response. I'm aware of the topic that processes don't handle SIGTERM properly. I don't think this is the case for my containers. I'm using docker compose with I'm not sure in which situations the use of |
FYI, containerd fixed this issue in v1.6.0, also backported to v1.5.10. EDIT: 20.10 branch is switching to containerd v1.5.X, looking forward to next release. 180f3b9 |
Description
After upgrading docker-ce to 20.10.x, reboot/shutdown the machine hangs 90s due to containerd-shim.
Steps to reproduce the issue:
docker run -d k8s.gcr.io/pause
sudo reboot
Describe the results you received:
The shutdown/reboot process stuck for 90s, due to containerd-shim.
Describe the results you expected:
containerd-shim should not interfere with shutdown/reboot process.
Additional information you deem important (e.g. issue happens only occasionally):
Since #41210, the default runtime is runc v2. The old runc v1 runtime does not have this issue. Tested with the following commands.
Output of
docker version
:Output of
docker info
:Additional environment details (AWS, VirtualBox, physical, etc.):
N/A
The text was updated successfully, but these errors were encountered: