-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Closed
Labels
Description
Description
Deleting tasks with PID 0 via task.Delete(ctx, WithProcessKill) or ctr task delete -f will block due to task.Wait.
When we delete many tasks, it may not work as well as we would like, and will block on the task with pid 0.
Steps to reproduce the issue
The steps to reproduce refer to #7357
- ctr -n demo i pull docker.io/library/redis:latest
- ctr -n demo c create docker.io/library/redis:latest redis
- ctr -n demo task start -d redis
- ctr -n demo c checkpoint --rw --image --task redis redis-checkpoint
- ctr -n demo i ls | grep redis-checkpoint
- find checkpoint config digest in image manifest: for me the image manifest is at /var/lib/containerd/io.containerd.content.v1.content/blobs/sha256/{digest of image}, and the checkpoint config has type application/vnd.containerd.container.checkpoint.config.v1+proto
- the checkpoint config file describes the OCI spec of the checkpointed container, modify it so that runc fails to restore: For instance, I replaced namespace type: pid with type: not, which will cause restore to fail. NOTE: if your edit changes the size of the checkpoint config file containerd will fail to parse it, so you will not make it to runc failing to restore, which reveals the issue at hand.
- container restore: ctr -n demo c restore --rw --live redis-checkpoint redis-checkpoint. This command will fail, and a task will be left with status created.
- ctr -n demo task delete -f redis-checkpoint
Describe the results you received and expected
I want to force delete any tasks that containerd allows to exist, such as tasks with PID 0
What version of containerd are you using?
containerd github.com/containerd/containerd v1.7.13 7c3aca7
Any other relevant information
No response
Show configuration if it is related to CRI plugin.
No response
Reactions are currently unavailable