So I think I've come up with a reliable way to reproduce this by placing
a corrupted yaml file in /var/lib/app-info.

Here is the file I placed (notice the extra s at the start):

s---
File: DEP-11
MediaBaseUrl: http://appstream.ubuntu.com/media/main
Origin: ubuntu-xenial-backports-main
Priority: 40
Time: '2016-07-28T18:38:36.877230+00:00'
Version: '0.8'

By running fwupd with that in place, it hangs and pegs at 100% CPU.

The BT of course isn't too surprising where it's hung:

#0  0x00007ffff4249b6f in yaml_parser_parse () from 
/usr/lib/x86_64-linux-gnu/libyaml-0.so.2
#1  0x00007ffff779e5eb in as_node_yaml_process_layer 
(parser=parser@entry=0x7fffffffe030, parent=parent@entry=0x555555832c40) at 
as-yaml.c:225
#2  0x00007ffff779eae0 in as_yaml_from_file (file=file@entry=0x555555830560, 
cancellable=cancellable@entry=0x0, error=error@entry=0x7fffffffe340) at 
as-yaml.c:371
#3  0x00007ffff7799481 in as_store_load_yaml_file (error=0x7fffffffe340, 
cancellable=0x0, file=0x555555830560, store=0x555555795880) at as-store.c:1129
#4  as_store_from_file_internal (store=store@entry=0x555555795880, 
file=file@entry=0x555555830560, id_prefix=id_prefix@entry=0x7ffff77a29ae 
"system", cancellable=cancellable@entry=0x0, 
    error=error@entry=0x7fffffffe340) at as-store.c:1371
#5  0x00007ffff7799ab7 in as_store_load_app_info_file (error=0x7fffffffe340, 
cancellable=0x0, path_xml=0x555555798460 "/var/lib/app-info/yaml/yaml.yml", 
id_prefix=0x7ffff77a29ae "system", 
    store=0x555555795880) at as-store.c:2068
#6  as_store_load_app_info (store=store@entry=0x555555795880, 
id_prefix=id_prefix@entry=0x7ffff77a29ae "system", 
path=path@entry=0x555555798490 "/var/lib/app-info/yaml", 
    flags=flags@entry=AS_STORE_LOAD_FLAG_APP_INFO_SYSTEM, 
cancellable=cancellable@entry=0x0, error=error@entry=0x7fffffffe4d8) at 
as-store.c:2118
#7  0x00007ffff779a131 in as_store_search_app_info 
(store=store@entry=0x555555795880, 
flags=flags@entry=AS_STORE_LOAD_FLAG_APP_INFO_SYSTEM, 
id_prefix=id_prefix@entry=0x7ffff77a29ae "system", 
    path=path@entry=0x555555798430 "/var/lib/app-info", 
cancellable=cancellable@entry=0x0, error=error@entry=0x7fffffffe4d8) at 
as-store.c:2333
#8  0x00007ffff779abe4 in as_store_search_per_system (error=<optimized out>, 
cancellable=0x0, flags=<optimized out>, store=<optimized out>) at 
as-store.c:2535
#9  as_store_load (store=<optimized out>, flags=<optimized out>, 
cancellable=0x0, error=<optimized out>) at as-store.c:2683
#10 0x000055555555d9c7 in main ()

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

Title:
  fwupd consuming 100% CPU

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/appstream-glib/+bug/1591868/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to