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 339365 - gnome-cups-icon leak memory
gnome-cups-icon leak memory
Status: RESOLVED FIXED
Product: gnome-cups-manager
Classification: Deprecated
Component: gnome-cups-manager
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Hubert Figuiere (:hub)
Jody Goldberg
Depends on:
Blocks:
 
 
Reported: 2006-04-22 00:37 UTC by Hubert Figuiere (:hub)
Modified: 2008-01-29 13:10 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Fix for the memory leak (713 bytes, patch)
2006-07-03 19:36 UTC, Loïc Minier
none Details | Review
patch to fix the leak. (1.42 KB, patch)
2006-07-03 19:45 UTC, Hubert Figuiere (:hub)
committed Details | Review

Description Hubert Figuiere (:hub) 2006-04-22 00:37:41 UTC
gnome-cups-manager 0.31-1.1ubuntu4

gnome-cups-icon leak memmory over time. It happen all the time.
Comment 1 Hubert Figuiere (:hub) 2006-04-22 02:22:52 UTC
The valgrind report show this.

My take is that the response returned by cupsDoFileRequest is not deleted by an ippDelete()

==12726== 4,272 bytes in 89 blocks are definitely lost in loss record 137 of 153
==12726==    at 0x401C422: malloc (vg_replace_malloc.c:149)
==12726==    by 0x4BE0FEF: strdup (in /lib/tls/i686/cmov/libc-2.3.6.so)
==12726==    by 0x49DB374: (within /usr/lib/libcups.so.2)
==12726==    by 0x49DB695: cupsDoFileRequest (in /usr/lib/libcups.so.2)
==12726==    by 0x49B8C3B: request_thread_main (gnome-cups-request.c:341)
==12726==    by 0x4B09427: (within /usr/lib/libglib-2.0.so.0.1000.2)
==12726==    by 0x4B07581: (within /usr/lib/libglib-2.0.so.0.1000.2)
==12726==    by 0x4A4A340: start_thread (in /lib/tls/i686/cmov/libpthread-2.3.6.so)
==12726==    by 0x4C404ED: clone (in /lib/tls/i686/cmov/libc-2.3.6.so)

Comment 2 Hubert Figuiere (:hub) 2006-04-22 19:27:39 UTC
Upon start, I get these VSS/RSS values: 19684  1208
After 12 hours, I get: 60564 12404

Definitely.
Comment 3 Hubert Figuiere (:hub) 2006-06-16 04:23:47 UTC
More info there:
http://www.burtonini.com/blog//computers/debugging-20031014
Comment 4 Loïc Minier 2006-07-03 19:34:41 UTC
This is Debian bug http://bugs.debian.org/369083 where David Pashley provided another valgrind log and Samuel Mimram came up with a patch which I'll attach here.
Comment 5 Loïc Minier 2006-07-03 19:36:10 UTC
Created attachment 68321 [details] [review]
Fix for the memory leak
Comment 6 Hubert Figuiere (:hub) 2006-07-03 19:45:18 UTC
Created attachment 68322 [details] [review]
patch to fix the leak.

Attached is my version of the patch. The other one is wrong, it is a OR that should be done (I know I did the same mistake ;-) )

Testing it right now, but seems to be good at first sight.
Comment 7 Hubert Figuiere (:hub) 2006-07-03 19:49:47 UTC
Dear maintainer,

let me know if I can commit that patch.

thanks.
Comment 8 Hubert Figuiere (:hub) 2006-07-03 20:02:54 UTC
Fixed in the development version. The fix will be available in the next major release. Thank you for your bug report.
Comment 9 Kjartan Maraas 2008-01-29 13:10:14 UTC
Moving all gnome-cups-manager bugs to new product. Filter on Kjartan's spring cleaning.