[Lxc-users] Zombie container
Daniel Lezcano
daniel.lezcano at free.fr
Mon Feb 14 19:26:59 UTC 2011
On 02/14/2011 07:33 PM, Milan Zamazal wrote:
> On a Debian 6.0 machine, I've got a certain container that can't be
> started again once it was stopped:
>
> # lxc-start -n blackbird
> lxc-start: Device or resource busy - failed to remove previous cgroup '/cgroup/blackbird'
> lxc-start: failed to spawn 'blackbird'
> lxc-start: Device or resource busy - failed to remove cgroup '/cgroup/blackbird'
>
> The container seems to be stopped completely but the /cgroup/blackbird/
> directory is indeed non-empty. There are some subdirectories with
> numeric names there but I can't find any processes with such numbers in
> the system nor any other processes related to the container. The only
> way to get rid of it is to reboot the host.
>
> Is there a way to force removal of the cgroup? Or is there a way to
> find out what keeps the cgroup busy?
It is probable you have an application creating new namespaces in the
container. That's triggering a new cgroup creation which is nested with
the container's one. This is a kernel feature (removed for the next
kernel version).
There are several solutions :
* fix this behavior in lxc where we will recursively remove the cgroup
directories
* simply do rm -rf /cgroup/blackbird (don't care about the errors).
As a quick fix, I suggest you look what application created the new
namespace. Launch your container and then look at
/cgroup/blackbird/1234/tasks and look for the command line associated
with the pid in this file. I suspect vsftpd could be the culprit. If
this is the case, there is an option to disable the namespace creation.
http://www.mail-archive.com/lxc-users@lists.sourceforge.net/msg01110.html
Hope that helps.
-- Daniel
More information about the lxc-users
mailing list