fwupd consuming 100% CPU
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
appstream-glib (Ubuntu) |
Fix Released
|
Medium
|
Unassigned | ||
Xenial |
Fix Released
|
Medium
|
Unassigned | ||
Yakkety |
Fix Released
|
Medium
|
Unassigned |
Bug Description
[Impact]
* Corrupt yaml data is causing consumers of appstream data (such as gnome-software or fwupd) to get stuck in a spin and consume CPU and battery.
[Test Case]
* Introduce corrupt data into /var/lib/
* Execute sudo /usr/lib/
* Check CPU usage calms down after initialization
[Regression Potential]
* This patch has been backported from a newer stable release upstream.
* Due to the nature of backporting, it doesn't directly apply to Ubuntu and will need some adjustments made.
* Regressions would occur in gnome-software not displaying software or fwupd not running properly.
[Other Info]
Original bug report:
fwupd process has been consuming 100% of my CPU for several days now (IBM Thinkpad x250 running fully updated 16.04).
gdb backtrace below.
Thread 2 (Thread 0x7f3272cf5700 (LWP 4496)):
#0 0x00007f3279b79e8d in poll () at ../sysdeps/
No locals.
#1 0x00007f327ae9331c in ?? () from /lib/x86_
No symbol table info available.
#2 0x00007f327ae9342c in g_main_
No symbol table info available.
#3 0x00007f327ae93469 in ?? () from /lib/x86_
No symbol table info available.
#4 0x00007f327aeb9b45 in ?? () from /lib/x86_
No symbol table info available.
#5 0x00007f3279e4f6fa in start_thread (arg=0x7f3272cf
__res = <optimized out>
pd = 0x7f3272cf5700
now = <optimized out>
unwind_buf = {cancel_jmp_buf = {{jmp_buf = {139854651283200, 418179942412000561, 0, 140731891236207,
0x0, 0x0, 0x0, 0x0}, data = {prev = 0x0, cleanup = 0x0, canceltype = 0}}}
pagesize_m1 = <optimized out>
sp = <optimized out>
freesize = <optimized out>
#6 0x00007f3279b85b5d in clone () at ../sysdeps/
No locals.
Thread 1 (Thread 0x7f327c926900 (LWP 4486)):
#0 0x00007f3279e542b7 in __GI___
at pthread_
result = 0
wake = false
#1 0x00007f3279aaf0e9 in __dcigettext (domainname=
msgid1=
__p = <optimized out>
domain = <optimized out>
binding = <optimized out>
dirname = <optimized out>
xdomainname = <optimized out>
retval = <optimized out>
retlen = 93892446493824
saved_errno = 0
search = {domainname = 0x7ffeb262bb00 "`\234\353\teU", category = 166588464,
ptr = 0x52fb0a5631f15a00 <error: Cannot access memory at address 0x52fb0a5631f15
foundp = 0x0
localename = <optimized out>
#2 0x00007f327b44338c in ?? () from /usr/lib/
No symbol table info available.
#3 0x00007f327b3e95f9 in ?? () from /usr/lib/
No symbol table info available.
#4 0x00007f327b40d315 in g_input_stream_read () from /usr/lib/
No symbol table info available.
#5 0x00007f327c1ae569 in ?? () from /usr/lib/
No symbol table info available.
#6 0x00007f3278c51a15 in ?? () from /usr/lib/
No symbol table info available.
#7 0x00007f3278c51cde in yaml_parser_
No symbol table info available.
#8 0x00007f3278c56498 in yaml_parser_
No symbol table info available.
#9 0x00007f3278c5b32f in yaml_parser_parse () from /usr/lib/
No symbol table info available.
#10 0x00007f327c1ae39b in ?? () from /usr/lib/
No symbol table info available.
#11 0x00007f327c1ae890 in as_yaml_from_file () from /usr/lib/
No symbol table info available.
#12 0x00007f327c1a9231 in ?? () from /usr/lib/
No symbol table info available.
#13 0x00007f327c1a9867 in ?? () from /usr/lib/
No symbol table info available.
#14 0x00007f327c1a9ee1 in ?? () from /usr/lib/
No symbol table info available.
#15 0x00007f327c1aa994 in as_store_load () from /usr/lib/
No symbol table info available.
#16 0x00005565094a59c7 in main ()
No symbol table info available.
Changed in fwupd (Ubuntu): | |
status: | New → Incomplete |
Changed in fwupd (Ubuntu Xenial): | |
status: | New → Invalid |
Changed in fwupd (Ubuntu Yakkety): | |
status: | Incomplete → Invalid |
Changed in appstream-glib (Ubuntu Xenial): | |
status: | New → Confirmed |
tags: | added: patch xenial |
Changed in appstream-glib (Ubuntu Xenial): | |
importance: | Undecided → Medium |
Changed in appstream-glib (Ubuntu Yakkety): | |
importance: | Undecided → Medium |
description: | updated |
no longer affects: | libyaml (Ubuntu) |
no longer affects: | libyaml (Ubuntu Yakkety) |
no longer affects: | libyaml (Ubuntu Xenial) |
no longer affects: | fwupd (Ubuntu Yakkety) |
no longer affects: | fwupd (Ubuntu Xenial) |
no longer affects: | fwupd (Ubuntu) |
Interesting bug. This looks to be spinning in libyaml, but without debug symbols it's a little hard to piece together. Could you please install the relevant debug symbols (at least libappstream-glib, fwupd and libyaml) and get a new backtrace please. If you can reproduce using "fwupd --verbose" that might throw some light on what's going on. Thanks!