[lxc-devel] lxc-start: Failed to find current cgroup

Harald Dunkel harri at afaics.de
Sat Aug 17 14:48:44 UTC 2013


Hi Serge,

On 08/17/13 15:29, Serge Hallyn wrote:
>
> Actually I suspect I know what happened.  find_real_cgroup() doesn't
> look like how I remember doing it.  Could you try the below
> (untested) patch?  It'll enter you in a per-container subdir in
> the name=systemd cgroup, which we didn't use to do.  But it may
> be what we want to do in the future case of unprivileged starts
> anyway.
>
> [PATCH 1/1] find_free_cgroup: don't ignore cgroup mounts without subsystems
>
> If we are storing it, then store our current cgroup.  We might
> want to ignore it, but failing was the wrong thing to do in any
> case.
>
> Signed-off-by: Serge Hallyn <serge.hallyn at ubuntu.com>
> ---
>   src/lxc/cgroup.c | 7 -------
>   1 file changed, 7 deletions(-)
>
> diff --git a/src/lxc/cgroup.c b/src/lxc/cgroup.c
> index d2737ea..8caba59 100644
> --- a/src/lxc/cgroup.c
> +++ b/src/lxc/cgroup.c
> @@ -755,13 +755,6 @@ static bool find_real_cgroup(struct cgroup_desc *d, char *path)
>   		return false;
>   	}
>
> -	// If there is no subsystem, ignore the mount.  Note we may want
> -	// to change this, so that unprivileged users can use a unbound
> -	// cgroup mount to arrange their container tasks.
> -	if (!d->subsystems) {
> -		fclose(f);
> -		return false;
> -	}
>   	while (getline(&line, &len, f) != -1) {
>   		if (!(p = index(line, ':')))
>   			continue;
>

Sorry to say, but the patch did not help. Attached is the new debug.out.


Regards
Harri

-------------- next part --------------
      lxc-start 1376750769.487 INFO     lxc_start_ui - using rcfile /var/lib/lxc/lxc0/config
      lxc-start 1376750769.488 INFO     lxc_apparmor - aa_enabled set to 0

      lxc-start 1376750769.488 INFO     lxc_conf - tty's configured
      lxc-start 1376750769.488 INFO     lxc_start - 'lxc0' is initialized
      lxc-start 1376750769.509 INFO     lxc_conf - opened /export/storage/lxc/lxc0/rootfs.hold as fd 20

      lxc-start 1376750769.510 ERROR    lxc_cgroup - Failed to find current cgroup
      lxc-start 1376750769.510 ERROR    lxc_cgroup - Out of memory reading cgroups
      lxc-start 1376750769.539 ERROR    lxc_start - failed to spawn 'lxc0'


More information about the lxc-devel mailing list