PolicyKit not working on krillin

Bug #1365886 reported by Robert Ancell
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
lightdm (Ubuntu)
New
Undecided
Unassigned
policykit (Ubuntu)
New
Undecided
Unassigned
systemd (Ubuntu)
New
Undecided
Unassigned
ubuntu-system-settings (Ubuntu)
New
Undecided
Unassigned

Bug Description

(based on what mterry said - please replace with more accurate information).

PolicyKit is failing to work (?) on krillin. This seems to have been triggered by the update to lightdm 1.11.8. It does not occur in 1.11.7. It seems to happen on every boot. It does not occur on other systems like mako or the desktop.

The cause of PolicyKit failing appears to be the session is lacking the correct cgroups for this. These cgroups are set by logind/systemd.

Revision history for this message
Robert Ancell (robert-ancell) wrote :
Download full text (15.6 KiB)

From #ubuntu-devel

[23:23] <mterry> robert_ancell, poke -- I think lightdm 1.11.8 is causing problems on krillin devices
[23:23] <robert_ancell> mterry, oh, rsalveti said it was working
[23:23] <rsalveti> which problems?
[23:24] <mterry> robert_ancell, rsalveti: I'm seeing that cgroups aren't being set for the user session correctly, so a lot of policykit requests are failing
[23:24] <robert_ancell> mterry, you have a lightdm.log?
[23:24] <mterry> robert_ancell, uh hold on just flashed
[23:24] <robert_ancell> 1.11.7 would have those problems
[23:25] <rsalveti> right, the issue I had got fixed with 1.11.8
[23:26] <robert_ancell> So, anyone want to send me a krillin? :)
[23:26] <mterry> Interesting. I'm not seeing the problem with 1.11.7
[23:27] <robert_ancell> mterry, it was a crash triggered by a race, so you might not have seen it
[23:28] <mterry> robert_ancell, well the failure is reliable with 1.11.8 (only on krillin)
[23:28] <robert_ancell> So I suppose your issue is different, though they both sounds related to logind
[23:37] <siretart> cjwatson: now, they were all straight rebuilds
[23:38] <siretart> cjwatson: btw, libav now migrated to debian/testing
[23:51] <robert_ancell> mterry, are you getting a log?
[23:51] <mterry> robert_ancell, yeah sorry had problems
[23:51] <robert_ancell> np
[23:51] <robert_ancell> just checking :)
[00:02] <mterry> robert_ancell, http://paste.ubuntu.com/8254607/
[00:02] <mterry> worth the wait!
[00:03] <robert_ancell> mterry, hmm, so that log looks good. There's definitely a logind session open and we activated it
[00:04] <robert_ancell> mterry, have you tried running loginctl and checking everything looks happy there?
[00:04] <mterry> robert_ancell, it does yes
[00:04] <mterry> robert_ancell, it's a cgroup thing as far as I can tell
[00:04] <mterry> root@ubuntu-phablet:/# cat /proc/`pidof unity8`/cgroup
[00:04] <mterry> 4:name=systemd:/
[00:04] <mterry> 3:freezer:/user.slice/user-32011.slice/session-c1.scope
[00:04] <mterry> 2:cpuacct:/user.slice/user-32011.slice/session-c1.scope
[00:04] <mterry> 1:cpu:/user.slice/user-32011.slice/session-c1.scope
[00:05] <robert_ancell> mterry, right, but the cgroups are all set by pam_systemd aren't they?
[00:05] <robert_ancell> mterry, have you confirmed 1.11.7 works fine?
[00:05] <mterry> robert_ancell, it does for me yes
[00:06] <mterry> let me try downgrading on this same image to double confirm
[00:09] <robert_ancell> mterry, can you get a lightdm.log from 1.11.7 so we can diff
[00:09] <mterry> robert_ancell, yup, downgrading works fine
[00:10] <robert_ancell> there's just nothing significant in the diff in how we interact with PAM... very odd...
[00:10] <mterry> robert_ancell, http://paste.ubuntu.com/8254652/
[00:10] <mterry> and more relevantly:
[00:10] <mterry> root@ubuntu-phablet:/# cat /proc/`pidof unity8`/cgroup
[00:10] <mterry> 4:name=systemd:/user.slice/user-32011.slice/session-c1.scope
[00:10] <mterry> 3:freezer:/user.slice/user-32011.slice/session-c1.scope
[00:10] <mterry> 2:cpuacct:/user.slice/user-32011.slice/session-c1.scope
[00:10] <mterry> 1:cpu:/user.slice/user-32011.slice/session-c1.scope
[00:11] <robert_ancell> mterry, that's on a good run?
[00:1...

Revision history for this message
Robert Ancell (robert-ancell) wrote :

The above suggests that the bug might be triggered by r2041, though the results weren't always the same (not sure if errors in testing or bug is a race).

r2041 is to fix bug 1364725 in which there appeared to be a race in calling org.freedesktop.login1.Manager.GetSessionByPID() that would sometimes cause LightDM to not know the session ID for the session and thus never activate it. The solution was to not make this D-Bus call as we already had the session ID in the XDG_SESSION_ID environment variable (this is the technique GDM uses).

Revision history for this message
Robert Ancell (robert-ancell) wrote :

Since code review of r2041 doesn't suggest it should cause a problem my best guess is this revision has sped up the session start slightly by not doing the D-Bus call and this has made a race condition (location unknown) more likely.

description: updated
description: updated
Revision history for this message
Ken VanDine (ken-vandine) wrote :

This is affecting ubuntu-system-settings too, we can't change language or change passphrase on krillin

Revision history for this message
Ken VanDine (ken-vandine) wrote :

Logs from ubuntu-system-settings:

(process:2482): AccountsService-WARNING **: SetLanguage call failed: GDBus.Error:org.freedesktop.Accounts.Error.PermissionDenied: Authentication is required
(process:2482): AccountsService-WARNING **: SetFormatsLocale call failed: GDBus.Error:org.freedesktop.Accounts.Error.PermissionDenied: Authentication is required

Revision history for this message
Sergio Schvezov (sergiusens) wrote :

I have a similar issue while using UDisks2's filesystem Mount, but it's not 100% reproduceable; just happens on some boots

Revision history for this message
Michael Terry (mterry) wrote :

I had been working on this issue in bug 1365095. I'll mark this as a dup.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.