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 730152 - Memory leak when listening to object:text-changed events
Memory leak when listening to object:text-changed events
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: 2014-05-14 23:24 UTC by marmuta
Modified: 2016-03-31 16:46 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
build with: gcc leaktest1.c -o leaktest1 $(pkg-config --cflags --libs gobject-2.0 glib-2.0 atspi-2) (604 bytes, text/x-csrc)
2014-05-14 23:24 UTC, marmuta
Details
memory logger, logmem leaktest1|orca|onboard (520 bytes, application/octet-stream)
2014-05-14 23:27 UTC, marmuta
Details
valgrind log (646.89 KB, text/x-log)
2014-05-14 23:31 UTC, marmuta
Details

Description marmuta 2014-05-14 23:24:10 UTC
Created attachment 276567 [details]
build with: gcc leaktest1.c -o leaktest1 $(pkg-config --cflags --libs gobject-2.0 glib-2.0 atspi-2)

Hi, have a look at the attached C-sample. It seems it is enough to register an event listener for object:text-changed events to leak large amounts of memory.

Steps to reproduce:
1) build and run leaktest1.c (or launch Orca or Onboard)
2) monitor memory usage (logmem leaktest1 if you like, attached below)
3) start synaptic package manager
   -> heap grows from <1MB to 135MB
4) "Manage news group subscriptions" for "news.mixmin.net" account in Thunderbird and slowly type 'news' as search filter
   -> heap grows from 135MB to 211MB

We noticed this first with Onboard's memory usage growing into the hundreds of MB to GB, see original bug report here
https://bugs.launchpad.net/bugs/1317436
however Orca seems to be affected as well and it happens across distributions, at least Mageia 5 (Cauldron) and Ubuntu 14.04.


at-spi2-core 2.10.2.is.2.10.1-0ubuntu1
synaptic 0.81.1
thunderbird 1:24.5.0+build1-0ubuntu0.14.04.1
Comment 1 marmuta 2014-05-14 23:27:20 UTC
Created attachment 276568 [details]
memory logger, logmem leaktest1|orca|onboard
Comment 2 marmuta 2014-05-14 23:31:22 UTC
Created attachment 276569 [details]
valgrind log

valgrind --tool=memcheck --leak-check=full --show-leak-kinds=all --log-file=valgrind.log ./leaktest1
Comment 3 marmuta 2014-06-26 16:41:08 UTC
Any news on this? This is a significant memory leak that leads to lockups on at least one of the systems in the original bug report.
Comment 4 Mike Gorse 2016-03-31 16:46:50 UTC
I apologize--I started looking for memory leaks a while ago and fixed several for 3.14, but I never verified this bug.

I've just tested thunderbird with 3.20.0. When I select "manage newsgroup subscriptions" and type "news", memory usage goes up, and it does not go back down when thunderbird exits, but, if I repeat the above steps, then I see no further increases. So, while it appears that memory is being allocated without being released, I am not seeing a leak.

Libdbus has its own wrapper around malloc, and I suspect that it is allocating enough memory to handle a large queue of messages but not freeing it.
Anyway, several leaks in AT-SPI have been fixed, and I think that I can close this bug. Please re-open if you still see a leak.