← Back to team overview

touch-packages team mailing list archive

[Bug 1364725] Re: logind session ID not used due to race condition

 

** Description changed:

- I noticed that after mako's version 213 of ubuntu touch
- (http://people.canonical.com/~ogra/touch-image-stats/213.changes), the
- display started failing quite frequently when using it with krillin (rtm
- is fine though).
+ [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 in the D-Bus callback org.freedesktop.login1.Manager.GetSessionByPID instead of getting the environment variable XDG_SESSION_ID as set in PAM.
  
- Tracking down the changes, it seems that the lightdm update from
- 1.11.6-0ubuntu1 to 1.11.7-0ubuntu1 is the one causing the issue, as I
- can get my display to work perfectly fine with latest image + lightdm
- 1.11.6-0ubuntu1
+ 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 the session would
+ only provide one.
  
- The symptom is a bit weird though, as the display itself is on (with
- proper brightness and so on), but nothing showing up on the screen (like
- not being rendered for some reason). Display power off/on doesn't help,
- and it seems Unity8 is running fine in the background.
+ 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.
  
- When I get this issue, I'm also not able to see the ubuntu touch spinner
- before Unity8 is up.
+ [Test Case]
+ Check the LightDM log always contains lines like:
+ [+0.78s] DEBUG: Activating login1 session c1
+ for each session.
  
- One way to get a working display again is by restarting ligthdm by hand.
- 
- From time to time it also works fine, but it's harder to get into a
- working state (without restarting lightdm by hand) than actually
- reproducing the bug.
+ [Regression Potential]
+ Change is non-trivial and could cause other bugs. Regression tests confirm existing test cases work.

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to lightdm in Ubuntu.
https://bugs.launchpad.net/bugs/1364725

Title:
  logind session ID not used due to race condition

Status in Light Display Manager:
  Fix Released
Status in Light Display Manager 1.10 series:
  In Progress
Status in “lightdm” package in Ubuntu:
  Fix Released
Status in “lightdm” source package in Trusty:
  In Progress
Status in “lightdm” source package in Utopic:
  Fix Released

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 in the D-Bus callback org.freedesktop.login1.Manager.GetSessionByPID instead of getting the environment variable XDG_SESSION_ID as set in PAM.

  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 the session
  would only provide one.

  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.

To manage notifications about this bug go to:
https://bugs.launchpad.net/lightdm/+bug/1364725/+subscriptions


References