← Back to team overview

unity-api-bugs team mailing list archive

[Bug 1357252] Re: Upstart jobs specifying cgroup fail to start occasionally

 

Hi Serge,

Attached are upstart session job output and cgmanager output showing
"good" (desktop utopic in kvm) and "bad" (device) runs:

Note the following:

- The session init in both cases is making the call on cgmanager as a
  non-priv user in an identical way:

    cgmanager_create_sync(controller='freezer', path='upstart_cgroup')

- However, once that gets across the wire, we have differences:

The good run shows:

do_create_main:263: controller='freezer', cgroup='upstart_cgroup', ucred p=(pid=2948, uid=1000, gid=1000), ucred r=(pid=2948, uid=1000, gid=1000)
do_create_main:318: r.pid=2948, r.uid=1000, r.gid=1000, dirpath='/run/cgmanager/fs/freezer/user.slice/user-1000.slice/session-c2.scope'

The bad run shows:

do_create_main:263: controller='freezer', cgroup='upstart_cgroup', ucred p=(pid=638, uid=0, gid=0), ucred r=(pid=3554, uid=32011, gid=32011)
do_create_main:318: r.pid=3554, r.uid=32011, r.gid=32011, dirpath='/run/cgmanager/fs/freezer'

= Differences =

== Path ==

As you picked up previously, upstart never requested that cgmanager
create '/run/cgmanager/fs/freezer', but for some reason that's the
request that arrives. The correct path should be
'/run/cgmanager/fs/freezer/user.slice/user-1000.slice/session-c2.scope'

== uid ==

Bad run shows "uid=0" and "gid=0" - this looks incorrect.


= Possible culprits =

== cgproxy ==

This is running on the device along with cgmanager since the kernel
version is 3.4.67.

However, even when running in debug mode, the entire contents of
/var/log/upstart/cgproxy.log is:

--------------------
Connection from private client
Create: Client fd is: 8 (pid=3554, uid=32011, gid=32011)
cgmanager_create: returning -1; existed is -1
Disconnected from private client
--------------------

== Other possibilities ==

- kernel
- logind?

** Attachment added: "bug-1357252-upstart+cgmanager-logs-20140820.tgz"
   https://bugs.launchpad.net/ubuntu-app-launch/+bug/1357252/+attachment/4182419/+files/bug-1357252-upstart%2Bcgmanager-logs-20140820.tgz

-- 
You received this bug notification because you are a member of Unity API
bugs, which is subscribed to Ubuntu Application Launcher.
https://bugs.launchpad.net/bugs/1357252

Title:
  Upstart jobs specifying cgroup fail to start occasionally

Status in Ubuntu Application Launcher:
  Incomplete
Status in Upstart:
  New
Status in “cgmanager” package in Ubuntu:
  Confirmed

Bug description:
  After the ubuntu-app-launch landing in #188
  (http://people.canonical.com/~ogra/touch-image-stats/188.changes), UI
  Toolkit autopilot tests have started failing, see
  http://ci.ubuntu.com/smokeng/utopic/touch/mako/190:20140815:20140811.1/9676/ubuntuuitoolkit/
  and the #188 results too. It's different tests each time, but a bit
  above 10 of them tend to fail on each full run.

  Reproducable locally, where I got 11 such failures.

  To reproduce:
  [terminal 1]
  1. flash/update device if needed
  2. adb shell
  3. apt install ubuntu-ui-toolkit-autopilot
  4. powerd-cli display on bright # leave running, also unlock the screen so that lenses are shown
  [terminal 2]
  5. phablet-config autopilot --dbus-probe enable # wait until finishes
  6. phablet-test-run ubuntuuitoolkit

  A full test suite run will take around 0.5h and should produce a bunch
  of 'Application failed to start.':s.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu-app-launch/+bug/1357252/+subscriptions


References