[Bug 1637180] Re: "The computer needs to restart" dialog constantly eats CPU

Giuseppe D'Angelo 1637180 at bugs.launchpad.net
Fri Jul 14 21:39:55 UTC 2017


Hi Brian,

do you know some way to get a good backtrace for your purpose? Note that
this is 100% reproducible, just run update manager, and even if it tells
you that the system is up to date, switch window focus to somewhere else
to trigger the 8-10% CPU usage.

A quick gdb -p PID and bt doesn't convey much information, the app is
stuck in GTK's event loop:

(gdb) bt
#0  0x00007f31edfd170d in poll () at ../sysdeps/unix/syscall-template.S:84
#1  0x00007f31ec62338c in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007f31ec623712 in g_main_loop_run () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007f31e3f33395 in gtk_main () from /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
#4  0x00007f31ec3d6e40 in ffi_call_unix64 () from /usr/lib/x86_64-linux-gnu/libffi.so.6
#5  0x00007f31ec3d68ab in ffi_call () from /usr/lib/x86_64-linux-gnu/libffi.so.6
#6  0x00007f31ecdc58fc in ?? () from /usr/lib/python3/dist-packages/gi/_gi.cpython-35m-x86_64-linux-gnu.so
#7  0x00007f31ecdc73e8 in ?? () from /usr/lib/python3/dist-packages/gi/_gi.cpython-35m-x86_64-linux-gnu.so
#8  0x00000000005b7167 in PyObject_Call ()
#9  0x0000000000528d06 in PyEval_EvalFrameEx ()
#10 0x000000000052d2e3 in ?? ()
#11 0x000000000052dfdf in PyEval_EvalCode ()
#12 0x00000000005fd2c2 in ?? ()
#13 0x00000000005ff76a in PyRun_FileExFlags ()
#14 0x00000000005ff95c in PyRun_SimpleFileExFlags ()
#15 0x000000000063e7d6 in Py_Main ()
#16 0x00000000004cfe41 in main ()


Also when this happens strace shows just an endless and constant stream of poll() wakeups over the X11 socket descriptor:

poll([{fd=3, events=POLLIN}, {fd=4, events=POLLIN}, {fd=9, events=POLLIN}, {fd=11, events=POLLIN}, {fd=12, events=POLLIN}], 5, 498) = 1 ([{fd=3, revents=POLLIN}])
recvmsg(3, {msg_name(0)=NULL, msg_iov(1)=[{"A\0Db\374\23`\4\3\0\202\0\f\0`\4\0P8\0\0\0\0\0\0\0\0\0\0\0\0\0", 4096}], msg_controllen=0, msg_flags=0}, 0) = 32
recvmsg(3, 0x7fffa8436e80, 0)           = -1 EAGAIN (Resource temporarily unavailable)
recvmsg(3, 0x7fffa8436d30, 0)           = -1 EAGAIN (Resource temporarily unavailable)
recvmsg(3, 0x7fffa8436e60, 0)           = -1 EAGAIN (Resource temporarily unavailable)
poll([{fd=3, events=POLLIN}, {fd=4, events=POLLIN}, {fd=9, events=POLLIN}, {fd=11, events=POLLIN}, {fd=12, events=POLLIN}], 5, 498) = 1 ([{fd=3, revents=POLLIN}])
recvmsg(3, {msg_name(0)=NULL, msg_iov(1)=[{"#\203|b\32\0\0\0\6\0\2\0\340\330\333\10\0\0\0\0\366\0\0\0\7\0`\4\0\0\0\0"..., 4096}], msg_controllen=0, msg_flags=0}, 0) = 136
recvmsg(3, 0x7fffa8436e80, 0)           = -1 EAGAIN (Resource temporarily unavailable)
recvmsg(3, 0x7fffa8436d30, 0)           = -1 EAGAIN (Resource temporarily unavailable)
recvmsg(3, 0x7fffa8436e60, 0)           = -1 EAGAIN (Resource temporarily unavailable)


This stops as soon as the window gets focused.

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to update-manager in Ubuntu.
https://bugs.launchpad.net/bugs/1637180

Title:
  "The computer needs to restart" dialog constantly eats CPU

Status in One Hundred Papercuts:
  Confirmed
Status in update-manager package in Ubuntu:
  Confirmed
Status in update-manager source package in Artful:
  Confirmed

Bug description:
  After installing certain updates (kernel, system libraries, etc.), the
  "The computer needs to restart" dialog appears periodically, prompting
  the user to restart the system.

  That dialog eats a constant 8-10% of CPU time. That's the issue. (Yes,
  update-manager is niced to 10, but why consuming *any* CPU at all for
  showing a static dialog?)

  ProblemType: Bug
  DistroRelease: Ubuntu 16.04
  Package: update-manager 1:16.04.4
  ProcVersionSignature: Ubuntu 4.4.0-38.57-generic 4.4.19
  Uname: Linux 4.4.0-38-generic x86_64
  NonfreeKernelModules: nvidia_uvm nvidia_modeset nvidia
  ApportVersion: 2.20.1-0ubuntu2.1
  Architecture: amd64
  CurrentDesktop: Unity
  Date: Thu Oct 27 14:07:11 2016
  ExecutablePath: /usr/bin/update-manager
  GsettingsChanges:
   b'com.ubuntu.update-manager' b'show-details' b'true'
   b'com.ubuntu.update-manager' b'window-height' b'766'
   b'com.ubuntu.update-manager' b'first-run' b'false'
   b'com.ubuntu.update-manager' b'window-width' b'939'
   b'com.ubuntu.update-manager' b'launch-time' b'1477544773'
  InstallationDate: Installed on 2016-04-22 (188 days ago)
  InstallationMedia: Ubuntu 16.04 LTS "Xenial Xerus" - Release amd64 (20160420.1)
  InterpreterPath: /usr/bin/python3.5
  PackageArchitecture: all
  SourcePackage: update-manager
  UpgradeStatus: No upgrade log present (probably fresh install)

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



More information about the foundations-bugs mailing list