Unresponsive container after manually stopping a builds.

Every time I manually stop a build, the container used by the ongoing build becomes unresponsive and there is no way to stop it, expect by the manually deleting the container related files in the /var/lib/docker...

Here is more detailed explanation, sometimes our builds gets stuck for a long time (generally trying to run something simple like the compile command or something similar). In this case, if I cancel the build and retry, the next build which fail to execute, with no output/response on the Gitlab CI UI. The container corresponding to the manually cancelled build will be "Up" state but will be unresponsive.

CONTAINER ID    IMAGE         COMMAND    CREATED         STATUS         PORTS    NAMES
95fe4faf23fa    35b8c470bd76  "bash"     39 minutes ago  Up 39 minutes           runner-3c3c483b-project-8-concurrent-0-build

I tried commands like

docker stop <Container ID> or 
docker rm -f <Container ID>

but these commands can't stop the container also. If I restart the docker deamon, the container status changes to DEAD but still can't removed. So in the end, I remove the container related files in /var/lib/docker... and the restart after which the Gitlab CI runs normally again. But the same issue occurs after few builds.

I am running docker as the executor and the Gitlab CI runner is running on the bare metal, installed using the following command:

# For Debian/Ubuntu
apt-get install gitlab-ci-multi-runner
Assignee Loading
Time tracking Loading