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 686812 - memory leaks
memory leaks
Status: RESOLVED FIXED
Product: system-monitor
Classification: Core
Component: general
git master
Other Linux
: Normal normal
: ---
Assigned To: System-monitor maintainers
System-monitor maintainers
Depends on: 694505
Blocks:
 
 
Reported: 2012-10-24 16:31 UTC by Pavel Vasin
Modified: 2017-05-22 16:55 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
prettytable: fix leak in get_icon_from_gio() (646 bytes, patch)
2012-10-24 16:31 UTC, Pavel Vasin
none Details | Review
util: fix leak in format_network() (819 bytes, patch)
2012-10-24 16:32 UTC, Pavel Vasin
none Details | Review
sysinfo: fix leak in get_os_type() (828 bytes, patch)
2012-10-24 16:32 UTC, Pavel Vasin
none Details | Review
procman-app: fix leak in color_changed_cb() (1.01 KB, patch)
2012-10-24 16:32 UTC, Pavel Vasin
none Details | Review
procman-app: fix leak in get_tree_state() (670 bytes, patch)
2012-10-24 16:33 UTC, Pavel Vasin
none Details | Review
procman-app: fix leaks in apply_cpu_color_settings() (1.28 KB, patch)
2012-10-24 16:33 UTC, Pavel Vasin
none Details | Review
procman-app: plug small leaks (900 bytes, patch)
2013-02-23 09:52 UTC, Pavel Vasin
committed Details | Review

Description Pavel Vasin 2012-10-24 16:31:25 UTC
see patches
Comment 1 Pavel Vasin 2012-10-24 16:31:49 UTC
Created attachment 227166 [details] [review]
prettytable: fix leak in get_icon_from_gio()
Comment 2 Pavel Vasin 2012-10-24 16:32:09 UTC
Created attachment 227167 [details] [review]
util: fix leak in format_network()
Comment 3 Pavel Vasin 2012-10-24 16:32:28 UTC
Created attachment 227168 [details] [review]
sysinfo: fix leak in get_os_type()
Comment 4 Pavel Vasin 2012-10-24 16:32:45 UTC
Created attachment 227169 [details] [review]
procman-app: fix leak in color_changed_cb()
Comment 5 Pavel Vasin 2012-10-24 16:33:04 UTC
Created attachment 227170 [details] [review]
procman-app: fix leak in get_tree_state()
Comment 6 Pavel Vasin 2012-10-24 16:33:21 UTC
Created attachment 227171 [details] [review]
procman-app: fix leaks in apply_cpu_color_settings()
Comment 7 Robert Roth 2012-10-25 12:05:23 UTC
Thanks for the proposed patches, these do fix some memory leaks, thanks for spotting them. How did you find them? Just by reading the code or with some special memory analysis tool?

I will commit these to both the stable and the development versions.
Comment 8 Pavel Vasin 2012-10-25 13:17:32 UTC
(In reply to comment #7)
> How did you find them? Just by reading the code or with some
> special memory analysis tool?

With valgrind, see https://live.gnome.org/Valgrind
Comment 9 Robert Roth 2012-10-25 14:08:14 UTC
Thanks for the info, I did experiment with it (paired with KCacheGrind), but I was merely checking for performance bottlenecks (CPU time) rather then memory leaks.
Comment 10 Robert Roth 2012-11-06 21:45:05 UTC
This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.
Comment 11 Dmitry Shachnev 2013-02-19 15:08:06 UTC
The "util: fix leak in format_network()" part did not get committed — was that intentional? Also, will you backport this to stable?
Comment 12 Dmitry Shachnev 2013-02-19 15:09:52 UTC
My wrong, it *was* committed, sorry. I'll now backport it to Ubuntu.
Comment 13 Dmitry Shachnev 2013-02-22 13:07:41 UTC
Quoting from https://bugs.launchpad.net/ubuntu/+source/gnome-system-monitor/+bug/1110498/comments/6:

Unfortunately it's not fixed. I've left it running for the night and this morning it was using more than 1GB of RAM: http://i.imgur.com/vRng63A.png

I'm using the latest version 3.7.90-0ubuntu1

Also, I've noticed the GNOME System Monitor memory usage increasing rapidly when upgrading a lot of packages using Synaptic Package Manager, maybe someone could check that out...? I'll try to reproduce it when I have lots of updates...
Comment 14 Robert Roth 2013-02-22 13:23:16 UTC
Reopening, as we still have some leaks.
Comment 15 Pavel Vasin 2013-02-23 09:52:39 UTC
Created attachment 237231 [details] [review]
procman-app: plug small leaks
Comment 16 Robert Roth 2013-02-24 03:53:51 UTC
Review of attachment 237231 [details] [review]:

Thanks again, committed.
Comment 17 Robert Roth 2017-05-22 16:55:51 UTC
Ok, this is a really generic ticket, we have handled several memory leaks, but let's handle the rest individually, as I don't think keeping this metabug open forever makes sense.

This problem has been fixed in our software repository. The fix will go into the next software release. Once that release is available, you may want to check for a software upgrade provided by your Linux distribution.