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:
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 unix/syscall- template. S:84 64-linux- gnu/libglib- 2.0.so. 0 64-linux- gnu/libglib- 2.0.so. 0 x86_64- linux-gnu/ libgtk- 3.so.0 x86_64- linux-gnu/ libffi. so.6 x86_64- linux-gnu/ libffi. so.6 python3/ dist-packages/ gi/_gi. cpython- 35m-x86_ 64-linux- gnu.so python3/ dist-packages/ gi/_gi. cpython- 35m-x86_ 64-linux- gnu.so eExFlags ()
#0 0x00007f31edfd170d in poll () at ../sysdeps/
#1 0x00007f31ec62338c in ?? () from /lib/x86_
#2 0x00007f31ec623712 in g_main_loop_run () from /lib/x86_
#3 0x00007f31e3f33395 in gtk_main () from /usr/lib/
#4 0x00007f31ec3d6e40 in ffi_call_unix64 () from /usr/lib/
#5 0x00007f31ec3d68ab in ffi_call () from /usr/lib/
#6 0x00007f31ecdc58fc in ?? () from /usr/lib/
#7 0x00007f31ecdc73e8 in ?? () from /usr/lib/
#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_SimpleFil
#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}]) 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 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, {msg_name(0)=NULL, msg_iov(
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(
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.