[lxc-users] Problems with user sessions inside a Ubuntu Desktop Container

Alain St-Denis alain at zenfolie.org
Tue Jan 26 16:10:08 UTC 2016



Le 2016-01-26 02:55, Serge Hallyn a écrit :
> Quoting Alain St-Denis (alain at zenfolie.org):
>> Hi,
>>
>> I experience the exact same problem. Similar setup (wily host, elementary freya container). No user session is created when I login the desktop so polkit won't grant elevated privileges.
>>
>> In the container, /proc/1/cgroup shows:
>>
>> 10:cpu,cpuacct:/lxc/topaze
>> 9:freezer:/lxc/topaze
>> 8:devices:/lxc/topaze
>> 7:memory:/lxc/topaze
>> 6:cpuset:/lxc/topaze
>> 5:net_cls,net_prio:/lxc/topaze
>> 4:hugetlb:/lxc/topaze
>> 3:perf_event:/lxc/topaze
>> 2:blkio:/lxc/topaze
>> 1:name=systemd:/lxc/topaze
>>
>> In the container auth.log, I see those lines:
>>
>> Jan 24 15:20:09 topaze systemd-logind[1739]: cgmanager: cgm_list_children for controller=systemd, cgroup_path=lxc/topaze/user failed: invalid request
>> Jan 24 15:20:09 topaze systemd-logind[1739]: New seat seat0.
>> Jan 24 15:20:09 topaze systemd-logind[1739]: Preallocating VTs...
>> Jan 24 15:20:09 topaze systemd-logind[1739]: systemd-logind running as pid 1739
>> Jan 24 15:20:11 topaze lightdm: pam_systemd(lightdm-greeter:session): Failed to create session: Invalid argument
>>
>> The container runs cgproxy.
>>
>> On the host, cgmanager reports:
>>
>> jan 24 15:20:09 opale cgmanager[952]: cgmanager: Invalid path /run/cgmanager/fs/none,name=systemd//lxc/topaze/lxc/topaze/user (No such file or directory)
>> jan 24 15:20:09 opale cgmanager[952]: cgmanager:list_children_main: Could not determine the requested cgroup (systemd:lxc/topaze/user)
>> jan 24 15:20:09 opale cgmanager[952]: cgmanager: Error getting children for systemd:lxc/topaze/user for pid 2095
>>
>> Does anybody have a hint on what causes this cgroup path duplication (lxc/topaze/lxc/topaze)? I suspect it may have something to do with the issue.
> 
> I don't know what elementary freya is, but maybe this is a bug in the systemd
> package there.  Get the cgroxy logs (start it with --debug), and see what
> calls are being made to it.  Better yet strace the login process (maybe
> start with the getty or sshd).  If it is reading the cgroup path from
> /proc/self/cgroup and then using cgmanager to movepid to something based on
> that, that's wrong.
> 

Sorry, I should've provided more details. Elementary OS freya is based
on trusty. It's running with the same pieces of systemd 204-5ubuntu20.15
trusty runs.

cgproxy --debug only shows a message corresponding what is logged for
cgmanager on the host:

Connection from private client
ListChildren: Client fd is: 7 (pid=1722, uid=0, gid=0)
cgproxy:list_children_main: Server encountered an error: bad cgroup?
Disconnected from private client

I'm running the current lxc stable ppa in both the host and the container.

strace on lightdm does show /proc/1/cgroup being opened, but also shows
/proc/self/cgroup. BTW, being new to this list, what is the proper way
to attach large outputs?

Looking at /run/systemd/seats/seat0 in the container I see:

# This is private data. Do not parse.
IS_VTCONSOLE=1
CAN_MULTI_SESSION=0
CAN_TTY=1
CAN_GRAPHICAL=0

which doesn't look right. Something wrong with udev?


More information about the lxc-users mailing list