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 ()
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--- appstream. ubuntu. com/media/ main xenial- backports- main 28T18:38: 36.877230+ 00:00'
File: DEP-11
MediaBaseUrl: http://
Origin: ubuntu-
Priority: 40
Time: '2016-07-
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 yaml_process_ layer (parser= parser@ entry=0x7ffffff fe030, parent= parent@ entry=0x5555558 32c40) at as-yaml.c:225 entry=0x5555558 30560, cancellable= cancellable@ entry=0x0, error=error@ entry=0x7ffffff fe340) at as-yaml.c:371 load_yaml_ file (error= 0x7fffffffe340, cancellable=0x0, file=0x55555583 0560, store=0x5555557 95880) at as-store.c:1129 from_file_ internal (store= store@entry= 0x555555795880, file=file@ entry=0x5555558 30560, id_prefix= id_prefix@ entry=0x7ffff77 a29ae "system", cancellable= cancellable@ entry=0x0, error@entry= 0x7fffffffe340) at as-store.c:1371 load_app_ info_file (error= 0x7fffffffe340, cancellable=0x0, path_xml= 0x555555798460 "/var/lib/ app-info/ yaml/yaml. yml", id_prefix= 0x7ffff77a29ae "system", 0x555555795880) at as-store.c:2068 load_app_ info (store= store@entry= 0x555555795880, id_prefix= id_prefix@ entry=0x7ffff77 a29ae "system", path=path@ entry=0x5555557 98490 "/var/lib/ app-info/ yaml", flags@entry= AS_STORE_ LOAD_FLAG_ APP_INFO_ SYSTEM, cancellable= cancellable@ entry=0x0, error=error@ entry=0x7ffffff fe4d8) at as-store.c:2118 search_ app_info (store= store@entry= 0x555555795880, flags=flags@ entry=AS_ STORE_LOAD_ FLAG_APP_ INFO_SYSTEM, id_prefix= id_prefix@ entry=0x7ffff77 a29ae "system", path@entry= 0x555555798430 "/var/lib/ app-info" , cancellable= cancellable@ entry=0x0, error=error@ entry=0x7ffffff fe4d8) at as-store.c:2333 search_ per_system (error=<optimized out>, cancellable=0x0, flags=<optimized out>, store=<optimized out>) at as-store.c:2535
#1 0x00007ffff779e5eb in as_node_
#2 0x00007ffff779eae0 in as_yaml_from_file (file=file@
#3 0x00007ffff7799481 in as_store_
#4 as_store_
error=
#5 0x00007ffff7799ab7 in as_store_
store=
#6 as_store_
flags=
#7 0x00007ffff779a131 in as_store_
path=
#8 0x00007ffff779abe4 in as_store_
#9 as_store_load (store=<optimized out>, flags=<optimized out>, cancellable=0x0, error=<optimized out>) at as-store.c:2683
#10 0x000055555555d9c7 in main ()