[Bug 1591868] Re: fwupd consuming 100% CPU
Mario Limonciello
superm1 at ubuntu.com
Fri Aug 19 21:57:02 UTC 2016
I was running some tests with that backport applied to 0.5.13 on Ubuntu
as well as running the master branch and was getting segfaults now with
that same corrupt file I was working with.
Starting program: /usr/bin/appstream-util validate /home/test/yaml.yml
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
/home/test/yaml.yml: [New Thread 0x7ffff10cc700 (LWP 29156)]
[New Thread 0x7ffff08cb700 (LWP 29157)]
Thread 1 "appstream-util" received signal SIGSEGV, Segmentation fault.
__GI___libc_free (mem=0x3) at malloc.c:2952
2952 malloc.c: No such file or directory.
(gdb) bt full
#0 __GI___libc_free (mem=0x3) at malloc.c:2952
ar_ptr = <optimized out>
p = <optimized out>
hook = 0x0
#1 0x00007ffff7bb501b in as_node_destroy_node_cb (node=<optimized out>, user_data=<optimized out>) at as-node.c:140
data = 0x555555796b40
#2 0x00007ffff6dff5f5 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
No symbol table info available.
#3 0x00007ffff6dff5a9 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
No symbol table info available.
#4 0x00007ffff6e00281 in g_node_traverse () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
No symbol table info available.
#5 0x00007ffff7bb55d2 in as_node_unref (node=0x7fffe4009ad0) at as-node.c:157
No locals.
#6 0x00007ffff7bc2f91 in glib_autoptr_cleanup_AsNode (_ptr=<synthetic pointer>) at as-node.h:197
No locals.
#7 as_yaml_from_file (file=file at entry=0x555555798500, cancellable=cancellable at entry=0x0, error=error at entry=0x7fffffffdc70) at as-yaml.c:474
node = <optimized out>
content_type = <optimized out>
parser = {error = YAML_NO_ERROR, problem = 0x0, problem_offset = 0, problem_value = 0, problem_mark = {index = 0, line = 0, column = 0}, context = 0x0, context_mark = {index = 0, line = 0,
column = 0}, read_handler = 0x0, read_handler_data = 0x0, input = {string = {start = 0x0, end = 0x0, current = 0x0}, file = 0x0}, eof = 0, buffer = {start = 0x0, end = 0x0, pointer = 0x0,
last = 0x0}, unread = 0, raw_buffer = {start = 0x0, end = 0x0, pointer = 0x0, last = 0x0}, encoding = YAML_ANY_ENCODING, offset = 0, mark = {index = 0, line = 0, column = 0},
stream_start_produced = 0, stream_end_produced = 0, flow_level = 0, tokens = {start = 0x0, end = 0x0, head = 0x0, tail = 0x0}, tokens_parsed = 0, token_available = 0, indents = {start = 0x0,
end = 0x0, top = 0x0}, indent = 0, simple_key_allowed = 0, simple_keys = {start = 0x0, end = 0x0, top = 0x0}, states = {start = 0x0, end = 0x0, top = 0x0},
state = YAML_PARSE_STREAM_START_STATE, marks = {start = 0x0, end = 0x0, top = 0x0}, tag_directives = {start = 0x0, end = 0x0, top = 0x0}, aliases = {start = 0x0, end = 0x0, top = 0x0},
document = 0x0}
parser_cleanup = <optimized out>
data = 0x0
conv = <optimized out>
info = 0x7fffe4009b90
file_stream = <optimized out>
stream_data = <optimized out>
#8 0x00007ffff7bbd481 in as_store_load_yaml_file (error=0x7fffffffdc70, cancellable=0x0, file=0x555555798500, store=0x55555579a1f0) at as-store.c:1129
tmp = <optimized out>
ctx = 0x0
icon_path = 0x0
root = 0x0
app_n = <optimized out>
n = <optimized out>
tok = 0x0
#9 as_store_from_file_internal (store=0x55555579a1f0, file=0x555555798500, id_prefix=<optimized out>, cancellable=0x0, error=0x7fffffffdc70) at as-store.c:1371
filename = 0x5555557abe60 "/home/test/yaml.yml"
icon_prefix = 0x0
error_local = 0x0
root = 0x0
ptask = 0x5555557a7400
__func__ = "as_store_from_file_internal"
#10 0x000055555555ec97 in ?? ()
No symbol table info available.
#11 0x0000555555559e6f in main ()
No symbol table info available.
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to libyaml in Ubuntu.
https://bugs.launchpad.net/bugs/1591868
Title:
fwupd consuming 100% CPU
Status in appstream-glib package in Ubuntu:
Confirmed
Status in fwupd package in Ubuntu:
Invalid
Status in libyaml package in Ubuntu:
Invalid
Status in appstream-glib source package in Xenial:
Confirmed
Status in fwupd source package in Xenial:
Invalid
Status in libyaml source package in Xenial:
Invalid
Status in appstream-glib source package in Yakkety:
Confirmed
Status in fwupd source package in Yakkety:
Invalid
Status in libyaml source package in Yakkety:
Invalid
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/app-info/yaml/
* Execute sudo /usr/lib/x86_64-linux-gnu/fwupd/fwupd -v
* 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/unix/syscall-template.S:84
No locals.
#1 0x00007f327ae9331c in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
No symbol table info available.
#2 0x00007f327ae9342c in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
No symbol table info available.
#3 0x00007f327ae93469 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
No symbol table info available.
#4 0x00007f327aeb9b45 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
No symbol table info available.
#5 0x00007f3279e4f6fa in start_thread (arg=0x7f3272cf5700) at pthread_create.c:333
__res = <optimized out>
pd = 0x7f3272cf5700
now = <optimized out>
unwind_buf = {cancel_jmp_buf = {{jmp_buf = {139854651283200, 418179942412000561, 0, 140731891236207,
139854651283904, 0, -312637405101744847, -312613451844084431}, mask_was_saved = 0}}, priv = {pad = {
0x0, 0x0, 0x0, 0x0}, data = {prev = 0x0, cleanup = 0x0, canceltype = 0}}}
not_first_call = <optimized out>
pagesize_m1 = <optimized out>
sp = <optimized out>
freesize = <optimized out>
__PRETTY_FUNCTION__ = "start_thread"
#6 0x00007f3279b85b5d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109
No locals.
Thread 1 (Thread 0x7f327c926900 (LWP 4486)):
#0 0x00007f3279e542b7 in __GI___pthread_rwlock_rdlock (rwlock=0x7f3279e43920 <__libc_setlocale_lock>)
at pthread_rwlock_rdlock.c:135
result = 0
wake = false
#1 0x00007f3279aaf0e9 in __dcigettext (domainname=0x7f327aedee63 "glib20",
msgid1=0x7f327b4ca11a "Invalid compressed data", msgid2=0x0, plural=0, n=0, category=5) at dcigettext.c:527
__p = <optimized out>
domain = <optimized out>
binding = <optimized out>
categoryname = <optimized out>
categoryvalue = <optimized out>
dirname = <optimized out>
xdomainname = <optimized out>
single_locale = <optimized out>
retval = <optimized out>
retlen = 93892446493824
saved_errno = 0
search = {domainname = 0x7ffeb262bb00 "`\234\353\teU", category = 166588464,
localename = 0x556509ededa8 "p\362\355\teU", counter = 166589040, domain = 0x23,
translation = 0x5565fffffffb <error: Cannot access memory at address 0x5565fffffffb>,
translation_length = 93892446493792, msgid = {appended = 0x7ffeb262bb08 "",
ptr = 0x52fb0a5631f15a00 <error: Cannot access memory at address 0x52fb0a5631f15a00>}}
foundp = 0x0
localename = <optimized out>
domainname_len = <optimized out>
#2 0x00007f327b44338c in ?? () from /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0
No symbol table info available.
#3 0x00007f327b3e95f9 in ?? () from /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0
No symbol table info available.
#4 0x00007f327b40d315 in g_input_stream_read () from /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0
No symbol table info available.
#5 0x00007f327c1ae569 in ?? () from /usr/lib/x86_64-linux-gnu/libappstream-glib.so.8
No symbol table info available.
#6 0x00007f3278c51a15 in ?? () from /usr/lib/x86_64-linux-gnu/libyaml-0.so.2
No symbol table info available.
#7 0x00007f3278c51cde in yaml_parser_update_buffer () from /usr/lib/x86_64-linux-gnu/libyaml-0.so.2
No symbol table info available.
#8 0x00007f3278c56498 in yaml_parser_fetch_more_tokens () from /usr/lib/x86_64-linux-gnu/libyaml-0.so.2
No symbol table info available.
#9 0x00007f3278c5b32f in yaml_parser_parse () from /usr/lib/x86_64-linux-gnu/libyaml-0.so.2
No symbol table info available.
#10 0x00007f327c1ae39b in ?? () from /usr/lib/x86_64-linux-gnu/libappstream-glib.so.8
No symbol table info available.
#11 0x00007f327c1ae890 in as_yaml_from_file () from /usr/lib/x86_64-linux-gnu/libappstream-glib.so.8
No symbol table info available.
#12 0x00007f327c1a9231 in ?? () from /usr/lib/x86_64-linux-gnu/libappstream-glib.so.8
No symbol table info available.
#13 0x00007f327c1a9867 in ?? () from /usr/lib/x86_64-linux-gnu/libappstream-glib.so.8
No symbol table info available.
#14 0x00007f327c1a9ee1 in ?? () from /usr/lib/x86_64-linux-gnu/libappstream-glib.so.8
No symbol table info available.
#15 0x00007f327c1aa994 in as_store_load () from /usr/lib/x86_64-linux-gnu/libappstream-glib.so.8
No symbol table info available.
#16 0x00005565094a59c7 in main ()
No symbol table info available.
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/appstream-glib/+bug/1591868/+subscriptions
More information about the foundations-bugs
mailing list