Bug 49935

Summary: kdesktop refuses to die after logout and then chews 99% cpu
Product: [Unmaintained] kdesktop Reporter: Daniel Quinn <expendable.0>
Component: generalAssignee: David Faure <faure>
Status: CLOSED FIXED    
Severity: normal CC: finex
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Gentoo Packages   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Daniel Quinn 2002-10-30 17:19:11 UTC
Version:           4.04.04.04.0 (using KDE 3.0.4)
Installed from:    Gentoo
Compiler:          gcc version 2.95.3 20010315 (release)
OS:          Linux (i686) release 2.4.19-gentoo-r9

i start kde by issuing "startx" from the command line after boot.  *most* of the time, when i logout (and therefore return to the console, my cpu usage goes up to 99% and stays there... indefinately.

it appears that kdeinit:kdesktop is the culprit, chewing up all of my cpu power.  and if i don't kill it (a normal kill won't work, it has to be "kill -9") and run "startx" again, a new copy of kdesktop is started that behaves itself... until i log out again.  then the two of them are sharing the cpu at about 49% each.


things worth noting:
--------------------------------
i'm using kde's "multiple wallpaper" feature and it's pulling in 504 different wallpapers (~200mb) from a vfat partition.


and this is the tail of the output i see after logging out (but only when kdesktop is still running.)

warning: leaving MCOP Dispatcher and still 74 types alive.

waiting for X server to shut down *** kdesktop got signal 1 (Exiting)


user@localhost user $ kdeinit: sending SIGTERM to children.
kdeinit: Exit
*** kdesktop got signal 15 (Exiting)

<i hit eneter>

user@localhost user $ ps -aux | grep kdesk
user  6801  8.1  3.0 64684 15636 ?       R    11:02   0:09 kdeinit:kdesktop
user@localhost user $

it's not a huge piss-off, but it is a bother since the non-geeks in the house aren't familiar with ps or kill.
Comment 1 David Faure 2002-10-30 19:14:14 UTC
Subject: Re:  New: kdesktop refuses to die after logout and then chews 99% cpu

> user@localhost user $ ps -aux | grep kdesk
> user  6801  8.1  3.0 64684 15636 ?       R    11:02   0:09 kdeinit:kdesktop

Can you attach gdb to it, to find out what it's doing?
Like:

gdb kdeinit 6801
<press enter as many times as asked>
bt
copy/paste and send the resulting backtrace.

Thanks.

Comment 2 Daniel Quinn 2002-10-31 20:18:52 UTC
gabriel@localhost gabriel $ gdb kdeinit 9772 
GNU gdb 5.2.1 
Copyright 2002 Free Software Foundation, Inc. 
GDB is free software, covered by the GNU General Public License, and you are 
welcome to change it and/or distribute copies of it under certain conditions. 
Type "show copying" to see the conditions. 
There is absolutely no warranty for GDB.  Type "show warranty" for details. 
This GDB was configured as "i686-pc-linux-gnu"...(no debugging symbols 
found)... 
Attaching to program: /usr/kde/3/bin/kdeinit, process 9772 
Reading symbols from /usr/kde/3/lib/libDCOP.so.4...(no debugging symbols 
found)...done. 
Loaded symbols for /usr/kde/3/lib/libDCOP.so.4 
Reading symbols from /usr/kde/3/lib/libkparts.so.2...(no debugging symbols 
found)...done. 
Loaded symbols for /usr/kde/3/lib/libkparts.so.2 
Reading symbols from /usr/kde/3/lib/libkio.so.4...(no debugging symbols 
found)...done. 
Loaded symbols for /usr/kde/3/lib/libkio.so.4 
Reading symbols from /usr/kde/3/lib/libkdeui.so.4...(no debugging symbols 
found)...done. 
Loaded symbols for /usr/kde/3/lib/libkdeui.so.4 
Reading symbols from /usr/kde/3/lib/libkdefx.so.4...(no debugging symbols 
found)...done. 
Loaded symbols for /usr/kde/3/lib/libkdefx.so.4 
Reading symbols from /usr/X11R6/lib/libXrender.so.1...(no debugging symbols 
found)...done. 
Loaded symbols for /usr/X11R6/lib/libXrender.so.1 
Reading symbols from /usr/kde/3/lib/libkdesu.so.4...(no debugging symbols 
found)...done. 
Loaded symbols for /usr/kde/3/lib/libkdesu.so.4 
Reading symbols from /usr/kde/3/lib/libkdecore.so.4...(no debugging symbols 
found)...done. 
Loaded symbols for /usr/kde/3/lib/libkdecore.so.4 
Reading symbols from /usr/lib/libfam.so.0...(no debugging symbols 
found)...done. 
Loaded symbols for /usr/lib/libfam.so.0 
Reading symbols from /usr/qt/3/lib/libqt-mt.so.3...(no debugging symbols 
found)...done. 
Loaded symbols for /usr/qt/3/lib/libqt-mt.so.3 
Reading symbols from /usr/lib/libpng12.so.0...(no debugging symbols 
found)...done. 
Loaded symbols for /usr/lib/libpng12.so.0 
Reading symbols from /usr/lib/libz.so.1...(no debugging symbols found)...done. 
Loaded symbols for /usr/lib/libz.so.1 
Reading symbols from /usr/X11R6/lib/libX11.so.6...(no debugging symbols 
found)...done. 
Loaded symbols for /usr/X11R6/lib/libX11.so.6 
Reading symbols from /usr/X11R6/lib/libSM.so.6...(no debugging symbols 
found)...done. 
Loaded symbols for /usr/X11R6/lib/libSM.so.6 
Reading symbols from /usr/X11R6/lib/libICE.so.6...(no debugging symbols 
found)...done. 
Loaded symbols for /usr/X11R6/lib/libICE.so.6 
Reading symbols from /lib/libpthread.so.0...(no debugging symbols 
found)...done. 
[New Thread 1024 (LWP 9772)] 
Loaded symbols for /lib/libpthread.so.0 
Reading symbols from /lib/libdl.so.2...(no debugging symbols found)...done. 
Loaded symbols for /lib/libdl.so.2 
Reading symbols from /usr/X11R6/lib/libXext.so.6...(no debugging symbols 
found)...done. 
Loaded symbols for /usr/X11R6/lib/libXext.so.6 
Reading symbols from /lib/libresolv.so.2...(no debugging symbols 
found)...done. 
Loaded symbols for /lib/libresolv.so.2 
Reading symbols from 
/usr/lib/gcc-lib/i686-pc-linux-gnu/2.95.3/libstdc++-libc6.2-2.so.3...(no 
debugging symbols found)...done. 
Loaded symbols for 
/usr/lib/gcc-lib/i686-pc-linux-gnu/2.95.3/libstdc++-libc6.2-2.so.3 
Reading symbols from /lib/libutil.so.1...(no debugging symbols found)...done. 
Loaded symbols for /lib/libutil.so.1 
Reading symbols from /lib/libm.so.6...(no debugging symbols found)...done. 
Loaded symbols for /lib/libm.so.6 
Reading symbols from /lib/libc.so.6...(no debugging symbols found)...done. 
Loaded symbols for /lib/libc.so.6 
Reading symbols from /usr/lib/libmng.so.1...(no debugging symbols 
found)...done. 
Loaded symbols for /usr/lib/libmng.so.1 
Reading symbols from /usr/lib/libjpeg.so.62...(no debugging symbols 
found)...done. 
Loaded symbols for /usr/lib/libjpeg.so.62 
Reading symbols from /usr/lib/libGL.so.1...(no debugging symbols 
found)...done. 
Loaded symbols for /usr/lib/libGL.so.1 
Reading symbols from /usr/X11R6/lib/libXmu.so.6...(no debugging symbols 
found)...done. 
Loaded symbols for /usr/X11R6/lib/libXmu.so.6 
Reading symbols from /usr/X11R6/lib/libXft.so.1...(no debugging symbols 
found)...done. 
Loaded symbols for /usr/X11R6/lib/libXft.so.1 
Reading symbols from /usr/X11R6/lib/libfreetype.so.6...(no debugging symbols 
found)...done. 
Loaded symbols for /usr/X11R6/lib/libfreetype.so.6 
Reading symbols from /usr/X11R6/lib/libXi.so.6...(no debugging symbols 
found)...done. 
Loaded symbols for /usr/X11R6/lib/libXi.so.6 
Reading symbols from /lib/ld-linux.so.2...(no debugging symbols found)...done. 
Loaded symbols for /lib/ld-linux.so.2 
Reading symbols from /usr/X11R6/lib/libXt.so.6...(no debugging symbols 
found)...done. 
Loaded symbols for /usr/X11R6/lib/libXt.so.6 
Reading symbols from /usr/lib/libfontconfig.so.1...(no debugging symbols 
found)...done. 
Loaded symbols for /usr/lib/libfontconfig.so.1 
Reading symbols from /usr/lib/libexpat.so.0...(no debugging symbols 
found)...done. 
Loaded symbols for /usr/lib/libexpat.so.0 
Reading symbols from /usr/kde/3/lib/libkonq.so.4...(no debugging symbols 
found)...done. 
Loaded symbols for /usr/kde/3/lib/libkonq.so.4 
Reading symbols from /usr/kde/3/lib/kdesktop.so...(no debugging symbols 
found)...done. 
Loaded symbols for /usr/kde/3/lib/kdesktop.so 
Reading symbols from /usr/X11R6/lib/X11/locale/common/xlcDef.so.2...(no 
debugging symbols found)...done. 
Loaded symbols for /usr/X11R6/lib/X11/locale/common/xlcDef.so.2 
Reading symbols from /usr/X11R6/lib/X11/locale/common/ximcp.so.2...(no 
debugging symbols found)...done. 
Loaded symbols for /usr/X11R6/lib/X11/locale/common/ximcp.so.2 
Reading symbols from /usr/kde/3/lib/kde3/plugins//styles/highcolor.so...(no 
debugging symbols found)...done. 
Loaded symbols for /usr/kde/3/lib/kde3/plugins//styles/highcolor.so 
Reading symbols from /lib/libnss_compat.so.2...(no debugging symbols 
found)...done. 
Loaded symbols for /lib/libnss_compat.so.2 
Reading symbols from /lib/libnsl.so.1...(no debugging symbols found)...done. 
Loaded symbols for /lib/libnsl.so.1 
Reading symbols from /usr/kde/3/lib/kde3/konq_sound.so...(no debugging symbols 
found)...done. 
Loaded symbols for /usr/kde/3/lib/kde3/konq_sound.so 
---Type <return> to continue, or q <return> to quit--- 
Reading symbols from /usr/kde/3/lib/libartskde.so.1...(no debugging symbols 
found)...done. 
Loaded symbols for /usr/kde/3/lib/libartskde.so.1 
Reading symbols from /usr/kde/3/lib/libqtmcop.so.1...(no debugging symbols 
found)...done. 
Loaded symbols for /usr/kde/3/lib/libqtmcop.so.1 
Reading symbols from /usr/kde/3/lib/libsoundserver_idl.so.1...(no debugging 
symbols found)...done. 
Loaded symbols for /usr/kde/3/lib/libsoundserver_idl.so.1 
Reading symbols from /usr/kde/3/lib/libkmedia2_idl.so.1...(no debugging 
symbols found)...done. 
Loaded symbols for /usr/kde/3/lib/libkmedia2_idl.so.1 
Reading symbols from /usr/kde/3/lib/libartsflow.so.1...(no debugging symbols 
found)...done. 
Loaded symbols for /usr/kde/3/lib/libartsflow.so.1 
Reading symbols from /usr/lib/libaudiofile.so.0...(no debugging symbols 
found)...done. 
Loaded symbols for /usr/lib/libaudiofile.so.0 
Reading symbols from /usr/kde/3/lib/libartsflow_idl.so.1...(no debugging 
symbols found)...done. 
Loaded symbols for /usr/kde/3/lib/libartsflow_idl.so.1 
Reading symbols from /usr/kde/3/lib/libmcop.so.1...(no debugging symbols 
found)...done. 
Loaded symbols for /usr/kde/3/lib/libmcop.so.1 
Reading symbols from /lib/libnss_files.so.2...(no debugging symbols 
found)...done. 
Loaded symbols for /lib/libnss_files.so.2 
Reading symbols from /usr/X11R6/lib/X11/locale/common/xomGeneric.so.2...(no 
debugging symbols found)...done. 
Loaded symbols for /usr/X11R6/lib/X11/locale/common/xomGeneric.so.2 
Reading symbols from /usr/kde/3/lib/kde3/libkurisearchfilter.so...(no 
debugging symbols found)...done. 
Loaded symbols for /usr/kde/3/lib/kde3/libkurisearchfilter.so 
Reading symbols from /usr/kde/3/lib/kde3/libkshorturifilter.so...(no debugging 
symbols found)...done. 
Loaded symbols for /usr/kde/3/lib/kde3/libkshorturifilter.so 
Reading symbols from /usr/kde/3/lib/kde3/libkuriikwsfilter.so...(no debugging 
symbols found)...done. 
Loaded symbols for /usr/kde/3/lib/kde3/libkuriikwsfilter.so 
0x405d5c31 in malloc () from /usr/kde/3/lib/libkdecore.so.4 
 
Comment 3 Waldo Bastian 2002-11-12 23:29:09 UTC
The same problem is also reported as part of bug 48984
(Among others)

I think the SIGHUP and SIGTERM signal handlers should be reset to default. The
logs show that both are being called. One would expect the kdesktop process to
be gone by the time the SIGTERM is send, when that isn't the case kapp->quit()
is called again. Currently kapp can be 0 when the second signal arrives
(although I don't think this is the case).

Apart from the above there is something else wrong because kdesktop should have
done a complete exit before the SIGTERM arrives.
Comment 4 Waldo Bastian 2002-11-21 13:40:51 UTC
Subject: kdelibs/kio/kio

CVS commit by waba: 

CCMAIL: 49935@bugs.kde.org
Using kdDebug from a signal handler is not a good idea.
This might actually be causing BR49935


  M +10 -1     slaveinterface.cpp   1.72

Comment 5 Waldo Bastian 2003-04-23 16:41:44 UTC
Should be more or less fixed now. 
Comment 6 FiNeX 2009-01-02 20:20:26 UTC
Bug closed. Kdesktop is no more mantained.