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

Qiang Huang h.huangqiang at huawei.com
Fri May 24 10:22:02 UTC 2013


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?

Thanks~





More information about the lxc-devel mailing list