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 688967 - Clock applet leaks memory over time.
Clock applet leaks memory over time.
Status: RESOLVED OBSOLETE
Product: gnome-panel
Classification: Other
Component: clock
3.6.x
Other Linux
: Normal normal
: ---
Assigned To: Panel Maintainers
Panel Maintainers
Depends on:
Blocks:
 
 
Reported: 2012-11-24 05:45 UTC by trusktr
Modified: 2016-10-05 12:28 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
htop shows clock-applet's high mem usage. (50.25 KB, image/png)
2012-11-24 05:45 UTC, trusktr
Details
Before killing (look at System Monitor applet) (804.31 KB, image/png)
2012-11-24 05:46 UTC, trusktr
Details
After killing (look at System Monitor applet) (733.65 KB, image/png)
2012-11-24 05:46 UTC, trusktr
Details
Clock applet using 4.5GB residential memory. (22.02 KB, image/png)
2012-12-24 04:22 UTC, William Ting
Details
Valgrind log of gnome-panel leaking memory (111.24 KB, application/x-gzip)
2013-01-17 07:05 UTC, Kirill Simonov
Details
Valgrind log with full debugging symbols (308.00 KB, application/gzip)
2013-05-30 08:43 UTC, Octavio Alvarez Piza
Details

Description trusktr 2012-11-24 05:45:23 UTC
Created attachment 229753 [details]
htop shows clock-applet's high mem usage.

I avoid restarting and shutting down in favor of suspending and resuming. I've notived that after a while the Clock applet has leaked a significant amount of memory. I'd assume that the clock applet shouldn't leak any memory at all since nothing is even changing (it's only displaying the time).

I've attached some screenshots. One is of the htop command (similar to the top command) showing 32.6% mem usage for clock-applet. The other two are before killing and after killing the clock applet. You can see the instant drop of memory usage in the second box of my System Monitor applet.
Comment 1 trusktr 2012-11-24 05:46:22 UTC
Created attachment 229754 [details]
Before killing (look at System Monitor applet)
Comment 2 trusktr 2012-11-24 05:46:57 UTC
Created attachment 229755 [details]
After killing (look at System Monitor applet)
Comment 3 André Klapper 2012-11-24 20:03:04 UTC
Please provide a valgrind log.
Comment 4 trusktr 2012-11-24 20:32:15 UTC
Would be happy to do so. How do I run clock-applet from the command line? Running /usr/lib/gnome-panel/clock-applet alone doesn't do anything so I think I need to pass some arguments to tell it which panel to be added to, etc, right?
Comment 5 William Ting 2012-12-24 04:21:49 UTC
@Andre, how do you attach valgrind to an applet?
Comment 6 William Ting 2012-12-24 04:22:48 UTC
Created attachment 232185 [details]
Clock applet using 4.5GB residential memory.
Comment 7 trusktr 2013-01-06 07:44:48 UTC
Would someone please tell us how to run clock-applet with valgrind so we can provide the necessary debugging info?
Comment 8 Kirill Simonov 2013-01-17 07:05:42 UTC
Created attachment 233651 [details]
Valgrind log of gnome-panel leaking memory

gnome-panel leaks ~100MB/1h; seems to be a problem with the weather function of the clock applet where I have 4 locations defined.  Valgrind log is attached.
Comment 9 William Makowski 2013-03-22 14:43:06 UTC
I can confirm that the leak is in the the weather function.  If you run without any locations defined it does not consume memory.  I know this is only a temporary work around, but it does keep the applet from being a bother.

Kirill, can you share with the group how you ran valgrind with the applet?  I for one would like to know for future reference.  Thank you.
Comment 10 trusktr 2013-03-27 00:37:12 UTC
Where can I find the source code for the clock applet?
Comment 11 Dominique Leuenberger 2013-03-27 18:51:47 UTC
truskr:

https://git.gnome.org/browse/gnome-panel/tree/applets/clock

=> the clock applet is part of gnome-panel
Comment 12 Octavio Alvarez Piza 2013-05-30 08:43:56 UTC
Created attachment 245616 [details]
Valgrind log with full debugging symbols

I'm attaching a Valgrind log with full debugging symbols, taken under Ubuntu Raring (13.04), x86_64.

Hope it helps.
Comment 13 Octavio Alvarez Piza 2013-05-30 08:52:02 UTC
By the way, here is how I took the valgrind log:

G_SLICE=always-malloc G_DEBUG=gc-friendly,resident-modules valgrind --tool=memcheck --leak-check=full --leak-resolution=high --num-callers=20 --log-file=vgdump-with-dbgsym gnome-panel --replace
Comment 14 trusktr 2013-05-30 08:55:37 UTC
That's helpful to know. After upgrading to Gnome 3.8, I haven't had the mem leak yet, but I haven't added all my customizations yet (timezones, etc). I'll try valgrind if it happens again.
Comment 15 thomas 2016-09-29 12:52:03 UTC
im running ubuntu Ubuntu 16.04.1 with gnome-panel 3.18.3 and im having a memory leak as well (up to hundreds of megabytes after hours of usage), though no locations nor weather plugin enabled with the clock widget.

what do you advice me to do in order to get rid of it or to provide the community with info?
Comment 16 thomas 2016-09-29 13:06:43 UTC
actually, ive just removed the clock widget and am still having the problem. so i guess this is just the wrong place to file the bug.

i dont know. im not feeling so confident in this whole unix world and am, even after googling, honestly without clue whether i should now open a new bug report or should stick to some of the similar sounding threads (different distros, though) i was able to find on google.
Comment 17 William Makowski 2016-10-01 14:48:42 UTC
Thomas, I would start a new bug report for your problem. This bug is rather old and I was surprised that it was still out here. It was a problem in Gnome 3.6 and your are on 3.18. You should be able to narrow down your problem by determining which process has the memory leak using the "top" command at a command prompt. Then pick the closest product in Gnome Bugzilla to create the bug report under. You may even find that someone has reported it under that product.