memory leak in gnome-cups-icon

Bug #45406 reported by Paul Ortman
48
Affects Status Importance Assigned to Milestone
libgnomecups
Fix Released
Medium
gnome-cups-manager (Ubuntu)
Invalid
Undecided
Unassigned
libgnomecups (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

After running several hours (or perhaps overnight) the gnome-cups-icon process consumes a tremendous amount of my available RAM. Several times this has lead to the Linux OOM killing various running processes.

I end up -HUPing the gnome-cups-icon process which seems to free the memory and keep everything running.

I'm more than willing to run the process under valgrind or the like to try to generate reports useful for developers, but I'm not sure exactly the best way to go about doing that -- tips are welcome.

Below are details of my system as reported by reportbug (which doesn't really seem to work by the way -- bugs are never seemingly ever received).

 -- System Information:
Debian Release: testing/unstable
  APT prefers dapper-updates
  APT policy: (500, 'dapper-updates'), (500, 'dapper-security'), (500, 'dapper-backports'), (500, 'dapper')
Architecture: amd64 (x86_64)
Shell: /bin/sh linked to /bin/bash
Kernel: Linux 2.6.15-22-amd64-generic
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)

Versions of packages gnome-cups-manager depends on:
ii libart-2.0-2 2.3.17-1 Library of functions for 2D graphi
ii libatk1.0-0 1.11.4-0ubuntu1 The ATK accessibility toolkit
ii libbonobo2-0 2.14.0-0ubuntu1 Bonobo CORBA interfaces library
ii libbonoboui2-0 2.14.0-0ubuntu1 The Bonobo UI library
ii libc6 2.3.6-0ubuntu18 GNU C Library: Shared libraries an
ii libcairo2 1.0.4-0ubuntu1 The Cairo 2D vector graphics libra
ii libcupsys2 1.2.0-0ubuntu4 Common UNIX Printing System(tm) -
ii libfontconfig1 2.3.2-1.1ubuntu11 generic font configuration library
ii libgconf2-4 2.14.0-1ubuntu1 GNOME configuration database syste
ii libglade2-0 1:2.5.1-2ubuntu2 library to load .glade files at ru
ii libglib2.0-0 2.10.2-1ubuntu1 The GLib library of C routines
ii libgnome-keyring0 0.4.9-1ubuntu1 GNOME keyring services library
ii libgnome2-0 2.14.1-0ubuntu2 The GNOME 2 library - runtime file
ii libgnomecanvas2-0 2.14.0-0ubuntu1 A powerful object-oriented display
ii libgnomecups1.0-1 0.2.2-1ubuntu2 GNOME library for CUPS interaction
ii libgnomecupsui1.0-1 0.31-1.1ubuntu7 UI extensions to libgnomecups
ii libgnomeui-0 2.14.1-0ubuntu2 The GNOME 2 libraries (User Interf
ii libgnomevfs2-0 2.14.1-0ubuntu5 GNOME virtual file-system (runtime
ii libgnutls12 1.2.9-2ubuntu1 the GNU TLS library - runtime libr
ii libgtk2.0-0 2.8.17-1ubuntu4 The GTK+ graphical user interface
ii libice6 2:1.0.0-0ubuntu2 X11 Inter-Client Exchange library
ii liborbit2 1:2.14.0-0ubuntu1 libraries for ORBit2 - a CORBA ORB
ii libpango1.0-0 1.12.2-0ubuntu3 Layout and rendering of internatio
ii libpopt0 1.7-5 lib for parsing cmdline parameters
ii libsm6 2:1.0.0-0ubuntu2 X11 Session Management library
ii libx11-6 2:1.0.0-0ubuntu9 X11 client-side library
ii libxcursor1 1.1.5.2-0ubuntu4 X cursor management library
ii libxext6 2:1.0.0-0ubuntu4 X11 miscellaneous extension librar
ii libxfixes3 1:3.0.1.2-0ubuntu3 X11 miscellaneous 'fixes' extensio
ii libxi6 2:1.0.0-0ubuntu3 X11 Input extension library
ii libxinerama1 2:1.0.1-0ubuntu2 X11 Xinerama extension library
ii libxml2 2.6.24.dfsg-1ubuntu1 GNOME XML library
ii libxrandr2 1:1.1.0.2-0ubuntu4 X11 RandR extension library
ii libxrender1 1:0.9.0.2-0ubuntu2 X Rendering Extension client libra
ii zlib1g 1:1.2.3-6ubuntu4 compression library - runtime

Versions of packages gnome-cups-manager recommends:
ii gksu 1.3.7-0ubuntu9 graphical frontend to su

Revision history for this message
Paul Ortman (portman) wrote : output from valgrind

I believe I used the following valgrind options:

valgrind --num-callers=20 --leak-check=yes --show-reachable=yes --leak-resolution=high gnome-cups-icon

Revision history for this message
Paul Ortman (portman) wrote :

I'm curious how this was determined to be a dupe of bug #44196 ? One's a clear memory leak, and the other high CPU usage. One seems to happen with continuous memory growth over time (printing or not) and the other is probably tied to jobs being printed. They seem unrelated to me, so all I ask for is some rational.

Revision history for this message
Simon Law (sfllaw) wrote :

They are likely to be separate bugs. I'm splitting and confirming,
because you've got plenty of good valgrind output.

Thanks.

Changed in gnome-cups-manager:
status: Unconfirmed → Confirmed
Revision history for this message
Anonym25712 (anonym25712) wrote :

I dist-upgraded to Dapper last week and I noticed this bug yesterday. I've got 768 MB of RAM, and gnome-cups-icon was around 20% of memory usage. I killed it and this morning it is back around 7%. It seems to be very slowly increasing while I did not print anything since yesterday.

Revision history for this message
Paul Ortman (portman) wrote :

From this blog post (http://bmaurer.blogspot.com/2006/07/gnome-cups-icon-leak.html) I think I see where this is fixed in both debian and gnome bugzillas. The relevant links are:

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=369083

http://bugzilla.gnome.org/show_bug.cgi?id=339365

The debian bugzilla even contains a patch... I'd love to test for you, just point me to the build to test and I should know within moments at my work machine.

Revision history for this message
Ante Karamatić (ivoks) wrote :

Please test these packages. Add:

deb http://www.grad.hr/~ivoks/ubuntu/libgnomecups ./

to /etc/apt/sources.list, do apt-get update ; apt-get upgrade and test if problem is still there. Thanks.

Revision history for this message
Anonym25712 (anonym25712) wrote :

I just tried your package, memory usage seems stable now.

Changed in libgnomecups:
status: Unknown → Fix Released
Revision history for this message
Ante Karamatić (ivoks) wrote : debdiff

This is debdiff for current dapper source.

Revision history for this message
Martin Pitt (pitti) wrote :

Ante, thank you for preparing the update!

Matt, do you approve this for dapper-updates?

Changed in libgnomecups:
status: Confirmed → Fix Committed
Revision history for this message
Paul Ortman (portman) wrote :

I've had to rebuild for amd64 using the patch from Anta, but that seemed to go fairly well and now memory seems to be holding steady at %2 of my RAM. Thanks for all the work.

Revision history for this message
Hubert Figuiere (hub) wrote :

The debdiff above is wrong. Please use the patch in the upstream Gnome bug.

Revision history for this message
Ante Karamatić (ivoks) wrote :

Oh, I see. I'll atach new one.

Revision history for this message
Ante Karamatić (ivoks) wrote :

Diff with newer fix from upstream.

Revision history for this message
Matt Zimmerman (mdz) wrote :

Looks OK for dapper-updates

Revision history for this message
Martin Pitt (pitti) wrote :

Closing g-cups-manager task, unrelated.

Changed in gnome-cups-manager:
status: Unconfirmed → Rejected
Revision history for this message
Martin Pitt (pitti) wrote :

 libgnomecups (0.2.2-1ubuntu5.1) dapper-updates; urgency=low
 .
   * patches/leak_gnomecups.diff:
     - fix for memory leak that caused gnome-cups-manager to choke processor
       (Closes LP#45406)

Uploaded to dapper-updates, awaiting approval now.

Revision history for this message
Colin Watson (cjwatson) wrote :

Approved for dapper-updates. The builds will arrive shortly.

Changed in libgnomecups:
status: Fix Committed → Fix Released
Changed in libgnomecups:
importance: Unknown → Medium
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.