Docker fails to stop if container ignores signals #7086
Closed
Description
This is a continuation of #6815 which was closed as the solution in the PR could not be agreed upon.
This is a general issue to track the problem where containers don't stop when signaled, causing the docker daemon to fail to stop.
Simple test:
docker run -d fedora sleep 100000
pkill -x docker
sleep 5
pgrep -x docker && echo "DOCKER IS STILL RUNNING!"
The sleep
process fails to exit because of the PID 1 issue, where the default signal handler for PID 1 is set to ignore. Because the container won't exit, the docker process doesn't shut down.