logind session ID not used due to race condition
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Light Display Manager |
Fix Released
|
High
|
Robert Ancell | ||
1.10 |
Fix Released
|
High
|
Robert Ancell | ||
lightdm (Ubuntu) |
Fix Released
|
Critical
|
Robert Ancell | ||
Trusty |
Fix Released
|
High
|
Robert Ancell | ||
Utopic |
Fix Released
|
Critical
|
Robert Ancell |
Bug Description
[Impact]
Sometimes a session will fail to get the logind session ID to pass back to the LightDM daemon. This appears to be due to a race using the D-Bus method org.freedesktop
This bug was detected by a bug in LightDM 1.11.7 where the daemon would attempt to read both a logind and ConsoleKit ID when this D-Bus call failed.
The solution is to use the XDG_SESSION_ID environment variable and not GetSessionByPID() and to fix the passing of the session id(s) from the session to the daemon to be unambiguous.
[Test Case]
Check the LightDM log always contains lines like:
[+0.78s] DEBUG: Activating login1 session c1
for each session.
[Regression Potential]
Change is non-trivial and could cause other bugs. Regression tests confirm existing test cases work.
Changed in lightdm (Ubuntu): | |
importance: | Undecided → High |
Changed in lightdm (Ubuntu): | |
assignee: | nobody → Robert Ancell (robert-ancell) |
importance: | High → Critical |
status: | New → Triaged |
Changed in lightdm: | |
status: | New → Triaged |
importance: | Undecided → High |
assignee: | nobody → Robert Ancell (robert-ancell) |
Changed in lightdm: | |
milestone: | none → 1.11.8 |
status: | Triaged → Fix Released |
summary: |
- Krillin fails to display spinner/unity8 after upgrade to 1.11.7-0ubuntu1 + logind session ID not used due to race condition |
Changed in lightdm (Ubuntu Trusty): | |
importance: | Undecided → Medium |
status: | New → In Progress |
assignee: | nobody → Robert Ancell (robert-ancell) |
importance: | Medium → High |
description: | updated |
description: | updated |
description: | updated |
root@ubuntu- phablet: /var/log/ lightdm# cat lightdm.log lightdm/ lightdm. log lightdm/ lightdm. conf.d lightdm/ lightdm. conf.d/ 50-greeter- wrapper. conf lightdm/ lightdm. conf.d/ 50-guest- wrapper. conf lightdm/ lightdm. conf.d/ 50-xserver- command. conf lightdm/ lightdm. conf.d/ 52-ubuntu- touch.conf xdg/data/ lightdm/ lightdm. conf.d lightdm/ lightdm. conf.d lightdm. conf.d/ 90-phablet. conf lightdm. conf .DisplayManager lightdm/ unity-system- compositor. log ubuntu- touch-session/ usc-wrapper --file '/run/mir_socket' --from-dm-fd 10 --to-dm-fd 13 --vt 1 .DisplayManager p/DisplayManage r/Seat0 .Accounts p/Accounts/ User32011 added autologin' , username 'phablet' p/DisplayManage r/Session0 ubuntu- touch-lightdm- session ubuntu- touch-session lightdm- data/phablet phablet: /var/log/ lightdm# cat unity-system- compositor. log
[+0.00s] DEBUG: Logging to /var/log/
[+0.00s] DEBUG: Starting Light Display Manager 1.11.7, UID=0 PID=1323
[+0.00s] DEBUG: Loading configuration dirs from /usr/share/
[+0.00s] DEBUG: Loading configuration from /usr/share/
[+0.00s] DEBUG: Loading configuration from /usr/share/
[+0.00s] DEBUG: Loading configuration from /usr/share/
[+0.00s] DEBUG: Loading configuration from /usr/share/
[+0.00s] DEBUG: Loading configuration dirs from /custom/
[+0.00s] DEBUG: Loading configuration dirs from /etc/xdg/
[+0.00s] DEBUG: Loading configuration from /etc/lightdm/
[+0.00s] DEBUG: Loading configuration from /etc/lightdm/
[+0.00s] DEBUG: Using D-Bus name org.freedesktop
[+0.01s] DEBUG: Registered seat module xlocal
[+0.01s] DEBUG: Registered seat module xremote
[+0.01s] DEBUG: Registered seat module unity
[+0.06s] DEBUG: Monitoring logind for seats
[+0.06s] DEBUG: New seat added from logind: seat0
[+0.06s] DEBUG: Seat seat0: Starting
[+0.07s] DEBUG: Using VT 1
[+0.07s] DEBUG: DisplayServer: Logging to /var/log/
[+0.07s] DEBUG: Launching process 1369: /usr/share/
[+0.07s] DEBUG: DisplayServer: Waiting for system compositor for 60s
[+0.07s] DEBUG: Acquired bus name org.freedesktop
[+0.07s] DEBUG: Registering seat with bus path /org/freedeskto
[+0.30s] DEBUG: Loading users from org.freedesktop
[+0.30s] DEBUG: User /org/freedeskto
[+1.43s] DEBUG: DisplayServer: READY
[+1.43s] DEBUG: DisplayServer: Compositor ready
[+1.43s] DEBUG: Seat seat0: Compositor ready
[+1.43s] DEBUG: Seat seat0: Creating user session
[+1.43s] DEBUG: Seat seat0: Creating display server of type mir
[+1.44s] DEBUG: Seat seat0: Display server ready, starting session authentication
[+1.44s] DEBUG: Session pid=1623: Started with service 'lightdm-
[+1.50s] DEBUG: Session pid=1623: Authentication complete with return value 0: Success
[+1.50s] DEBUG: Seat seat0: Session authenticated, running command
[+1.50s] DEBUG: Registering session with bus path /org/freedeskto
[+1.51s] DEBUG: Session pid=1623: Running command /usr/sbin/
[+1.51s] DEBUG: Creating shared data directory /var/lib/
[+1.51s] DEBUG: Session pid=1623: Logging to .xsession-errors
root@ubuntu-
Warning: ignoring unrecognised arguments: --vt 1
GL_VENDOR = ARM
GL_RENDERER = Mali-400 MP
GL_VERSION = OpenGL ES 2.0
dm_connection_start
WARNING: QApplication was not created in the main() thread.
initialized brightness parameters
Opening session session-0