weaveworks / ignite

Ignite a Firecracker microVM
https://ignite.readthedocs.org
Apache License 2.0
3.49k stars 226 forks source link

add wait check for task.Kill(cc.ctx, syscall.SIGQUIT) #931

Open Giles2000 opened 2 years ago

Giles2000 commented 2 years ago

when stop the container timeout,ignite will kill the container's task by syscall and delete the killed task. In practice,kill task will takes a little time to finish (maybe a few hundred milliseconds), but delete func does not wait for the kill task to complete. It immediately starts checking that the container's task is not running and tries to delete it. but now,before kill task has completed , the container's task is still running. Therefore, the delete function cannot successfully delete the container.even after a few hundred milliseconds, the container has stopped