Bug 62945 - memory leak in associated kdeinit
Summary: memory leak in associated kdeinit
Status: CLOSED FIXED
Alias: None
Product: kdeprint
Classification: Applications
Component: kjobviewer (show other bugs)
Version: 0.1
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: Michael Goffioul
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-08-19 09:53 UTC by Andreas Vinsander
Modified: 2008-12-31 13:15 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Valgrind --show-reachable=yes (161.30 KB, text/plain)
2003-10-04 06:25 UTC, Greg Briggs
Details
The valgrind output hinting at a fontconfig bug (301.79 KB, text/plain)
2003-12-28 00:09 UTC, Dominique Devriese
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Vinsander 2003-08-19 09:53:50 UTC
Version:           0.1 (using KDE KDE 3.1.3)
Installed from:    Gentoo Packages
Compiler:          g++ (GCC) 3.2.3 20030422 (Gentoo Linux 1.4 3.2.3-r2, propolice) 
OS:          Linux

After leaving the kjobviewer running for 14 hours, the associated kdeinit process had consumed 260Mb of virtual memory (holding 137Mb in the resident set).
I am using cups (1.1.19) as printspooler and have a single printer defined.

I can reproduce the leak whenever I want just by starting kjobviewer.
Comment 1 Jarkko Suontausta 2003-09-11 16:49:25 UTC
I can confirm this too on my Debian/unstable, happens every time I start 
kjobviewer. I left it running overnight and the memory consumption was above 
100 Mb of virtual memory. I tried to investigate this a bit by tracking the 
process with strace and then grepping for mmap/munmap operations, but they 
were all in matching pairs. I would like to help track this down, because it 
brought my system to its knees :)    
    
I can send the strace dumps if needed and/or some additional info. 
Comment 2 Matthew Bogosian 2003-09-24 22:42:47 UTC
I'm currently running Debian unstable with the latest KDE packages from
that distribution and can verify this bug as well. It looks like
kjobviewer 0.1 has a wicked memory leak which is pretty debilitating
after a short time.

First, when I log in via kdm, I can see about 15-or-so kdeinit-started
processes (kicker, knotify, a few konsoles, kwin, etc.). Already,
kjobviewer (started as part of my session) is on top of the list
(process #16429):

- - - - - - - - - - - - - - - - %< - - - - - - - - - - - - - - - -

top - 08:57:39 up 4 days, 16:49,  1 user,  load average: 0.31, 0.75, 2.08
Tasks: 214 total,   1 running, 213 sleeping,   0 stopped,   0 zombie
Cpu(s):   1.7% user,   3.7% system,   0.0% nice,  94.6% idle
Mem:    385016k total,   378500k used,     6516k free,    77476k buffers
Swap:  1028152k total,   135140k used,   893012k free,   132560k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
16429 matt      11   0 18620  18m  13m S  1.4  4.8   0:03.42 kdeinit: kjobviewe
16331 matt       9   0 18292  17m  15m S  0.0  4.7   0:02.11 kdeinit: kdesktop
16338 matt       9   0 15732  15m  13m S  0.0  4.1   0:01.97 kdeinit: kicker
16380 matt       9   0 15144  14m  12m S  0.0  3.9   0:01.06 kdeinit: konsole -
16384 matt       9   0 15132  14m  12m S  0.3  3.9   0:01.25 kdeinit: konsole -
16323 matt       9   0 14752  14m  12m S  0.0  3.8   0:00.49 kdeinit: knotify
16329 matt       9   0 13840  13m  11m S  0.0  3.6   0:01.34 kdeinit: kwin -ses
16308 matt       9   0 13580  13m  11m S  0.0  3.5   0:00.62 kdeinit: kxkb
16354 matt       9   0 13440  13m  11m S  0.0  3.5   0:00.54 kdeinit: klipper
16297 matt       9   0 12464  12m  10m S  0.0  3.2   0:00.62 kdeinit: kded
16365 matt       9   0 11640  11m  10m S  0.0  3.0   0:00.46 kdeinit: kaccess -
16327 matt       9   0 11624  11m  10m S  0.0  3.0   0:00.40 kdeinit: ksmserver
16428 matt       9   0  9620 9616 9252 S  0.0  2.5   0:00.11 kdeinit: kio_file
16339 matt       9   0  9560 9556 9200 S  0.0  2.5   0:00.09 kdeinit: kio_file
16295 matt       9   0  9380 9376 9048 S  0.0  2.4   0:00.09 kdeinit: klauncher
16340 matt       9   0  8584 8580 8428 S  0.0  2.2   0:00.01 kdeinit: kio_devic
16292 matt       9   0  8312 8308 8052 S  0.0  2.2   0:00.09 kdeinit: dcopserve
16289 matt       8   0  8240 8236 8108 S  0.0  2.1   0:00.09 kdeinit: Running..

- - - - - - - - - - - - - - - - >% - - - - - - - - - - - - - - - -

After a few minutes, its memory usage starts to climb, while the others
stay relatively static.

- - - - - - - - - - - - - - - - %< - - - - - - - - - - - - - - - -

top - 09:00:50 up 3 days, 16:52,  1 user,  load average: 0.41, 0.57, 1.76
Tasks: 211 total,   1 running, 210 sleeping,   0 stopped,   0 zombie
Cpu(s):   2.3% user,   3.0% system,   0.0% nice,  94.7% idle
Mem:    385016k total,   373028k used,    11988k free,    77064k buffers
Swap:  1028152k total,   134144k used,   894008k free,   125416k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
16429 matt      12   0 19484  19m  13m S  0.3  5.1   0:04.34 kdeinit: kjobviewe
...

- - - - - - - - - - - - - - - - >% - - - - - - - - - - - - - - - -

After a few hours, it's grown to over four times its original size,
consuming nearly 23% of my memory (seems strange for a print job viewer,
but hey, I've never written one, so who am I to judge...).

- - - - - - - - - - - - - - - - %< - - - - - - - - - - - - - - - -

top - 13:06:49 up 3 days, 20:58,  1 user,  load average: 0.31, 0.27, 0.27
Tasks: 212 total,   2 running, 210 sleeping,   0 stopped,   0 zombie
Cpu(s):  12.7% user,   5.2% system,   0.0% nice,  82.1% idle
Mem:    385016k total,   370760k used,    14256k free,    26768k buffers
Swap:  1028152k total,   143800k used,   884352k free,    93720k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
16429 matt       9   0 88232  85m  12m S  0.0 22.8   1:47.67 kdeinit: kjobviewe
...

- - - - - - - - - - - - - - - - >% - - - - - - - - - - - - - - - -

After 16 hours, it's by far the major hog, beating out my Mozilla and
Emacs (which have been running for nearly as long).

- - - - - - - - - - - - - - - - %< - - - - - - - - - - - - - - - -

top - 00:58:55 up 4 days,  8:51,  1 user,  load average: 2.68, 1.29, 0.75
Tasks: 225 total,   2 running, 222 sleeping,   1 stopped,   0 zombie
Cpu(s):  11.7% user,   6.5% system,   0.0% nice,  81.8% idle
Mem:    385016k total,   380588k used,     4428k free,     4860k buffers
Swap:  1028152k total,   409600k used,   618552k free,    17732k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
16429 matt       9   0  403m 252m  16m S  0.0 67.0  31:16.40 kdeinit: kjobviewe
...

- - - - - - - - - - - - - - - - >% - - - - - - - - - - - - - - - -

After a full day, the machine is starting to become non-responsive since
so much memory has been paged out due to the incredible amount of
resources that kjobviewer has taken up.

- - - - - - - - - - - - - - - - %< - - - - - - - - - - - - - - - -

top - 08:41:01 up 4 days, 16:33,  1 user,  load average: 5.95, 4.49, 3.77
Tasks: 224 total,   6 running, 218 sleeping,   0 stopped,   0 zombie
Cpu(s):  12.6% user,  18.4% system,   0.0% nice,  68.9% idle
Mem:    385016k total,   381500k used,     3516k free,    10372k buffers
Swap:  1028152k total,   514912k used,   513240k free,    16432k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
16429 matt       9   0  512m 277m  69m R  0.3 73.7  48:29.92 kdeinit: kjobviewe
...

- - - - - - - - - - - - - - - - >% - - - - - - - - - - - - - - - -

Short of these cut-and-pastes, I haven't done any profiling or
investigating as to whether it's kjobviewer or one of the underlying
libraries:

kjobviewer.so
libDCOP.so.4
libICE.so.6
libSM.so.6
libX11.so.6
libXext.so.6
libXrender.so.1
libart_lgpl_2.so.2
libc.so.6
libdl.so.2
libfam.so.0
libgcc_s.so.1
libkdecore.so.4
libkdefx.so.4
libkdeprint.so.4
libkdeprint_management.so.4
libkdesu.so.4
libkdeui.so.4
libkio.so.4
libkparts.so.2
libm.so.6
libpng12.so.0
libpthread.so.0
libqt-mt.so.3
libresolv.so.2
libstdc++.so.5
libutil.so.1
libz.so.1

But my guess is that it's something specific to kjobviewer (or at least
rare enough that I haven't seen such a bad leak anywhere else). I hope
this helps!
Comment 3 Greg Briggs 2003-09-25 05:19:34 UTC
I experienced this too (Gentoo Linux, kernel 2.6.0-test5). 
 
Info from /proc, if it helps. Also, I noticed that pretty much all of my 
kdeinit processes returned non-environment info or nothing in their "environ" 
file, (whereas other processes contained normal-looking environment variables) 
 
$ cat cmdline 
kdeinit: kjobviewer -d DJ952_300 --noshow 
$ cat environ 
52_300 --noshow 
$ cat maps 
08048000-08051000 r-xp 00000000 03:06 1999397    /usr/kde/3.1/bin/kdeinit 
08051000-08052000 rw-p 00008000 03:06 1999397    /usr/kde/3.1/bin/kdeinit 
08052000-10f71000 rwxp 00000000 00:00 0 
40000000-40013000 r-xp 00000000 03:06 1477845    /lib/ld-2.3.2.so 
40013000-40014000 rw-p 00012000 03:06 1477845    /lib/ld-2.3.2.so 
40014000-40015000 rw-p 00000000 00:00 0 
40015000-40051000 r-xp 00000000 03:06 233065     
/usr/kde/3.1/lib/libkparts.so.2.1.0 
40051000-40055000 rw-p 0003b000 03:06 233065     
/usr/kde/3.1/lib/libkparts.so.2.1.0 
40055000-4030f000 r-xp 00000000 03:06 232707     
/usr/kde/3.1/lib/libkio.so.4.1.0 
4030f000-40328000 rw-p 002ba000 03:06 232707     
/usr/kde/3.1/lib/libkio.so.4.1.0 
40328000-40329000 rw-p 00000000 00:00 0 
40329000-40586000 r-xp 00000000 03:06 232695     
/usr/kde/3.1/lib/libkdeui.so.4.1.0 
40586000-405a9000 rw-p 0025d000 03:06 232695     
/usr/kde/3.1/lib/libkdeui.so.4.1.0 
405a9000-405c2000 r-xp 00000000 03:06 232699     
/usr/kde/3.1/lib/libkdesu.so.4.1.0 
405c2000-405c3000 rw-p 00018000 03:06 232699     
/usr/kde/3.1/lib/libkdesu.so.4.1.0 
405c3000-4075f000 r-xp 00000000 03:06 232691     
/usr/kde/3.1/lib/libkdecore.so.4.1.0 
4075f000-40769000 rw-p 0019b000 03:06 232691     
/usr/kde/3.1/lib/libkdecore.so.4.1.0 
40769000-4076b000 rw-p 00000000 00:00 0 
4076b000-4079b000 r-xp 00000000 03:06 232686     
/usr/kde/3.1/lib/libDCOP.so.4.1.0 
4079b000-4079c000 rw-p 00030000 03:06 232686     
/usr/kde/3.1/lib/libDCOP.so.4.1.0 
4079c000-4079e000 rw-p 00000000 00:00 0 
4079e000-407a7000 r-xp 00000000 03:06 249060     
/usr/kde/3.1/lib/kjobviewer.so 
407a7000-407a8000 rw-p 00008000 03:06 249060     
/usr/kde/3.1/lib/kjobviewer.so 
407a8000-407aa000 r-xp 00000000 03:06 658246     
/usr/X11R6/lib/X11/locale/lib/common/xlcDef.so.2 
407aa000-407ab000 rw-p 00001000 03:06 658246     
/usr/X11R6/lib/X11/locale/lib/common/xlcDef.so.2 
407b7000-407b9000 r-xp 00000000 03:06 1478062    /lib/libdl-2.3.2.so 
407b9000-407ba000 rw-p 00001000 03:06 1478062    /lib/libdl-2.3.2.so 
407ba000-407bb000 rw-p 00000000 00:00 0 
407bb000-407c9000 r-xp 00000000 03:06 1478076    /lib/libresolv-2.3.2.so 
407c9000-407ca000 rw-p 0000e000 03:06 1478076    /lib/libresolv-2.3.2.so 
407ca000-407cc000 rw-p 00000000 00:00 0 
407cc000-407e4000 r-xp 00000000 03:06 790102     
/usr/lib/libart_lgpl_2.so.2.3.14 
407e4000-407e5000 rw-p 00018000 03:06 790102     
/usr/lib/libart_lgpl_2.so.2.3.14 
407e5000-4080e000 r-xp 00000000 03:06 233180     
/usr/kde/3.1/lib/libkdefx.so.4.1.0 
4080e000-40810000 rw-p 00028000 03:06 233180     
/usr/kde/3.1/lib/libkdefx.so.4.1.0 
40810000-40e2f000 r-xp 00000000 03:06 1281203    
/usr/qt/3/lib/libqt-mt.so.3.1.2 
40e2f000-40e70000 rw-p 0061e000 03:06 1281203    
/usr/qt/3/lib/libqt-mt.so.3.1.2 
40e70000-40e72000 rw-p 00000000 00:00 0 
40e72000-40e9d000 r-xp 00000000 03:06 1296378    /usr/lib/libpng.so.3.1.2.5 
40e9d000-40e9e000 rw-p 0002b000 03:06 1296378    /usr/lib/libpng.so.3.1.2.5 
40e9e000-40ead000 r-xp 00000000 03:06 1821774    /usr/X11R6/lib/libXext.so.6.4 
40ead000-40eae000 rw-p 0000e000 03:06 1821774    /usr/X11R6/lib/libXext.so.6.4 
40eae000-40eaf000 rw-p 00000000 00:00 0 
40eaf000-40f8b000 r-xp 00000000 03:06 1821681    /usr/X11R6/lib/libX11.so.6.2 
40f8b000-40f8e000 rw-p 000dc000 03:06 1821681    /usr/X11R6/lib/libX11.so.6.2 
40f8e000-40f96000 r-xp 00000000 03:06 1821749    /usr/X11R6/lib/libSM.so.6.0 
40f96000-40f97000 rw-p 00007000 03:06 1821749    /usr/X11R6/lib/libSM.so.6.0 
40f97000-40fab000 r-xp 00000000 03:06 1821744    /usr/X11R6/lib/libICE.so.6.3 
40fab000-40fac000 rw-p 00013000 03:06 1821744    /usr/X11R6/lib/libICE.so.6.3 
40fac000-40fae000 rw-p 00000000 00:00 0 
40fae000-40fbb000 r-xp 00000000 03:06 1478072    /lib/libpthread-0.10.so 
40fbb000-40fbe000 rw-p 0000d000 03:06 1478072    /lib/libpthread-0.10.so 
40fbe000-40ffe000 rw-p 00000000 00:00 0 
40ffe000-41005000 r-xp 00000000 03:06 1821783    
/usr/X11R6/lib/libXrender.so.1.2 
41005000-41006000 rw-p 00006000 03:06 1821783    
/usr/X11R6/lib/libXrender.so.1.2 
41006000-41008000 r-xp 00000000 03:06 1478104    /lib/libutil-2.3.2.so 
41008000-41009000 rw-p 00001000 03:06 1478104    /lib/libutil-2.3.2.so 
41009000-4100a000 rw-p 00000000 00:00 0 
4100a000-41016000 r-xp 00000000 03:06 296206     /usr/lib/libz.so.1.1.4 
41016000-41018000 rw-p 0000c000 03:06 296206     /usr/lib/libz.so.1.1.4 
41018000-4101f000 r-xp 00000000 03:06 1133368    /usr/lib/libfam.so.0.0.0 
4101f000-41020000 rw-p 00007000 03:06 1133368    /usr/lib/libfam.so.0.0.0 
41020000-410e1000 r-xp 00000000 03:06 1835875    
/usr/lib/gcc-lib/i686-pc-linux-gnu/3.2.3/libstdc++.so.5.0.3 
410e1000-410e6000 rw-p 000c1000 03:06 1835875    
/usr/lib/gcc-lib/i686-pc-linux-gnu/3.2.3/libstdc++.so.5.0.3 
410e6000-410eb000 rw-p 00000000 00:00 0 
410eb000-410f3000 r-xp 00000000 03:06 1835880    
/usr/lib/gcc-lib/i686-pc-linux-gnu/3.2.3/libgcc_s.so.1 
410f3000-410f4000 rw-p 00007000 03:06 1835880    
/usr/lib/gcc-lib/i686-pc-linux-gnu/3.2.3/libgcc_s.so.1 
410f4000-41115000 r-xp 00000000 03:06 1477854    /lib/libm-2.3.2.so 
41115000-41116000 rw-p 00020000 03:06 1477854    /lib/libm-2.3.2.so 
41116000-41238000 r-xp 00000000 03:06 1478130    /lib/libc-2.3.2.so 
41238000-4123b000 rw-p 00121000 03:06 1478130    /lib/libc-2.3.2.so 
4123b000-4123f000 rw-p 00000000 00:00 0 
4123f000-412ad000 r-xp 00000000 03:06 494507     
/usr/lib/opengl/xfree/lib/libGL.so.1.2 
412ad000-412b2000 rw-p 0006e000 03:06 494507     
/usr/lib/opengl/xfree/lib/libGL.so.1.2 
412b2000-412b5000 rw-p 00000000 00:00 0 
412b5000-412ca000 r-xp 00000000 03:06 1821725    /usr/X11R6/lib/libXmu.so.6.2 
412ca000-412cb000 rw-p 00014000 03:06 1821725    /usr/X11R6/lib/libXmu.so.6.2 
412cb000-412d2000 r-xp 00000000 03:06 1821780    /usr/X11R6/lib/libXi.so.6.0 
412d2000-412d3000 rw-p 00006000 03:06 1821780    /usr/X11R6/lib/libXi.so.6.0 
412d3000-412d4000 rw-p 00000000 00:00 0 
412d4000-412e6000 r-xp 00000000 03:06 1821777    /usr/X11R6/lib/libXft.so.2.1 
412e6000-412e7000 rw-p 00012000 03:06 1821777    /usr/X11R6/lib/libXft.so.2.1 
412e7000-4133f000 r-xp 00000000 03:06 1223       /usr/lib/libfreetype.so.6.3.3 
4133f000-41343000 rw-p 00058000 03:06 1223       /usr/lib/libfreetype.so.6.3.3 
41343000-41369000 r-xp 00000000 03:06 1297427    
/usr/lib/libfontconfig.so.1.0.4 
41369000-4136c000 rw-p 00026000 03:06 1297427    
/usr/lib/libfontconfig.so.1.0.4 
4136c000-4136d000 rw-p 00000000 00:00 0 
4136d000-413c0000 r-xp 00000000 03:06 1821771    /usr/X11R6/lib/libXt.so.6.0 
413c0000-413c4000 rw-p 00052000 03:06 1821771    /usr/X11R6/lib/libXt.so.6.0 
413c4000-413e7000 r-xp 00000000 03:06 1624058    /usr/lib/libexpat.so.0.4.0 
413e7000-413ea000 rw-p 00023000 03:06 1624058    /usr/lib/libexpat.so.0.4.0 
413ea000-413ec000 rw-p 00000000 00:00 0 
413ec000-41468000 r-xp 00000000 03:06 249415     
/usr/kde/3.1/lib/libkonq.so.4.1.0 
41468000-4146d000 rw-p 0007c000 03:06 249415     
/usr/kde/3.1/lib/libkonq.so.4.1.0 
4146d000-41488000 r-xp 00000000 03:06 658487     
/usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 
41488000-4148a000 rw-p 0001a000 03:06 658487     
/usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2 
4148a000-414ac000 r-xp 00000000 03:06 426585     
/usr/lib/kde3/plugins/styles/liquid.so 
414ac000-414ad000 rw-p 00022000 03:06 426585     
/usr/lib/kde3/plugins/styles/liquid.so 
414ad000-414b6000 r-xp 00000000 03:06 1821722    
/usr/X11R6/lib/libXcursor.so.1.0 
414b6000-414b7000 rw-p 00008000 03:06 1821722    
/usr/X11R6/lib/libXcursor.so.1.0 
414d0000-414da000 r-xp 00000000 03:06 1478102    /lib/libnss_compat-2.3.2.so 
414da000-414db000 rw-p 0000a000 03:06 1478102    /lib/libnss_compat-2.3.2.so 
414db000-414ec000 r-xp 00000000 03:06 1478095    /lib/libnsl-2.3.2.so 
414ec000-414ed000 rw-p 00011000 03:06 1478095    /lib/libnsl-2.3.2.so 
414ed000-414ef000 rw-p 00000000 00:00 0 
41521000-41561000 r-xp 00000000 03:06 1327384    /usr/lib/libmng.so.1.0.0 
41561000-41564000 rw-p 0003f000 03:06 1327384    /usr/lib/libmng.so.1.0.0 
41594000-415b4000 r-xp 00000000 03:06 1327373    /usr/lib/libjpeg.so.62.0.0 
415b4000-415b5000 rw-p 0001f000 03:06 1327373    /usr/lib/libjpeg.so.62.0.0 
415b5000-41679000 r-xp 00000000 03:06 233149     
/usr/kde/3.1/lib/libkdeprint_management.so.4.1.0 
41679000-41686000 rw-p 000c3000 03:06 233149     
/usr/kde/3.1/lib/libkdeprint_management.so.4.1.0 
41686000-41740000 r-xp 00000000 03:06 233139     
/usr/kde/3.1/lib/libkdeprint.so.4.1.0 
41740000-41748000 rw-p 000ba000 03:06 233139     
/usr/kde/3.1/lib/libkdeprint.so.4.1.0 
41748000-4178c000 r--p 00000000 03:06 379831     
/usr/X11R6/lib/X11/fonts/truetype/arial.ttf 
4178c000-417f4000 r-xp 00000000 03:06 823561     
/usr/kde/3.1/lib/kde3/kdeprint_cups.so 
417f4000-417f9000 rw-p 00068000 03:06 823561     
/usr/kde/3.1/lib/kde3/kdeprint_cups.so 
417f9000-417fa000 rw-p 00000000 00:00 0 
417fa000-41804000 r-xp 00000000 03:06 658245     
/usr/X11R6/lib/X11/locale/lib/common/xomGeneric.so.2 
41804000-41805000 rw-p 00009000 03:06 658245     
/usr/X11R6/lib/X11/locale/lib/common/xomGeneric.so.2 
41812000-4182c000 r-xp 00000000 03:06 1297351    /usr/lib/libcups.so.2 
4182c000-4182e000 rw-p 0001a000 03:06 1297351    /usr/lib/libcups.so.2 
4182e000-4182f000 r-xp 00000000 03:06 232687     
/usr/kde/3.1/lib/libkdefakes.so.4.1.0 
4182f000-41830000 rw-p 00000000 03:06 232687     
/usr/kde/3.1/lib/libkdefakes.so.4.1.0 
41830000-4185c000 r-xp 00000000 03:06 1280896    /usr/lib/libssl.so.0.9.6 
4185c000-4185f000 rw-p 0002b000 03:06 1280896    /usr/lib/libssl.so.0.9.6 
4185f000-41915000 r-xp 00000000 03:06 1280909    /usr/lib/libcrypto.so.0.9.6 
41915000-4191f000 rw-p 000b6000 03:06 1280909    /usr/lib/libcrypto.so.0.9.6 
4191f000-41922000 rw-p 00000000 00:00 0 
41922000-4192b000 r-xp 00000000 03:06 1478082    /lib/libnss_files-2.3.2.so 
4192b000-4192c000 rw-p 00008000 03:06 1478082    /lib/libnss_files-2.3.2.so 
bffed000-c0000000 rwxp fffee000 00:00 0 
$ cat stat 
3469 (kdeinit) S 1 4399 4399 0 -1 64 99290 0 63569 0 27184 1910 0 0 15 0 0 0 
31089909 176676864 39902 4294967295 134512640 134546640 3221223536 3221221376 
1092507826 0 0 4096 66728 3222429699 0 0 17 0 0 0 
$ cat statm 
43152 39920 6205 10 0 43142 0 
$ cat status 
Name:   kdeinit 
State:  S (sleeping) 
Tgid:   3469 
Pid:    3469 
PPid:   1 
TracerPid:      0 
Uid:    501     501     501     501 
Gid:    501     501     501     501 
FDSize: 32 
Groups: 501 10 11 18 27 35 85 250 
VmSize:   172656 kB 
VmLck:         0 kB 
VmRSS:    159728 kB 
VmData:   147760 kB 
VmStk:        76 kB 
VmExe:        36 kB 
VmLib:     23488 kB 
SigPnd: 0000000000000000 
ShdPnd: 0000000000000000 
SigBlk: 0000000080000000 
SigIgn: 8000000000001000 
SigCgt: 00000003800104a8 
CapInh: 0000000000000000 
CapPrm: 0000000000000000 
CapEff: 0000000000000000 
$ cat wchan 
schedule_timeout 
 
 
Comment 4 kpfeifle 2003-09-29 17:47:29 UTC
I confirm this bug. I think it is quite severe. 
 
After running kjobviewer for 2 hours with about 350 jobs listed  
(I am using the "completed jobs" list), it consumes 153 MByte  
(according to "top"), while at the start it was 12 MByte. I can  
see it increase by 1 MByte per minute. The system is becoming 
more and more unresponsive after a few hours with kjobviewer 
open....  
 
I tried to "valgrind" it, but strangely, then it didn't misbehave after 
12 hours... (But I am no valgrind expert either). Running kjobviewer 
outside valgrind reproduces the exorbitant memory consumption. 
 
Cheers, 
Kurt 
Comment 5 Thiago Macieira 2003-09-29 18:43:09 UTC
Could it be that malloc itself is leaking memory...? 
 
Are you using KDE's fast malloc code? 
Comment 6 Michael Goffioul 2003-09-30 09:39:46 UTC
Subject: Re:  memory leak in associated kdeinit

> Are you using KDE's fast malloc code?

To my knowledge, no. But grepping kdelibs/kdeprint/ should give
you the answer. I'm a little bit quiet lately about KDEPrint,
my regular job is taking all my time.
AFAIK, I'm always using new/delete, not malloc.

Michael.

Comment 7 Thiago Macieira 2003-09-30 17:35:26 UTC
That's not what I meant. KDE's fast malloc code replaces libc's malloc, which operator new() 
uses. It's a compile-time switch. And the question was targeted at the reporter ;-) 
Comment 8 Lubos Lunak 2003-09-30 18:11:35 UTC
I don't think KDE malloc has a leak that shows up only when running in kjobviewer ;). It's bad if 
the problem doesn't show while running in valgrind. Could somebody else try it with valgrind? 
Something like 'valgrind --leak-check=yes --num-callers=10 kjobviewer', it should print leaks 
after exiting kjobviewer. 
 
 
Comment 9 Stephan Kulow 2003-09-30 19:48:25 UTC
the cups version might is interesting too 
Comment 10 Greg Briggs 2003-09-30 21:45:16 UTC
I believe that my KDE was configured with: 
 
--with-dpms --with-cdparanoia --with-ldap --with-pam --with-motif --with-lame 
--with-cups --with-vorbis --with-gl --with-ssl --with-pam=yes 
--with-java=/opt/sun-jdk-1.4.2.01 --host=${CHOST} --prefix=${PREFIX} --with-x 
--enable-mitshm --with-xinerama 
--with-qt-dir=${QTDIR} --enable-mt --disable-dependency-tracking  
--disable-debug --without-debug 
 
I dont know if that means that I am using the fast malloc code or not... 
Comment 11 Greg Briggs 2003-10-01 22:16:02 UTC
FYI, I am using Cups 1.1.19 (Gentoo package cups-1.1.19-r1, which includes two 
trivial patches: configure-jpeg-buildfix (makes sure libcupsimage gets linked 
with libjpeg by removing an #include), and disable-strip (removes "-s" from 
INSTALL_BIN during 'make install'). 
Comment 12 Greg Briggs 2003-10-02 06:45:23 UTC
I sucessfully experienced the problem while using a prerelease of valgrind 
which supports the 2.6.0-test5 kernel i am using. 
 
Note that I had to kill with signal 15 to fully exit from kjobviewer, although 
i did first choose quit from the tray icon. 
 
When you get to the line "More than 50 errors detected.", that was the last 
message printed after the initial loading. The following messages do not occur 
until a couple hours later when I try to quit (it was then using like 313 megs 
of memory). 
 
greg@greg greg $ valgrind --leak-check=yes --num-callers=10 kjobviewer 
==10110== Memcheck, a.k.a. Valgrind, a memory error detector for x86-linux. 
==10110== Copyright (C) 2002-2003, and GNU GPL'd, by Julian Seward. 
==10110== Using valgrind-20030725, a program supervision framework for 
x86-linux. 
==10110== Copyright (C) 2000-2003, and GNU GPL'd, by Julian Seward. 
==10110== Estimated CPU clock rate is 1405 MHz 
==10110== For more details, rerun with: -v 
==10110== 
Xlib:  extension "GLX" missing on display ":0.0". 
Xlib:  extension "GLX" missing on display ":0.0". 
==10111== Syscall param writev(vector[...]) contains uninitialised or 
unaddressable byte(s) 
==10111==    at 0x40185671: vgAllRoadsLeadToRome_writev (in 
/usr/lib/valgrind/valgrind.so) 
==10111==    by 0x401856BB: __writev (in /usr/lib/valgrind/valgrind.so) 
==10111==    by 0x413A4FAF: _X11TransSocketWritev (in 
/usr/X11R6/lib/libX11.so.6.2) 
==10111==    by 0x413A3DCE: _X11TransWritev (in /usr/X11R6/lib/libX11.so.6.2) 
==10111==    by 0x4138664C: _XSend (in /usr/X11R6/lib/libX11.so.6.2) 
==10111==    by 0x4137C6B5: SendZImage (in /usr/X11R6/lib/libX11.so.6.2) 
==10111==    by 0x4137B3E3: XPutImage (in /usr/X11R6/lib/libX11.so.6.2) 
==10111==    by 0x40E5CB2A: QPixmap::convertFromImage(QImage const&, int) (in 
/usr/qt/3/lib/libqt-mt.so.3.1.2) 
==10111==    by 0x40F0E5A7: QPixmap::convertFromImage(QImage const&, 
QPixmap::ColorMode) (in /usr/qt/3/lib/libqt-mt.so.3.1.2) 
==10111==    by 0x4542F869: LiquidStyle::LiquidStyle() (in 
/usr/lib/kde3/plugins/styles/liquid.so) 
==10111==    Address 0x445AB419 is 45 bytes inside a block of size 2112 
alloc'd 
==10111==    at 0x400296F9: malloc (in /usr/lib/valgrind/vgskin_memcheck.so) 
==10111==    by 0x413881E3: _XAllocScratch (in /usr/X11R6/lib/libX11.so.6.2) 
==10111==    by 0x4137C869: SendZImage (in /usr/X11R6/lib/libX11.so.6.2) 
==10111==    by 0x4137B3E3: XPutImage (in /usr/X11R6/lib/libX11.so.6.2) 
==10111==    by 0x40E5CB2A: QPixmap::convertFromImage(QImage const&, int) (in 
/usr/qt/3/lib/libqt-mt.so.3.1.2) 
==10111==    by 0x40F0E5A7: QPixmap::convertFromImage(QImage const&, 
QPixmap::ColorMode) (in /usr/qt/3/lib/libqt-mt.so.3.1.2) 
==10111==    by 0x4542F869: LiquidStyle::LiquidStyle() (in 
/usr/lib/kde3/plugins/styles/liquid.so) 
==10111== 
==10111== Syscall param write(buf) contains uninitialised or unaddressable 
byte(s) 
==10111==    at 0x4157B798: __GI___libc_write (in /lib/libc-2.3.2.so) 
==10111==    by 0x4144B67F: _IceTransSocketWrite (in 
/usr/X11R6/lib/libICE.so.6.3) 
==10111==    by 0x414485EE: _IceTransWrite (in /usr/X11R6/lib/libICE.so.6.3) 
==10111==    by 0x414422D8: _IceWrite (in /usr/X11R6/lib/libICE.so.6.3) 
==10111==    by 0x41441EF1: IceFlush (in /usr/X11R6/lib/libICE.so.6.3) 
==10111==    by 0x41434CA4: SmcSetProperties (in /usr/X11R6/lib/libSM.so.6.0) 
==10111==    by 0x40E47112: sm_setProperty(char const*, char const*, int, 
SmPropValue*) (in /usr/qt/3/lib/libqt-mt.so.3.1.2) 
==10111==    by 0x40E471AA: sm_setProperty(QString const&, QString const&) (in 
/usr/qt/3/lib/libqt-mt.so.3.1.2) 
==10111==    by 0x40E47517: sm_performSaveYourself(QSessionManagerData*) (in 
/usr/qt/3/lib/libqt-mt.so.3.1.2) 
==10111==    by 0x40E47301: sm_saveYourselfCallback(_SmcConn*, void*, int, 
int, int, int) (in /usr/qt/3/lib/libqt-mt.so.3.1.2) 
==10111==    Address 0x44974C24 is 12 bytes inside a block of size 1024 
alloc'd 
==10111==    at 0x40029BDD: calloc (in /usr/lib/valgrind/vgskin_memcheck.so) 
==10111==    by 0x4143F40F: IceOpenConnection (in 
/usr/X11R6/lib/libICE.so.6.3) 
==10111==    by 0x414343BA: SmcOpenConnection (in /usr/X11R6/lib/libSM.so.6.0) 
==10111==    by 0x40E485BB: QSessionManager::QSessionManager(QApplication*, 
QString&, QString&) (in /usr/qt/3/lib/libqt-mt.so.3.1.2) 
==10111==    by 0x40E9AF24: QApplication::initialize(int, char**) (in 
/usr/qt/3/lib/libqt-mt.so.3.1.2) 
==10111==    by 0x40E9A77D: QApplication::construct(int&, char**, 
QApplication::Type) (in /usr/qt/3/lib/libqt-mt.so.3.1.2) 
==10111==    by 0x40E9A4A7: QApplication::QApplication(int&, char**, bool) (in 
/usr/qt/3/lib/libqt-mt.so.3.1.2) 
==10111==    by 0x40A126A2: KApplication::KApplication(bool, bool, KInstance*) 
(in /usr/kde/3.1/lib/libkdecore.so.4.1.0) 
==10111== 
==10111== Conditional jump or move depends on uninitialised value(s) 
==10111==    at 0x45BB92E2: cupsLangGet (in /usr/lib/libcups.so.2) 
==10111==    by 0x459A32DA: IppRequest::IppRequest() (in 
/usr/kde/3.1/lib/kde3/kdeprint_cups.so) 
==10111==    by 0x45198AEF: ??? 
==10111== 
==10111== Conditional jump or move depends on uninitialised value(s) 
==10111==    at 0x45BB92E8: cupsLangGet (in /usr/lib/libcups.so.2) 
==10111==    by 0x459A32DA: IppRequest::IppRequest() (in 
/usr/kde/3.1/lib/kde3/kdeprint_cups.so) 
==10111==    by 0x45198AEF: ??? 
==10111== 
==10111== Conditional jump or move depends on uninitialised value(s) 
==10111==    at 0x45BB92E2: cupsLangGet (in /usr/lib/libcups.so.2) 
==10111==    by 0x459A34CC: IppRequest::init() (in 
/usr/kde/3.1/lib/kde3/kdeprint_cups.so) 
==10111==    by 0x4453773B: ??? 
==10111== 
==10111== Conditional jump or move depends on uninitialised value(s) 
==10111==    at 0x45BB92E8: cupsLangGet (in /usr/lib/libcups.so.2) 
==10111==    by 0x459A34CC: IppRequest::init() (in 
/usr/kde/3.1/lib/kde3/kdeprint_cups.so) 
==10111==    by 0x4453773B: ??? 
==10111== 
==10111== Conditional jump or move depends on uninitialised value(s) 
==10111==    at 0x45BB92E2: cupsLangGet (in /usr/lib/libcups.so.2) 
==10111==    by 0x459A34CC: IppRequest::init() (in 
/usr/kde/3.1/lib/kde3/kdeprint_cups.so) 
==10111==    by 0x451D92B7: ??? 
==10111== 
==10111== Conditional jump or move depends on uninitialised value(s) 
==10111==    at 0x45BB92E8: cupsLangGet (in /usr/lib/libcups.so.2) 
==10111==    by 0x459A34CC: IppRequest::init() (in 
/usr/kde/3.1/lib/kde3/kdeprint_cups.so) 
==10111==    by 0x451D92B7: ??? 
==10111== 
==10111== Conditional jump or move depends on uninitialised value(s) 
==10111==    at 0x40020DD1: strlen (in /usr/lib/valgrind/vgskin_memcheck.so) 
==10111==    by 0x411810B3: QString::setLatin1(char const*, int) (in 
/usr/qt/3/lib/libqt-mt.so.3.1.2) 
==10111==    by 0x41180FC0: QString::setAscii(char const*, int) (in 
/usr/qt/3/lib/libqt-mt.so.3.1.2) 
==10111==    by 0x41179E1D: QString::operator=(char const*) (in 
/usr/qt/3/lib/libqt-mt.so.3.1.2) 
==10111==    by 0x40EBE34C: QFontPrivate::load(QFont::Script, bool) (in 
/usr/qt/3/lib/libqt-mt.so.3.1.2) 
==10111==    by 0x40EBD500: QFontPrivate::loadUnicode(QFont::Script, QChar 
const&) (in /usr/qt/3/lib/libqt-mt.so.3.1.2) 
==10111==    by 0x40EBD5FA: QFontPrivate::load(QFont::Script, bool) (in 
/usr/qt/3/lib/libqt-mt.so.3.1.2) 
==10111==    by 0x40EB562F: QFontMetrics::QFontMetrics(QFont const&) (in 
/usr/qt/3/lib/libqt-mt.so.3.1.2) 
==10111==    by 0x40808B56: KPopupTitle::setTitle(QString const&, QPixmap 
const*) (in /usr/kde/3.1/lib/libkdeui.so.4.1.0) 
==10111== 
==10111== Conditional jump or move depends on uninitialised value(s) 
==10111==    at 0x40020DD8: strlen (in /usr/lib/valgrind/vgskin_memcheck.so) 
==10111==    by 0x411810B3: QString::setLatin1(char const*, int) (in 
/usr/qt/3/lib/libqt-mt.so.3.1.2) 
==10111==    by 0x41180FC0: QString::setAscii(char const*, int) (in 
/usr/qt/3/lib/libqt-mt.so.3.1.2) 
==10111==    by 0x41179E1D: QString::operator=(char const*) (in 
/usr/qt/3/lib/libqt-mt.so.3.1.2) 
==10111==    by 0x40EBE34C: QFontPrivate::load(QFont::Script, bool) (in 
/usr/qt/3/lib/libqt-mt.so.3.1.2) 
==10111==    by 0x40EBD500: QFontPrivate::loadUnicode(QFont::Script, QChar 
const&) (in /usr/qt/3/lib/libqt-mt.so.3.1.2) 
==10111==    by 0x40EBD5FA: QFontPrivate::load(QFont::Script, bool) (in 
/usr/qt/3/lib/libqt-mt.so.3.1.2) 
==10111==    by 0x40EB562F: QFontMetrics::QFontMetrics(QFont const&) (in 
/usr/qt/3/lib/libqt-mt.so.3.1.2) 
==10111==    by 0x40808B56: KPopupTitle::setTitle(QString const&, QPixmap 
const*) (in /usr/kde/3.1/lib/libkdeui.so.4.1.0) 
==10111== 
==10111== Conditional jump or move depends on uninitialised value(s) 
==10111==    at 0x4117912D: QString::unicodeToLatin1(QChar const*, unsigned) 
(in /usr/qt/3/lib/libqt-mt.so.3.1.2) 
==10111==    by 0x41180526: QString::latin1() const (in 
/usr/qt/3/lib/libqt-mt.so.3.1.2) 
==10111==    by 0x40EBE002: QFontPrivate::load(QFont::Script, bool) (in 
/usr/qt/3/lib/libqt-mt.so.3.1.2) 
==10111==    by 0x40EBD500: QFontPrivate::loadUnicode(QFont::Script, QChar 
const&) (in /usr/qt/3/lib/libqt-mt.so.3.1.2) 
==10111==    by 0x40EBD5FA: QFontPrivate::load(QFont::Script, bool) (in 
/usr/qt/3/lib/libqt-mt.so.3.1.2) 
==10111==    by 0x40EB562F: QFontMetrics::QFontMetrics(QFont const&) (in 
/usr/qt/3/lib/libqt-mt.so.3.1.2) 
==10111==    by 0x40808B56: KPopupTitle::setTitle(QString const&, QPixmap 
const*) (in /usr/kde/3.1/lib/libkdeui.so.4.1.0) 
==10111== 
==10111== Conditional jump or move depends on uninitialised value(s) 
==10111==    at 0x40020DD1: strlen (in /usr/lib/valgrind/vgskin_memcheck.so) 
==10111==    by 0x41153D9E: QCString::QCString(char const*) (in 
/usr/qt/3/lib/libqt-mt.so.3.1.2) 
==10111==    by 0x40EBE014: QFontPrivate::load(QFont::Script, bool) (in 
/usr/qt/3/lib/libqt-mt.so.3.1.2) 
==10111==    by 0x40EBD500: QFontPrivate::loadUnicode(QFont::Script, QChar 
const&) (in /usr/qt/3/lib/libqt-mt.so.3.1.2) 
==10111==    by 0x40EBD5FA: QFontPrivate::load(QFont::Script, bool) (in 
/usr/qt/3/lib/libqt-mt.so.3.1.2) 
==10111==    by 0x40EB562F: QFontMetrics::QFontMetrics(QFont const&) (in 
/usr/qt/3/lib/libqt-mt.so.3.1.2) 
==10111==    by 0x40808B56: KPopupTitle::setTitle(QString const&, QPixmap 
const*) (in /usr/kde/3.1/lib/libkdeui.so.4.1.0) 
==10111== 
==10111== Conditional jump or move depends on uninitialised value(s) 
==10111==    at 0x40020DD8: strlen (in /usr/lib/valgrind/vgskin_memcheck.so) 
==10111==    by 0x41153D9E: QCString::QCString(char const*) (in 
/usr/qt/3/lib/libqt-mt.so.3.1.2) 
==10111==    by 0x40EBE014: QFontPrivate::load(QFont::Script, bool) (in 
/usr/qt/3/lib/libqt-mt.so.3.1.2) 
==10111==    by 0x40EBD500: QFontPrivate::loadUnicode(QFont::Script, QChar 
const&) (in /usr/qt/3/lib/libqt-mt.so.3.1.2) 
==10111==    by 0x40EBD5FA: QFontPrivate::load(QFont::Script, bool) (in 
/usr/qt/3/lib/libqt-mt.so.3.1.2) 
==10111==    by 0x40EB562F: QFontMetrics::QFontMetrics(QFont const&) (in 
/usr/qt/3/lib/libqt-mt.so.3.1.2) 
==10111==    by 0x40808B56: KPopupTitle::setTitle(QString const&, QPixmap 
const*) (in /usr/kde/3.1/lib/libkdeui.so.4.1.0) 
==10111== 
==10111== Conditional jump or move depends on uninitialised value(s) 
==10111==    at 0x45BB92E2: cupsLangGet (in /usr/lib/libcups.so.2) 
==10111==    by 0x459A32DA: IppRequest::IppRequest() (in 
/usr/kde/3.1/lib/kde3/kdeprint_cups.so) 
==10111==    by 0x4520F54B: ??? 
==10111== 
==10111== Conditional jump or move depends on uninitialised value(s) 
==10111==    at 0x45BB92E8: cupsLangGet (in /usr/lib/libcups.so.2) 
==10111==    by 0x459A32DA: IppRequest::IppRequest() (in 
/usr/kde/3.1/lib/kde3/kdeprint_cups.so) 
==10111==    by 0x4520F54B: ??? 
==10111== 
==10111== Conditional jump or move depends on uninitialised value(s) 
==10111==    at 0x45BB92E2: cupsLangGet (in /usr/lib/libcups.so.2) 
==10111==    by 0x459A34CC: IppRequest::init() (in 
/usr/kde/3.1/lib/kde3/kdeprint_cups.so) 
==10111==    by 0x448D2CAF: ??? 
==10111== 
==10111== Conditional jump or move depends on uninitialised value(s) 
==10111==    at 0x45BB92E8: cupsLangGet (in /usr/lib/libcups.so.2) 
==10111==    by 0x459A34CC: IppRequest::init() (in 
/usr/kde/3.1/lib/kde3/kdeprint_cups.so) 
==10111==    by 0x448D2CAF: ??? 
==10111== 
==10111== Conditional jump or move depends on uninitialised value(s) 
==10111==    at 0x45BB92E2: cupsLangGet (in /usr/lib/libcups.so.2) 
==10111==    by 0x459A34CC: IppRequest::init() (in 
/usr/kde/3.1/lib/kde3/kdeprint_cups.so) 
==10111==    by 0x45176D0B: ??? 
==10111== 
==10111== Conditional jump or move depends on uninitialised value(s) 
==10111==    at 0x45BB92E8: cupsLangGet (in /usr/lib/libcups.so.2) 
==10111==    by 0x459A34CC: IppRequest::init() (in 
/usr/kde/3.1/lib/kde3/kdeprint_cups.so) 
==10111==    by 0x45176D0B: ??? 
==10111== 
==10111== Conditional jump or move depends on uninitialised value(s) 
==10111==    at 0x45BB92E2: cupsLangGet (in /usr/lib/libcups.so.2) 
==10111==    by 0x459A32DA: IppRequest::IppRequest() (in 
/usr/kde/3.1/lib/kde3/kdeprint_cups.so) 
==10111==    by 0x45741C77: ??? 
==10111== 
==10111== Conditional jump or move depends on uninitialised value(s) 
==10111==    at 0x45BB92E8: cupsLangGet (in /usr/lib/libcups.so.2) 
==10111==    by 0x459A32DA: IppRequest::IppRequest() (in 
/usr/kde/3.1/lib/kde3/kdeprint_cups.so) 
==10111==    by 0x45741C77: ??? 
==10110== Invalid free() / delete / delete[] 
==10110==    at 0x400299D9: free (in /usr/lib/valgrind/vgskin_memcheck.so) 
==10110==    by 0x415B8303: free_mem (in /lib/libc-2.3.2.so) 
==10110==    by 0x415B8099: __GI___libc_freeres (in /lib/libc-2.3.2.so) 
==10110==    by 0x401858A1: vgPlain___libc_freeres_wrapper (in 
/usr/lib/valgrind/valgrind.so) 
==10110==    by 0x414DCDF8: __GI_exit (in /lib/libc-2.3.2.so) 
==10110==    by 0x40AC32D8: KUniqueApplication::start() (in 
/usr/kde/3.1/lib/libkdecore.so.4.1.0) 
==10110==    by 0x4455F5EF: ??? 
==10110==    Address 0x415DA3F8 is not stack'd, malloc'd or free'd 
==10110== 
==10110== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0) 
==10110== malloc/free: in use at exit: 17542 bytes in 1256 blocks. 
==10110== malloc/free: 6287 allocs, 5032 frees, 150851 bytes allocated. 
==10110== For counts of detected errors, rerun with: -v 
==10110== searching for pointers to 1256 not-freed blocks. 
==10111== 
==10111== Conditional jump or move depends on uninitialised value(s) 
==10111==    at 0x45431DBD: 
LiquidStyle::drawPrimitive(QStyle::PrimitiveElement, QPainter*, QRect const&, 
QColorGroup const&, unsigned, QStyleOption const&) const (in 
/usr/lib/kde3/plugins/styles/liquid.so) 
==10110== checked 25014504 bytes. 
==10110== 
==10110== LEAK SUMMARY: 
==10110==    definitely lost: 0 bytes in 0 blocks. 
==10110==    possibly lost:   0 bytes in 0 blocks. 
==10110==    still reachable: 17542 bytes in 1256 blocks. 
==10110==         suppressed: 0 bytes in 0 blocks. 
==10110== Reachable blocks (those to which a pointer was found) are not shown. 
==10110== To see them, rerun with: --show-reachable=yes 
==10110== 
greg@greg greg $ ==10111== 
==10111== Conditional jump or move depends on uninitialised value(s) 
==10111==    at 0x45BB92E2: cupsLangGet (in /usr/lib/libcups.so.2) 
==10111==    by 0x459A32DA: IppRequest::IppRequest() (in 
/usr/kde/3.1/lib/kde3/kdeprint_cups.so) 
==10111==    by 0x45790A6B: ??? 
==10111== 
==10111== Conditional jump or move depends on uninitialised value(s) 
==10111==    at 0x45BB92E8: cupsLangGet (in /usr/lib/libcups.so.2) 
==10111==    by 0x459A32DA: IppRequest::IppRequest() (in 
/usr/kde/3.1/lib/kde3/kdeprint_cups.so) 
==10111==    by 0x45790A6B: ??? 
==10111== 
==10111== Conditional jump or move depends on uninitialised value(s) 
==10111==    at 0x45BB92E2: cupsLangGet (in /usr/lib/libcups.so.2) 
==10111==    by 0x459A34CC: IppRequest::init() (in 
/usr/kde/3.1/lib/kde3/kdeprint_cups.so) 
==10111==    by 0x4499A197: ??? 
==10111== 
==10111== Conditional jump or move depends on uninitialised value(s) 
==10111==    at 0x45BB92E8: cupsLangGet (in /usr/lib/libcups.so.2) 
==10111==    by 0x459A34CC: IppRequest::init() (in 
/usr/kde/3.1/lib/kde3/kdeprint_cups.so) 
==10111==    by 0x4499A197: ??? 
==10111== 
==10111== Conditional jump or move depends on uninitialised value(s) 
==10111==    at 0x45BB92E2: cupsLangGet (in /usr/lib/libcups.so.2) 
==10111==    by 0x459A34CC: IppRequest::init() (in 
/usr/kde/3.1/lib/kde3/kdeprint_cups.so) 
==10111==    by 0x449A9747: ??? 
==10111== 
==10111== Conditional jump or move depends on uninitialised value(s) 
==10111==    at 0x45BB92E8: cupsLangGet (in /usr/lib/libcups.so.2) 
==10111==    by 0x459A34CC: IppRequest::init() (in 
/usr/kde/3.1/lib/kde3/kdeprint_cups.so) 
==10111==    by 0x449A9747: ??? 
==10111== 
==10111== Conditional jump or move depends on uninitialised value(s) 
==10111==    at 0x45BB92E2: cupsLangGet (in /usr/lib/libcups.so.2) 
==10111==    by 0x459A32DA: IppRequest::IppRequest() (in 
/usr/kde/3.1/lib/kde3/kdeprint_cups.so) 
==10111==    by 0x449AAD27: ??? 
==10111== 
==10111== Conditional jump or move depends on uninitialised value(s) 
==10111==    at 0x45BB92E8: cupsLangGet (in /usr/lib/libcups.so.2) 
==10111==    by 0x459A32DA: IppRequest::IppRequest() (in 
/usr/kde/3.1/lib/kde3/kdeprint_cups.so) 
==10111==    by 0x449AAD27: ??? 
==10111== 
==10111== Conditional jump or move depends on uninitialised value(s) 
==10111==    at 0x45BB92E2: cupsLangGet (in /usr/lib/libcups.so.2) 
==10111==    by 0x459A32DA: IppRequest::IppRequest() (in 
/usr/kde/3.1/lib/kde3/kdeprint_cups.so) 
==10111==    by 0x449059CB: ??? 
==10111== 
==10111== Conditional jump or move depends on uninitialised value(s) 
==10111==    at 0x45BB92E8: cupsLangGet (in /usr/lib/libcups.so.2) 
==10111==    by 0x459A32DA: IppRequest::IppRequest() (in 
/usr/kde/3.1/lib/kde3/kdeprint_cups.so) 
==10111==    by 0x449059CB: ??? 
==10111== 
==10111== Conditional jump or move depends on uninitialised value(s) 
==10111==    at 0x45BB92E2: cupsLangGet (in /usr/lib/libcups.so.2) 
==10111==    by 0x459A34CC: IppRequest::init() (in 
/usr/kde/3.1/lib/kde3/kdeprint_cups.so) 
==10111==    by 0x4451433F: ??? 
==10111== 
==10111== Conditional jump or move depends on uninitialised value(s) 
==10111==    at 0x45BB92E8: cupsLangGet (in /usr/lib/libcups.so.2) 
==10111==    by 0x459A34CC: IppRequest::init() (in 
/usr/kde/3.1/lib/kde3/kdeprint_cups.so) 
==10111==    by 0x4451433F: ??? 
==10111== 
==10111== Conditional jump or move depends on uninitialised value(s) 
==10111==    at 0x45BB92E2: cupsLangGet (in /usr/lib/libcups.so.2) 
==10111==    by 0x459A34CC: IppRequest::init() (in 
/usr/kde/3.1/lib/kde3/kdeprint_cups.so) 
==10111==    by 0x445288EB: ??? 
==10111== 
==10111== Conditional jump or move depends on uninitialised value(s) 
==10111==    at 0x45BB92E8: cupsLangGet (in /usr/lib/libcups.so.2) 
==10111==    by 0x459A34CC: IppRequest::init() (in 
/usr/kde/3.1/lib/kde3/kdeprint_cups.so) 
==10111==    by 0x445288EB: ??? 
==10111== 
==10111== Conditional jump or move depends on uninitialised value(s) 
==10111==    at 0x45BB92E2: cupsLangGet (in /usr/lib/libcups.so.2) 
==10111==    by 0x459A32DA: IppRequest::IppRequest() (in 
/usr/kde/3.1/lib/kde3/kdeprint_cups.so) 
==10111==    by 0x45725347: ??? 
==10111== 
==10111== Conditional jump or move depends on uninitialised value(s) 
==10111==    at 0x45BB92E8: cupsLangGet (in /usr/lib/libcups.so.2) 
==10111==    by 0x459A32DA: IppRequest::IppRequest() (in 
/usr/kde/3.1/lib/kde3/kdeprint_cups.so) 
==10111==    by 0x45725347: ??? 
==10111== 
==10111== Conditional jump or move depends on uninitialised value(s) 
==10111==    at 0x45BB92E2: cupsLangGet (in /usr/lib/libcups.so.2) 
==10111==    by 0x459A32DA: IppRequest::IppRequest() (in 
/usr/kde/3.1/lib/kde3/kdeprint_cups.so) 
==10111==    by 0x457B4C37: ??? 
==10111== 
==10111== Conditional jump or move depends on uninitialised value(s) 
==10111==    at 0x45BB92E8: cupsLangGet (in /usr/lib/libcups.so.2) 
==10111==    by 0x459A32DA: IppRequest::IppRequest() (in 
/usr/kde/3.1/lib/kde3/kdeprint_cups.so) 
==10111==    by 0x457B4C37: ??? 
==10111== 
==10111== Conditional jump or move depends on uninitialised value(s) 
==10111==    at 0x45BB92E2: cupsLangGet (in /usr/lib/libcups.so.2) 
==10111==    by 0x459A34CC: IppRequest::init() (in 
/usr/kde/3.1/lib/kde3/kdeprint_cups.so) 
==10111==    by 0x4499D243: ??? 
==10111== 
==10111== Conditional jump or move depends on uninitialised value(s) 
==10111==    at 0x45BB92E8: cupsLangGet (in /usr/lib/libcups.so.2) 
==10111==    by 0x459A34CC: IppRequest::init() (in 
/usr/kde/3.1/lib/kde3/kdeprint_cups.so) 
==10111==    by 0x4499D243: ??? 
==10111== 
==10111== Conditional jump or move depends on uninitialised value(s) 
==10111==    at 0x45BB92E2: cupsLangGet (in /usr/lib/libcups.so.2) 
==10111==    by 0x459A34CC: IppRequest::init() (in 
/usr/kde/3.1/lib/kde3/kdeprint_cups.so) 
==10111==    by 0x4455CD17: ??? 
==10111== 
==10111== Conditional jump or move depends on uninitialised value(s) 
==10111==    at 0x45BB92E8: cupsLangGet (in /usr/lib/libcups.so.2) 
==10111==    by 0x459A34CC: IppRequest::init() (in 
/usr/kde/3.1/lib/kde3/kdeprint_cups.so) 
==10111==    by 0x4455CD17: ??? 
==10111== 
==10111== Conditional jump or move depends on uninitialised value(s) 
==10111==    at 0x45BB92E2: cupsLangGet (in /usr/lib/libcups.so.2) 
==10111==    by 0x459A32DA: IppRequest::IppRequest() (in 
/usr/kde/3.1/lib/kde3/kdeprint_cups.so) 
==10111==    by 0x457A88B7: ??? 
==10111== 
==10111== Conditional jump or move depends on uninitialised value(s) 
==10111==    at 0x45BB92E8: cupsLangGet (in /usr/lib/libcups.so.2) 
==10111==    by 0x459A32DA: IppRequest::IppRequest() (in 
/usr/kde/3.1/lib/kde3/kdeprint_cups.so) 
==10111==    by 0x457A88B7: ??? 
==10111== 
==10111== Conditional jump or move depends on uninitialised value(s) 
==10111==    at 0x45BB92E2: cupsLangGet (in /usr/lib/libcups.so.2) 
==10111==    by 0x459A32DA: IppRequest::IppRequest() (in 
/usr/kde/3.1/lib/kde3/kdeprint_cups.so) 
==10111==    by 0x44988F67: ??? 
==10111== 
==10111== Conditional jump or move depends on uninitialised value(s) 
==10111==    at 0x45BB92E8: cupsLangGet (in /usr/lib/libcups.so.2) 
==10111==    by 0x459A32DA: IppRequest::IppRequest() (in 
/usr/kde/3.1/lib/kde3/kdeprint_cups.so) 
==10111==    by 0x44988F67: ??? 
==10111== 
==10111== Conditional jump or move depends on uninitialised value(s) 
==10111==    at 0x45BB92E2: cupsLangGet (in /usr/lib/libcups.so.2) 
==10111==    by 0x459A34CC: IppRequest::init() (in 
/usr/kde/3.1/lib/kde3/kdeprint_cups.so) 
==10111==    by 0x44948DC3: ??? 
==10111== 
==10111== Conditional jump or move depends on uninitialised value(s) 
==10111==    at 0x45BB92E8: cupsLangGet (in /usr/lib/libcups.so.2) 
==10111==    by 0x459A34CC: IppRequest::init() (in 
/usr/kde/3.1/lib/kde3/kdeprint_cups.so) 
==10111==    by 0x44948DC3: ??? 
==10111== 
==10111== More than 50 errors detected.  Subsequent errors 
==10111== will still be recorded, but in less detail than before. 
==10111== discard syms in /lib/libnss_compat-2.3.2.so due to munmap() 
==10111== discard syms in /lib/libnsl-2.3.2.so due to munmap() 
==10111== 
==10111== Invalid read of size 1 
==10111==    at 0x415B4560: __GI__dl_close (in /lib/libc-2.3.2.so) 
==10111==    by 0x415B516D: do_dlclose (in /lib/libc-2.3.2.so) 
==10111==    by 0x4000AA67: _dl_catch_error_internal (in /lib/ld-2.3.2.so) 
==10111==    by 0x415B50AD: dlerror_run (in /lib/libc-2.3.2.so) 
==10111==    by 0x415B820C: free_mem (in /lib/libc-2.3.2.so) 
==10111==    by 0x415B8099: __GI___libc_freeres (in /lib/libc-2.3.2.so) 
==10111==    by 0x401858A1: vgPlain___libc_freeres_wrapper (in 
/usr/lib/valgrind/valgrind.so) 
==10111==    by 0x414DCDF8: __GI_exit (in /lib/libc-2.3.2.so) 
==10111==    by 0x414C77AE: __libc_start_main (in /lib/libc-2.3.2.so) 
==10111==    by 0x8048570: (within /usr/kde/3.1/bin/kjobviewer) 
==10111==    Address 0x1E7 is not stack'd, malloc'd or free'd 
==10111== Warning: client attempted to close Valgrind's logfile fd (2). 
==10111==    Use --logfile-fd=<number> to select an alternative logfile fd. 
KCrash: Application 'kjobviewer' crashing... 
==10340== Warning: SIGSEGV not in user code; either from syscall kill() 
==10340==    or possible Valgrind bug.  This message is only shown 3 times. 
==10340== Warning: SIGSEGV not in user code; either from syscall kill() 
==10340==    or possible Valgrind bug.  This message is only shown 3 times. 
==10340== Warning: SIGSEGV not in user code; either from syscall kill() 
==10340==    or possible Valgrind bug.  This message is only shown 3 times. 
==10111== 
==10111== ERROR SUMMARY: 7851 errors from 51 contexts (suppressed: 128 from 6) 
==10111== malloc/free: in use at exit: 18948887 bytes in 527753 blocks. 
==10111== malloc/free: 22613765 allocs, 22086012 frees, 721885769 bytes 
allocated. 
==10111== For counts of detected errors, rerun with: -v 
==10111== searching for pointers to 527753 not-freed blocks. 
==10111== checked 45450772 bytes. 
==10111== 
==10111== 
==10111== 0 bytes in 1 blocks are definitely lost in loss record 1 of 178 
==10111==    at 0x400296F9: malloc (in /usr/lib/valgrind/vgskin_memcheck.so) 
==10111==    by 0x40E6FF5F: QRegion::clipRectangles(int&) const (in 
/usr/qt/3/lib/libqt-mt.so.3.1.2) 
==10111==    by 0x40E65090: QPainter::setClipping(bool) (in 
/usr/qt/3/lib/libqt-mt.so.3.1.2) 
==10111==    by 0x40E652E7: QPainter::setClipRegion(QRegion const&, 
QPainter::CoordinateMode) (in /usr/qt/3/lib/libqt-mt.so.3.1.2) 
==10111==    by 0x40F025FC: qt_format_text(QFont const&, QRect const&, int, 
QString const&, int, QRect*, int, int*, int, QTextParag**, QPainter*) (in 
/usr/qt/3/lib/libqt-mt.so.3.1.2) 
==10111==    by 0x40F01F62: QPainter::drawText(QRect const&, int, QString 
const&, int, QRect*, QTextParag**) (in /usr/qt/3/lib/libqt-mt.so.3.1.2) 
==10111==    by 0x40FA226C: QHeader::paintSectionLabel(QPainter*, int, QRect 
const&) (in /usr/qt/3/lib/libqt-mt.so.3.1.2) 
==10111==    by 0x40FA1A9E: QHeader::paintSection(QPainter*, int, QRect 
const&) (in /usr/qt/3/lib/libqt-mt.so.3.1.2) 
==10111==    by 0x40FA2968: QHeader::paintEvent(QPaintEvent*) (in 
/usr/qt/3/lib/libqt-mt.so.3.1.2) 
==10111==    by 0x40F3064C: QWidget::event(QEvent*) (in 
/usr/qt/3/lib/libqt-mt.so.3.1.2) 
==10111== 
==10111== 
==10111== 0 bytes in 1 blocks are definitely lost in loss record 2 of 178 
==10111==    at 0x400298EE: __builtin_vec_new (in 
/usr/lib/valgrind/vgskin_memcheck.so) 
==10111==    by 0x40029959: operator new[](unsigned) (in 
/usr/lib/valgrind/vgskin_memcheck.so) 
==10111==    by 0x4117907D: internalLatin1ToUnicode(char const*, unsigned*, 
unsigned) (in /usr/qt/3/lib/libqt-mt.so.3.1.2) 
==10111==    by 0x411799DC: QString::QString(char const*) (in 
/usr/qt/3/lib/libqt-mt.so.3.1.2) 
==10111==    by 0x40FB3D08: QLineEditPrivate::QLineEditPrivate(QLineEdit*) (in 
/usr/qt/3/lib/libqt-mt.so.3.1.2) 
==10111==    by 0x40FABD70: QLineEdit::init() (in 
/usr/qt/3/lib/libqt-mt.so.3.1.2) 
==10111==    by 0x40FAB8B8: QLineEdit::QLineEdit(QWidget*, char const*) (in 
/usr/qt/3/lib/libqt-mt.so.3.1.2) 
==10111==    by 0x4029E462: KMJobViewer::initActions() (in 
/usr/kde/3.1/lib/libkdeprint_management.so.4.1.0) 
==10111== 
==10111== 
==10111== 16 bytes in 1 blocks are definitely lost in loss record 46 of 178 
==10111==    at 0x400296F9: malloc (in /usr/lib/valgrind/vgskin_memcheck.so) 
==10111==    by 0x4138A06E: XrmGetStringDatabase (in 
/usr/X11R6/lib/libX11.so.6.2) 
==10111==    by 0x4136F52A: InitDefaults (in /usr/X11R6/lib/libX11.so.6.2) 
==10111==    by 0x4136F217: XGetDefault (in /usr/X11R6/lib/libX11.so.6.2) 
==10111==    by 0x454DB24F: _XcursorGetDisplayInfo (in 
/usr/X11R6/lib/libXcursor.so.1.0) 
==10111==    by 0x454DB2DE: XcursorSupportsARGB (in 
/usr/X11R6/lib/libXcursor.so.1.0) 
==10111==    by 0x454DE6EB: XcursorNoticeCreateBitmap (in 
/usr/X11R6/lib/libXcursor.so.1.0) 
==10111==    by 0x413697E5: _XNoticeCreateBitmap (in 
/usr/X11R6/lib/libX11.so.6.2) 
==10111==    by 0x41369DDC: XCreatePixmap (in /usr/X11R6/lib/libX11.so.6.2) 
==10111==    by 0x41368BAE: XCreateBitmapFromData (in 
/usr/X11R6/lib/libX11.so.6.2) 
==10111== 
==10111== 
==10111== 23 bytes in 1 blocks are definitely lost in loss record 50 of 178 
==10111==    at 0x400296F9: malloc (in /usr/lib/valgrind/vgskin_memcheck.so) 
==10111==    by 0x4590F59C: ??? 
==10111==    by 0x45911C48: ??? 
==10111==    by 0x4155A2A3: getpwuid_r@@GLIBC_2.1.2 (in /lib/libc-2.3.2.so) 
==10111==    by 0x41559C9D: getpwuid (in /lib/libc-2.3.2.so) 
==10111==    by 0x40E47566: sm_performSaveYourself(QSessionManagerData*) (in 
/usr/qt/3/lib/libqt-mt.so.3.1.2) 
==10111==    by 0x40E47301: sm_saveYourselfCallback(_SmcConn*, void*, int, 
int, int, int) (in /usr/qt/3/lib/libqt-mt.so.3.1.2) 
==10111==    by 0x41436400: _SmcProcessMessage (in 
/usr/X11R6/lib/libSM.so.6.0) 
==10111==    by 0x414429DE: IceProcessMessages (in 
/usr/X11R6/lib/libICE.so.6.3) 
==10111==    by 0x40E47DA9: QSmSocketReceiver::socketActivated(int) (in 
/usr/qt/3/lib/libqt-mt.so.3.1.2) 
==10111== 
==10111== 
==10111== 36 bytes in 1 blocks are definitely lost in loss record 72 of 178 
==10111==    at 0x400296F9: malloc (in /usr/lib/valgrind/vgskin_memcheck.so) 
==10111==    by 0x41596653: nss_parse_service_list (in /lib/libc-2.3.2.so) 
==10111==    by 0x41595F84: __GI___nss_database_lookup (in /lib/libc-2.3.2.so) 
==10111==    by 0x45911CD2: ??? 
==10111==    by 0x4155A2A3: getpwuid_r@@GLIBC_2.1.2 (in /lib/libc-2.3.2.so) 
==10111==    by 0x41559C9D: getpwuid (in /lib/libc-2.3.2.so) 
==10111==    by 0x40E47566: sm_performSaveYourself(QSessionManagerData*) (in 
/usr/qt/3/lib/libqt-mt.so.3.1.2) 
==10111==    by 0x40E47301: sm_saveYourselfCallback(_SmcConn*, void*, int, 
int, int, int) (in /usr/qt/3/lib/libqt-mt.so.3.1.2) 
==10111==    by 0x41436400: _SmcProcessMessage (in 
/usr/X11R6/lib/libSM.so.6.0) 
==10111==    by 0x414429DE: IceProcessMessages (in 
/usr/X11R6/lib/libICE.so.6.3) 
==10111== 
==10111== 
==10111== 216 bytes in 1 blocks are definitely lost in loss record 118 of 178 
==10111==    at 0x400296F9: malloc (in /usr/lib/valgrind/vgskin_memcheck.so) 
==10111==    by 0x450A1DF2: _XimOpenIM (in 
/usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2) 
==10111==    by 0x413D26A2: _XDynamicOpenIM (in /usr/X11R6/lib/libX11.so.6.2) 
==10111==    by 0x450A15AA: _XimRegisterIMInstantiateCallback (in 
/usr/X11R6/lib/X11/locale/lib/common/ximcp.so.2) 
==10111==    by 0x413D2900: _XDynamicRegisterIMInstantiateCallback (in 
/usr/X11R6/lib/libX11.so.6.2) 
==10111==    by 0x413A1359: XRegisterIMInstantiateCallback (in 
/usr/X11R6/lib/libX11.so.6.2) 
==10111==    by 0x40E3D167: qt_init_internal(int*, char**, _XDisplay*, 
unsigned long, unsigned long) (in /usr/qt/3/lib/libqt-mt.so.3.1.2) 
==10111==    by 0x40E3F59D: qt_init(int*, char**, QApplication::Type) (in 
/usr/qt/3/lib/libqt-mt.so.3.1.2) 
==10111==    by 0x40E9A74F: QApplication::construct(int&, char**, 
QApplication::Type) (in /usr/qt/3/lib/libqt-mt.so.3.1.2) 
==10111==    by 0x40E9A4A7: QApplication::QApplication(int&, char**, bool) (in 
/usr/qt/3/lib/libqt-mt.so.3.1.2) 
==10111== 
==10111== LEAK SUMMARY: 
==10111==    definitely lost: 291 bytes in 6 blocks. 
==10111==    possibly lost:   0 bytes in 0 blocks. 
==10111==    still reachable: 18948396 bytes in 527746 blocks. 
==10111==         suppressed: 200 bytes in 1 blocks. 
==10111== Reachable blocks (those to which a pointer was found) are not shown. 
==10111== To see them, rerun with: --show-reachable=yes 
==10111== 
 
 
Comment 13 Lubos Lunak 2003-10-02 09:40:43 UTC
As the 'LEAK SUMMARY:' shows, there are no real leaks. The 'still reachable:' part in it shows, 
perhaps kjobviewer adds items to some list and forgets to remove them, or something similar. 
Could you try again, with also '--show-reachable=yes' added to the options? And please don't 
post such long texts, add them as attachments instead. 
 
Comment 14 Greg Briggs 2003-10-04 06:25:42 UTC
Created attachment 2681 [details]
Valgrind --show-reachable=yes

Note, within kjobviewer I toggled on completed jobs. It was using more than 100
megs of memory after 10 minutes.
Comment 15 Riku Voipio 2003-10-29 00:15:00 UTC
this is also reproduced on debian bug 207719
--
Leaving kjobviewer running (but idle) overnight results in a 130M process. I
have 3 CUPS printers defined (one PPD each from cups, gimp-print and
turboprint (for the same SMB:// printer)).
--
Comment 16 Dominique Devriese 2003-12-28 00:09:38 UTC
Created attachment 3855 [details]
The valgrind output hinting at a fontconfig bug

I can reproduce this bug on my parents' unstable Debian box.  Note that the
problem doesn't show if you aren't monitoring any printer queues.

I'm attaching my valgrind output for the command:
valgrind --leak-check=yes --show-reachable=yes --num-callers=10 kjobviewer
--all --nofork > kjobviewer.out.txt 2>&1
I've kept it running for about half an hour monitoring the default printer
queue.

The interesting part of the output is the following:
==6562== 2484972 bytes in 1211 blocks are still reachable in loss record 295 of
296
==6562==    at 0x4002D685: calloc (vg_replace_malloc.c:201)
==6562==    by 0x464054E0: cupsLangGet (in /usr/lib/libcups.so.2)
==6562==    by 0x4630514D: IppRequest::init() (in
/usr/lib/kde3/kdeprint_cups.so)
==6562==    by 0x46304FDE: IppRequest::IppRequest() (in
/usr/lib/kde3/kdeprint_cups.so)
==6562==    by 0x4630E9E1: KMCupsManager::loadServerPrinters() (in
/usr/lib/kde3/kdeprint_cups.so)
==6562==    by 0x4630E9AE: KMCupsManager::listPrinters() (in
/usr/lib/kde3/kdeprint_cups.so)
==6562==    by 0x40353AD0: KMManager::printerList(bool) (in
/usr/lib/libkdeprint.so.4.1.0)
==6562==    by 0x4024DEAB: KJobViewerApp::slotTimer() (in
/usr/lib/kjobviewer.so)
==6562==    by 0x4024E43C: KJobViewerApp::qt_invoke(int, QUObject*) (in
/usr/lib/kjobviewer.so)
==6562==    by 0x40D81845: QObject::activate_signal(QConnectionList*,
QUObject*) (in /usr/lib/libqt-mt.so.3.2.1)

There's another one just like this after it, for 3,3Megs instead of 2,5 this
time.  I think this is a likely candidate for the leak, as it is invoked from a
slotTimer() which would explain the increasing memory usage overnight.

Anyway, 3 or 2 megs is too much for any serious fontconfig purpose, and I'll be
refiling the previously mentioned debian bug to the fontconfig package.

cheers
domi
Comment 17 Waldo Bastian 2004-01-14 12:59:03 UTC
Subject: [PATCH] kprinter memory leak (BR62945)

I think I saw this patch before but I can't find it anywhere and it's not in 
CVS. Should fix BR62945

Index: ipprequest.cpp
===================================================================
RCS file: /home/kde/kdelibs/kdeprint/cups/ipprequest.cpp,v
retrieving revision 1.28
diff -u -r1.28 ipprequest.cpp
- --- ipprequest.cpp	4 Jan 2004 17:52:28 -0000	1.28
+++ ipprequest.cpp	14 Jan 2004 11:46:50 -0000
@@ -152,6 +152,7 @@
 	lang->encoding = CUPS_UTF8;
 	ippAddString(request_, IPP_TAG_OPERATION, IPP_TAG_CHARSET, 
"attributes-charset", NULL, cupsLangEncoding(lang));
 	ippAddString(request_, IPP_TAG_OPERATION, IPP_TAG_LANGUAGE, 
"attributes-natural-language", NULL, lang->language);
+	cupsLangFree(lang);
 }
 
 void IppRequest::addString_p(int group, int type, const QString& name, const 
QString& value)


Comment 18 Dominique Devriese 2004-01-24 16:59:42 UTC
According to http://bugs.debian.org/207719 this has been fixed in Debian cupsys, perhaps upstream too.  Not sure how really, as waba's patch does not seem to have been applied to 3_1_BRANCH.

cheers
domi
Comment 19 Dirk Mueller 2004-01-26 05:29:13 UTC
its been fixed in 3_1_BRANCH, 3_2_BRANCH and HEAD. 
Comment 20 John Layt 2008-12-31 13:15:55 UTC
Closing old Resolved status bug.