appstream refresh stuck at 100% CPU on xenial

Bug #1583973 reported by Timo Jyrinki
34
This bug affects 7 people
Affects Status Importance Assigned to Milestone
appstream (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

After a few hours of working today I started wondering what was consuming my battery:

 %CPU %MEM TIME+ COMMAND
100,0 0,5 167:06.10 appstreamcli

"appstreamcli refresh" is running according to ps. I need to kill it in order to continue sanely so I may not be getting all the necessary debugging out of it, but here's something.

sudo gdb -p to the process, continue, break and backtrace:
0x00007f14285f9b23 in yaml_parser_parse () from /usr/lib/x86_64-linux-gnu/libyaml-0.so.2
(gdb) bt
#0 0x00007f14285f9b23 in yaml_parser_parse () from /usr/lib/x86_64-linux-gnu/libyaml-0.so.2
#1 0x00007f1429ea9c4c in as_yamldata_parse_distro_data () from /usr/lib/x86_64-linux-gnu/libappstream.so.3
#2 0x00007f1429eab537 in as_metadata_parse_yaml () from /usr/lib/x86_64-linux-gnu/libappstream.so.3
#3 0x00007f1429eabc55 in as_metadata_parse_file () from /usr/lib/x86_64-linux-gnu/libappstream.so.3
#4 0x00007f1429eaed49 in as_data_pool_update () from /usr/lib/x86_64-linux-gnu/libappstream.so.3
#5 0x00007f1429ea4272 in as_cache_builder_refresh () from /usr/lib/x86_64-linux-gnu/libappstream.so.3
#6 0x00000000004049de in ascli_refresh_cache ()
#7 0x0000000000403ceb in as_client_run ()
#8 0x00007f1429ad2830 in __libc_start_main (main=0x403490 <main>, argc=2, argv=0x7fff509d0768, init=<optimized out>,
    fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fff509d0758) at ../csu/libc-start.c:291
#9 0x0000000000403519 in _start ()

And seems to fluctuate between eg yaml_event_delete, yaml_parser_parse, but it seems to be stuck in that as_yamldata_parse_distro_data.

Strace does not seem to output anything when attaching, or I'm doing something wrong:
$ sudo strace -p 14708
strace: Process 14708 attached
strace: [ Process PID=14708 runs in x32 mode. ]
^Cstrace: Process 14708 detached

I have a snapshot of /var/cache/app-info in store if needed. Nothing under xapian/ has timestamp newer than 3h ago when the process had started, and xmls/fwupd.xml is over an hour old too.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in appstream (Ubuntu):
status: New → Confirmed
Revision history for this message
Leopoldo Pena (leopenausa) wrote :

I can confirm the same issue on my laptop with Xenial.

Revision history for this message
Timo Jyrinki (timo-jyrinki) wrote :

Hah, sounds like fix would be released 3h ago and that's why I didn't see any bug filed :D

Bug #1579712

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.