← Back to team overview

touch-packages team mailing list archive

[Bug 1377332] Re: [TOPBLOCKER] UI randomly freezes

 

Just had a chat with Serge and we've got a theory.

cgmanager sends tasks to cgproxy using ucreds. ucreds contain a pid, uid
and gid, all of which must be valid. If however the pid gets killed and
dies between the time the ucred is generated and the time it's sent over
the socket, it'll be invalid and the kernel will refuse to send the
message returning the odd error we're seeing. This then makes cgmanager
give up and keeps cgproxy hanging in recvmsg.

The way around this is to have both cgmanager and cgproxy check for
error on sendmsg and recvmsg, then check the errno and if that matches
the "pid no longer exists" case, then just ignore that entry as it means
the process has now died and so shouldn't be reported anyway.

There probably are some more similar races here and there in
cgmanager/cgproxy when sending processes over ucreds, but getting a
patch for that case (assuming the theory is right) shouldn't be terribly
difficult.

It should also be reasonably easy to construct a testcase which hits
that specific problem by spawning say around a thousand processes, then
killing them all while doing gettasks in an infinite loop (which is a
good approximation of what libual does today).

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

Title:
  [TOPBLOCKER] UI randomly freezes

Status in “cgmanager” package in Ubuntu:
  Confirmed
Status in “ubuntu-app-launch” package in Ubuntu:
  Fix Released
Status in “unity8” package in Ubuntu:
  Opinion
Status in “ubuntu-app-launch” package in Ubuntu RTM:
  Fix Released
Status in “unity8” package in Ubuntu RTM:
  Opinion

Bug description:
  Summary
  UI randomly freezes

  steps:
  1. unlock greeter
  2. open app
  3. pull down random indicator
  4. close indicator
  5. open app
  6. swipe to view all open apps
  7. open launcher
  8. close some open apps
  9. repeat until ui freezes

  device info:
  [service]
  base: system-image.ubuntu.com
  http_port: 80
  https_port: 443
  channel: ubuntu-touch/ubuntu-rtm/14.09-proposed
  device: krillin
  build_number: 79
  version_detail: ubuntu=20141002,device=20141002-d5938d7,custom=1412208099,version=79

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/cgmanager/+bug/1377332/+subscriptions


Follow ups

References