[lxc-devel] Failed to remove cgroup when lxc-start failed

Serge Hallyn serge.hallyn at ubuntu.com
Fri May 24 12:49:45 UTC 2013


Quoting Qiang Huang (h.huangqiang at huawei.com):
> Hi,
> 
> I found a tricky problem in LXC, once I made a mistake in config, set
> 
> lxc.cgroup.cpuset.cpus = -1
> 
> ofcourse start would fail, but then "lxc-ls --active" showed the container
> is active.
> 
> error message is:
> # lxc-start -n hq111 -f config_hq -l TRACE
> lxc-start: Invalid argument - write /cgroup/lxc/hq111/cpuset.cpus : Invalid argument
> lxc-start: Error setting cpuset.cpus to -1 for lxc/hq111
> 
> lxc-start: failed to setup the cgroups for 'hq111'
> lxc-start: failed to spawn 'hq111'
> lxc-start: Device or resource busy - failed to remove cgroup '/cgroup/lxc/hq111'
> 
> 
> This is not hard to reproduce, just keep trying, not stable though.
> Then I read through the code and figured recursive_rmdir() failed, rmdir() return
> -1 sometimes, any idea how to fix this?

Could you tell us exactly which version this is, and exactly how you
created the container?  When I do it in ubuntu saucy (roughly 0.9.0 lxc),
the cgroup gets correctly removed.




More information about the lxc-devel mailing list