-
Notifications
You must be signed in to change notification settings - Fork 18.6k
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 run
occasionally fails with Error: No such container
#1319
Comments
Can't reproduce, could you start your daemon in debug mode and paste us the docker info output please ? Thanks. |
I think it only happens when I call many
Server output:
|
Note that the container was created:
|
I'm also suffering from this, but with start. This is rare it happened ~20 times in ~37000 containers created. |
I found something interesting. If I remove all containers except the problematic, the next start call will work. EDIT: You don't need to remove all containers, just do something that manipulates the container pool (create, remove, ... another container) and the problematic container will be found in the next call. |
Can you try with the latest release of Docker to see if the problem still happens? |
Docker version 0.6.4, build2f74b1c Still happening. |
Thanks a lot. Can you confirm the exact command(s) that you used to reproduce?
|
Statistically that doesn't have impact (it happens ~ 20/30000). And if you manipulate another container, the previous one that was stuck gets unstuck. (it's like a race condition of some sort) I figured out the best way to reproduce this is to loop: create->start->wait->remove (one container a time) I hacked something very quick to reproduce this consistently but till now wasn't able to reproduce it, but it happens on production which leads me thinking it may be related with the container image since I'm using base image on tests. If you want I can give you ssh access when this happens, it's going to be a node from nodechecker.com so nothing critically you can mess with it :) |
Hmmm, SSH access won't help a lot (mainly because I might not be the right person to inspect that), unfortunately! :-) If you happen to find a way to reproduce it, that would be awesome. Also, if it becomes more annoying, don't hesitate to ping again; I'll see with the rest of the team how we could work on that! |
Here is a script that can reproduce these errors with docker 0.6.7 on my vagrant box (normal mac os install path):
If you play a bit with the parameters you can see different behaviours. I'm getting 3 kinds of errors for now:
Of these I think mostly the first one is important to fix asap imho: it makes docker quite unreliable when starting lots of containers (which most hosting providers will be doing I guess) When removing the -t option, I stop getting "bad file descriptor" error but get this one instead, along with the "no such container" ones:
Thanks! |
Got this new error today with another image:
|
FYI, this is still present in docker 0.7.0. |
See #2911 for a whole load more errors that can occur if you run in parallel. |
There are less errors now but "No such container" is still happening in 0.7.1 ; Sample output of my script:
|
@sylvinus I'll work on this tomorrow |
Excellent thanks :) |
@vieux any news on this? thanks! |
ping? |
Tentatively scheduling for 0.8 |
That's great, thanks! |
I've hit this issue in production too, and after a bit of digging, I'm pretty sure the issue is a race condition in TruncIndex. (Disclaimer: this is my first foray into Go and I only have a loose idea of the threading model). When a new container is created, the id is inserted into an instance of
Since only A simple solution to this would be to add a lock around the read/write methods of |
@jpallen I think a RwMutex would be fine on the index. |
I can no longer reproduce and the last PRs have been merged fixing the races in these areas. |
Got this error again with docker 0.9.0:
I was building an image using https://github.com/racker/docker-ubuntu-with-updates and got the error on the flatten task. |
Does it happen all the time, or randomly...? |
It happens all the time with this particular job (others containers may start just fine). Here is the debug output from the daemon, but it doesn't look verbose enough:
The daemon is lxc-docker 0.9.0 from docker.io repositories, running on Ubuntu Server 12.04 with kernel 3.8.0-37-generic, and I got the error too with boot2docker. I reproduce it running |
Thanks for the details, very useful. I cleared the milestone tag since it's still happening on 0.9. /cc @crosbymichael (not sure who would be the right person...) |
The problem disappeared with docker 0.10. :) |
Awesome, thanks Pierre! Closing this. |
this issue looks similar to this bug... |
Just for the record, I received this error message just earlier this evening on: Docker version 1.11.1, build 5604cbe on CentOS Linux release 7.2.1511 (Core), kernel 3.10.0-229.el7.x86_64 (builder@kbuilder.dev.centos.org) (gcc version 4.8.2 20140120 (Red Hat 4.8.2-16) running inside: VirtualBox 5.0.10 r104061 running on: Ubuntu 16.04 LTS kernel 4.4.0-22-generic (buildd@lcy01-32) (gcc version 5.3.1 20160413 (Ubuntu 5.3.1-14ubuntu2) ) #39-Ubuntu SMP running as: guest on libvirt 1.3.1-r1 running on: Gentoo Linux with kernel 4.1.15-gentoo-r1 The problem did not repeat the second time the script setting up the Docker image was caused to run, so a race condition may still be in effect at least for Docker version 1.11.1 Perhaps it has a higher likelihood with nested VMs. |
Getting same issue with docker 1.12.3 |
I have the following error similar to above but my sever has the overlay as Storage Driver already. Error response from daemon: Cannot kill container mastercdnEmbms_9184: No such container: mastercdnEmbms_9184 $docker info $uname -a |
@pandaycp docker 1.11.2 has reached EOL over a year ago, and there's not a lot of information in your comment to work with (also note that CoreOS is not a supported platform; issues with those packages should be reported with CoreOS, who maintains those). You're commenting on an issue that's almost 5 years old, and was reported with a completely different code-base and runtime, so any issue you run into with a current version of Docker is likely not related. Keep in mind that the GitHub issue tracker is not intended as a general support forum,
I'm locking the conversation on this issue because of the above, and to prevent it from collecting unrelated issues. If you arrive on this issue because you're encountering a problem on a current version, and suspect there's a bug at hand, please open a new issue, providing the information that's requested in the issue template. |
The text was updated successfully, but these errors were encountered: