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
Docker daemon leaks containers when an exec'd container dies #10130
Comments
I belive this is fixed on master, per #9699 Can you test? |
@cpuguy83 Yup, same issue. |
@jpetazzo Did you try on master? |
I'm on a mac with 1.4.1 and boot2docker and I'm experiencing this same issue.
|
@cwdcwd What you're seeing is not a bug; docker reports that the image you're trying to remove is still in use. Stopping a container doesn't remove it. If you execute The Alternatively (and a bit less "brute force"), remove the stopped container first, using |
@thaJeztah aahhhhhh thank you very much! |
Glad I could help! |
I am using docker 1.4.1, and very recently I encountered a consistently reproducible bug (on ubuntu and boot2docker), where docker daemon thinks the container is running, but the container is actually gone. This usually happens when a
docker exec
operation is in progress on a container and the main process of that container dies.To reproduce this issue you can try following:
Create a script called
crash.sh
which sleeps for sometime and then exits with a non-zero code:Then write a
Dockerfile
:Create an image:
docker build -t crash_bug .
Run that image:
docker run --name 'crash_bug' -ti crash_bug
Open another terminal and then exec into this container:
Once the sleep will expire, you'll be kicked out of the terminal from step #5. At this point, you won't be able to either stop or kill the container from step #4 (sending a SIGINT also doesn't work). For ex:
The only way to get rid of the leaked container is to actually restart the host. Because, when you try to restart the daemon for the first time, it doesn't come up. Restarting daemon the second time seems to clean the state.
The text was updated successfully, but these errors were encountered: