Bug 1261724

Summary: Poor rhythmbox performance after upgrade to RHEL 7.2 beta
Product: Red Hat Enterprise Linux 7 Reporter: Phil Anderson <pza>
Component: at-spi2-atkAssignee: Rui Matos <rmatos>
Status: CLOSED ERRATA QA Contact: Desktop QE <desktop-qa-list>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.2CC: bmilar, tpelka
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: at-spi2-atk-2.14.1-1.el7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-11-04 01:48:07 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Phil Anderson 2015-09-10 04:10:02 UTC
Description of problem:
Since upgrading to RHEL 7.2 beta, rhythmbox now chews up 35s CPU time on startup and take 10s+ to search for an artist/album/etc.  Previously startup only took a couple of seconds and the search operations were nearly instant.  This is on a catalog of 15,000 songs.

I tried disabling all plugins as well as rebuilding the library from scratch but the issue persisted.

Version-Release number of selected component (if applicable):
rhythmbox-2.99.1-4.el7.x86_64

How reproducible:
100%

Additional info:
I haven't run callgrind, but I did a few pstacks while it's starting up and libdbus features at the top of the stack most of the time.

#0  0x00007f8f39027360 in _dbus_first_type_in_signature () at /lib64/libdbus-1.so.3
#1  0x00007f8f3901319a in base_reader_next () at /lib64/libdbus-1.so.3
#2  0x00007f8f3901313b in _dbus_type_reader_next () at /lib64/libdbus-1.so.3
#3  0x00007f8f39013ed8 in writer_write_reader_helper () at /lib64/libdbus-1.so.3
#4  0x00007f8f3901414c in _dbus_type_writer_write_reader_partial () at /lib64/libdbus-1.so.3
#5  0x00007f8f390142a9 in replacement_block_replace () at /lib64/libdbus-1.so.3
#6  0x00007f8f390144e0 in _dbus_type_reader_set_basic () at /lib64/libdbus-1.so.3
#7  0x00007f8f39011c6b in _dbus_header_set_field_basic () at /lib64/libdbus-1.so.3
#8  0x00007f8f3901638f in _dbus_message_iter_close_signature.part.5 () at /lib64/libdbus-1.so.3
#9  0x00007f8f39017c6e in dbus_message_iter_append_basic () at /lib64/libdbus-1.so.3
#10 0x00007f8f3e1a2ae5 in emit_event () at /lib64/libatk-bridge-2.0.so.0
#11 0x00007f8f3e1a3956 in state_event_listener () at /lib64/libatk-bridge-2.0.so.0
#12 0x00007f8f45a3e1d7 in signal_emit_unlocked_R () at /lib64/libgobject-2.0.so.0
#13 0x00007f8f45a46471 in g_signal_emit_valist () at /lib64/libgobject-2.0.so.0
#14 0x00007f8f45a4672f in g_signal_emit () at /lib64/libgobject-2.0.so.0
#15 0x00007f8f488f702d in gtk_accessible_set_widget () at /lib64/libgtk-3.so.0
#16 0x00007f8f488963a1 in _gtk_cell_accessible_initialize () at /lib64/libgtk-3.so.0
#17 0x00007f8f488ad102 in create_cell () at /lib64/libgtk-3.so.0
#18 0x00007f8f488ae3ad in gtk_tree_view_accessible_ref_child () at /lib64/libgtk-3.so.0
#19 0x00007f8f3e1a2ecd in children_changed_event_listener () at /lib64/libatk-bridge-2.0.so.0
#20 0x00007f8f45a3e1d7 in signal_emit_unlocked_R () at /lib64/libgobject-2.0.so.0
#21 0x00007f8f45a46471 in g_signal_emit_valist () at /lib64/libgobject-2.0.so.0
#22 0x00007f8f45a46c78 in g_signal_emit_by_name () at /lib64/libgobject-2.0.so.0
#23 0x00007f8f488aed1b in _gtk_tree_view_accessible_add () at /lib64/libgtk-3.so.0
#24 0x00007f8f48b13e70 in gtk_tree_view_row_inserted () at /lib64/libgtk-3.so.0
#25 0x00007f8f45a2cde8 in g_closure_invoke () at /lib64/libgobject-2.0.so.0
#26 0x00007f8f45a3e70d in signal_emit_unlocked_R () at /lib64/libgobject-2.0.so.0
#27 0x00007f8f45a46471 in g_signal_emit_valist () at /lib64/libgobject-2.0.so.0
#28 0x00007f8f45a4672f in g_signal_emit () at /lib64/libgobject-2.0.so.0
#29 0x00007f8f4d7a3847 in rhythmdb_query_model_do_insert () at /lib64/librhythmbox-core.so.7
#30 0x00007f8f4d7a3946 in idle_process_update () at /lib64/librhythmbox-core.so.7
#31 0x00007f8f4d7a3a41 in idle_process_update_idle () at /lib64/librhythmbox-core.so.7
#32 0x00007f8f4572f79a in g_main_context_dispatch () at /lib64/libglib-2.0.so.0
#33 0x00007f8f4572fae8 in g_main_context_iterate.isra.24 () at /lib64/libglib-2.0.so.0
#34 0x00007f8f4572fb9c in g_main_context_iteration () at /lib64/libglib-2.0.so.0
#35 0x00007f8f4691df24 in g_application_run () at /lib64/libgio-2.0.so.0
#36 0x00007f8f4d722fa5 in rb_application_run () at /lib64/librhythmbox-core.so.7
#37 0x0000000000400f82 in main ()

Comment 2 Phil Anderson 2015-09-15 00:02:00 UTC
As rhythmbox hasn't really changed since 7.1, this issue might be assigned to the wrong component.  Note that during rhythmbox startup, caribou and dbus-daemon also chew up significant resources:

  PID USER      PR  NI    VIRT    RES    SHR S  %CPU %MEM     TIME+ COMMAND                                                                
31436 user      20   0 1161532 165944  28892 R  93.3  1.0   0:16.70 rhythmbox                                                              
15781 user      20   0  756240 191412   3812 S  61.8  1.2   8:35.39 caribou                                                                
15612 user      20   0   59164  12424   1288 S  34.8  0.1   5:45.74 dbus-daemon

Comment 3 Bastien Nocera 2016-05-23 12:14:10 UTC
Should be fixed in at-spi2-atk-2.14.1-1.el7

Through this at-spi2-atk commit:
commit c8cda37e28307ad195996ad54b9ee1680cca3ec3
Author: Alejandro PiƱeiro <apinheiro>
Date:   Wed Sep 24 19:40:51 2014 +0200

    Aggressively filtering AddChildren with STATE_MANAGES_DESCENDANTS

See also https://bugzilla.gnome.org/show_bug.cgi?id=738723

Comment 5 Bohdan Milar 2016-08-31 09:09:12 UTC
Unable to reproduce - I have not a catalog of 15,000 songs. Verified as SanityOnly.

Comment 7 errata-xmlrpc 2016-11-04 01:48:07 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2016-2262.html