After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 709625 - Orca consumes increasing amounts of CPU in gnome 3.10
Orca consumes increasing amounts of CPU in gnome 3.10
Status: RESOLVED FIXED
Product: at-spi
Classification: Platform
Component: at-spi2-core
unspecified
Other Linux
: Normal major
: ---
Assigned To: At-spi maintainer(s)
At-spi maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2013-10-08 10:49 UTC by Joanmarie Diggs (IRC: joanie)
Modified: 2013-10-11 09:39 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Proposed patch. (1.38 KB, patch)
2013-10-09 21:48 UTC, Mike Gorse
committed Details | Review

Description Joanmarie Diggs (IRC: joanie) 2013-10-08 10:49:26 UTC
Based on the following messages from the Orca list [1][2], it appears that some change in GNOME 3.10 is causing Orca to consume increasing amounts of CPU. As José indicated [2], when he downgraded Orca's dependencies and used Orca 3.10 in an otherwise 3.8 environment, the problem appears to have gone away. Nonetheless, I'm filing this against Orca until we know where the bug is.

====================================

After execute the following command:
ps -eo pcpu,pid,user,args --sort=-%cpu| head -5

I found the following result:
%CPU   PID USER     COMMAND
10.0 15987 vilmar   /usr/bin/python /usr/bin/orca --replace
 2.8   723 vilmar   /usr/bin/pulseaudio --start
 2.2 13801 vilmar   pidgin
 2.2 13824 vilmar   /usr/lib32/skype/skype --disable-cleanlooks

After I restart orca, wait a while and execute the same command, I found the following result:

%CPU   PID USER     COMMAND
 2.8   723 vilmar   /usr/bin/pulseaudio --start
 2.3 15743 vilmar   /usr/bin/python /usr/bin/orca --replace
 2.2 13801 vilmar   pidgin
 2.2 13824 vilmar   /usr/lib32/skype/skype --disable-cleanlooks
 
====================================

I was using the following software:
gnome 3.8
orca 3.10
atk 2.10
atk-spi2-atk 2.10
atk-spi2-core 2.10
python-atspi 2.10
pyobject 3.10

After I downgrade al the software except orca, the problem seems to be desappeared. 

====================================

[1] https://mail.gnome.org/archives/orca-list/2013-October/msg00062.html
[2] https://mail.gnome.org/archives/orca-list/2013-October/msg00018.html
Comment 1 Joanmarie Diggs (IRC: joanie) 2013-10-09 10:32:03 UTC
Luke identified a commit in at-spi2-core that caused him similar problems. [1][2] Reverting that commit solved his issues. José just reported that reverting this commit has, so far, solved his issues as well. Transferring this bug to AT-SPI.

[1] https://mail.gnome.org/archives/orca-list/2013-October/msg00081.html
[2] https://git.gnome.org/browse/at-spi2-core/commit/?id=fbba09b26d6db7b6b4c889176f3769355da9c7fa
[3] https://mail.gnome.org/archives/orca-list/2013-October/msg00088.html
Comment 2 Mike Gorse 2013-10-09 21:48:33 UTC
Created attachment 256856 [details] [review]
Proposed patch.

If people could test this patch, then it would be really helpful.

Jasper made that commit to fix a warning when somehow we ended up calling g_source_unref and passing NULL. It cleans up the code some, and I don't want to revert it and suspect that doing so would reinstate the warning, although I'm still unsure as to what was triggering it. However, now that I look again at the patch, I'm noticing that it removed a call to g_source_unref(), so perhaps that is somehow related.

This patch should fix a leak, regardless.
Comment 3 Jasper St. Pierre (not reading bugmail) 2013-10-10 23:08:04 UTC
Review of attachment 256856 [details] [review]:

Aha. I was under the impression that returning G_SOURCE_REMOVE would detach the source and thus unref it.
Comment 4 Jose Vilmar Estacio de Souza 2013-10-10 23:31:27 UTC
So far no problems. 
I used all day and had no problems.
Comment 5 Luke Yelavich 2013-10-10 23:38:27 UTC
No problems here with the new patch, after several hours yesterday, and a couple this morning.
Comment 6 Mike Gorse 2013-10-11 09:38:06 UTC
Comment on attachment 256856 [details] [review]
Proposed patch.

Thanks, Jasper. Calling g_source_destroy does remove the ref added y g_source_attach, but there is another ref created initially by g_idle_source_new() that wasn't ever being removed.
Comment 7 Mike Gorse 2013-10-11 09:39:04 UTC
Thanks all for the testing.
Pushed to master and gnome-3-10.