Bug 162140

Summary: kded crashes every few hours (in libkio?)
Product: [Unmaintained] kdelibs Reporter: Daniel Winter <dw>
Component: kdedAssignee: David Faure <faure>
Status: RESOLVED DUPLICATE    
Severity: crash    
Priority: HI    
Version: unspecified   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Daniel Winter 2008-05-16 00:21:20 UTC
Version:            (using Devel)
Installed from:    Compiled sources
Compiler:          gcc 4.3.0 
OS:                Linux

kded crashes every few hours.

Using kde trunk built on may the 14th 08

That is the output of kded4 before the crash:

kded(10647)/kio (KPasswdServer) KPasswdServer::checkAuthInfo: KPasswdServer::checkAuthInfo: User=  "" , WindowId =  0        
kded(10647)/kio (KPasswdServer) KPasswdServer::checkAuthInfo: KPasswdServer::checkAuthInfo: User=  "" , WindowId =  0        
kded(10647)/kio (KIOJob) KIO::SimpleJob::~SimpleJob: Killing running job in destructor! "[                                   
0: /home/kde-devel/kde/lib/libkdecore.so.5(_Z14kRealBacktracei+0x3e) [0xb7b215be]                                            
1: /home/kde-devel/kde/lib/libkio.so.5(_ZN3KIO9SimpleJobD2Ev+0x4f) [0xb7d36b7f]                                              
2: /home/kde-devel/kde/lib/libkio.so.5(_ZN3KIO11TransferJobD0Ev+0x2d) [0xb7d36ded]                                           
3: /home/kde-devel/kde/lib/kde4/kded_favicons.so [0xb466b2d6]                                                                
4: /home/kde-devel/kde/lib/kde4/kded_favicons.so [0xb466e1cb]                                                                
5: /usr/lib/libQtCore.so.4(_ZN11QMetaObject8activateEP7QObjectiiPPv+0x201) [0xb7243641]                                      
6: /usr/lib/libQtCore.so.4(_ZN11QMetaObject8activateEP7QObjectPKS_iPPv+0x52) [0xb72443a2]                                    
7: /usr/lib/libQtCore.so.4 [0xb7249967]                                                                                      
8: /usr/lib/libQtCore.so.4 [0xb7249a8c]                                                                                      
9: /usr/lib/libQtCore.so.4(_ZN7QObject5eventEP6QEvent+0x7f) [0xb723e15f]                                                     
10: /usr/lib/libQtGui.so.4(_ZN19QApplicationPrivate13notify_helperEP7QObjectP6QEvent+0xbc) [0xb6876d7c]                      
11: /usr/lib/libQtGui.so.4(_ZN12QApplication6notifyEP7QObjectP6QEvent+0xbe) [0xb687eaee]                                     
12: /home/kde-devel/kde/lib/libkdeui.so.5(_ZN12KApplication6notifyEP7QObjectP6QEvent+0x3d) [0xb78e14fd]                      
13: /usr/lib/libQtCore.so.4(_ZN16QCoreApplication14notifyInternalEP7QObjectP6QEvent+0xb1) [0xb722eb81]                       
14: /usr/lib/libQtCore.so.4 [0xb725c881]                                                                                     
15: /usr/lib/libQtCore.so.4 [0xb7258f10]                                                                                     
16: /usr/lib/libglib-2.0.so.0(g_main_context_dispatch+0x1e8) [0xb635bf88]                                                    
17: /usr/lib/libglib-2.0.so.0 [0xb635f4eb]
18: /usr/lib/libglib-2.0.so.0(g_main_context_iteration+0x68) [0xb635f668]
19: /usr/lib/libQtCore.so.4(_ZN20QEventDispatcherGlib13processEventsE6QFlagsIN10QEventLoop17ProcessEventsFlagEE+0x58) [0xb7258e68]
20: /usr/lib/libQtGui.so.4 [0xb690d975]
21: /usr/lib/libQtCore.so.4(_ZN10QEventLoop13processEventsE6QFlagsINS_17ProcessEventsFlagEE+0x4a) [0xb722d26a]
22: /usr/lib/libQtCore.so.4(_ZN10QEventLoop4execE6QFlagsINS_17ProcessEventsFlagEE+0xea) [0xb722d42a]
23: /usr/lib/libQtCore.so.4(_ZN16QCoreApplication4execEv+0xb5) [0xb722fab5]
24: /usr/lib/libQtGui.so.4(_ZN12QApplication4execEv+0x27) [0xb6876bf7]
25: /home/kde-devel/kde/lib/libkdeinit4_kded4.so(kdemain+0xc32) [0xb7efe1a2]
26: kded4 [0x8048792]
27: /lib/libc.so.6(__libc_start_main+0xe6) [0xb64d5396]
28: kded4 [0x80486d1]
]
"
kded(10647)/kio (Scheduler) KIO::SchedulerPrivate::cancelJob: Scheduler: killing slave  10875
kded(10647)/kio (Slave) KIO::Slave::kill: killing slave pid= 10875  ( "http" :// "planet-soc.com" )
KDE Daemon (kded) already running.
kded(10879): Communication problem with  "kded" , it probably crashed.
Error message was:  "org.freedesktop.DBus.Error.NoReply" : " "Message did not receive a reply (timeout by message bus)" "
Comment 1 Francesco Cecconi 2008-05-17 14:57:56 UTC
Version:           (using Devel)
Installed from:    Compiled sources
Compiler:          gcc 4.2.3
OS:                Linux 

Same problem.

kded(11547)/kded4 Kded::loadModule: Successfully loaded module "networkstatus"
kded(11547)/kded4 Kded::loadModule: Successfully loaded module "kcookiejar"
kded(11547)/kded4 Kded::loadModule: Successfully loaded module "kpasswdserver"
kded(11547)/kio (KPasswdServer) KPasswdServer::checkAuthInfo: KPasswdServer::checkAuthInfo: User=  "" , WindowId =  33554433
kded(11547)/kio (KDirWatch) KDirWatchPrivate::addEntry: Added Dir "/home/brand/.kde4/share/apps/kwallet" for "" ["KWallet Directory Watcher"]
kded(11547)/kio (KDirWatch) KDirWatchPrivate::useINotify: trying to use inotify for monitoring
kded(11547)/kio (KDirWatch) KDirWatchPrivate::useINotify: inotify successfully used for monitoring
kded(11547)/kded4 Kded::loadModule: Successfully loaded module "kwalletd"
kded(11547)/kio (KPasswdServer) KPasswdServer::checkAuthInfo: KPasswdServer::checkAuthInfo: User=  "" , WindowId =  33554433
kded(11547)/kdeui (KIconLoader) KIconLoader::loadIcon: No such icon "kded"
KDE Daemon (kded) already running.
kded(11572): Communication problem with  "kded" , it probably crashed.
Error message was:  "org.freedesktop.DBus.Error.NoReply" : " "Message did not receive a reply (timeout by message bus)" "
Comment 2 Francesco Cecconi 2008-05-18 11:17:13 UTC
problem fixed, kdelibs trunk r808978. :)
Comment 3 Daniel Winter 2008-05-18 17:35:22 UTC
Francesco:

It is NOT fixed here on r809145
Comment 4 David Faure 2008-06-26 18:52:29 UTC
Can you attach gdb to kded in order to provide a backtrace?
Either 
gdb kded `pidof kded`
or
gdb --args kded --nofork

Alternatively, 
valgrind kded --nofork 2>&1 | tee vg.log
Comment 5 David Faure 2008-06-26 21:39:54 UTC
Note that the stuff in the initial bug report that looks like a backtrace, isn't a backtrace of the crash, but just a kBacktrace() output from the SimpleJob destructor, a harmless warning.
Comment 6 Daniel Winter 2008-06-26 22:47:44 UTC
David Faure:

OK, I tried to make a backtrace from it. But first it seems as I have some debuging symbols missing and the bt doesn't look that usefull anyway. Mybe i am doing something wrong?

Here it is:

kded(13421)/kio (Scheduler) KIO::SchedulerPrivate::cancelJob: Scheduler: killing slave  13367                                         
kded(13421)/kio (Slave) KIO::Slave::kill: killing slave pid= 13367  ( "http" :// "planet-soc.com" )                                   

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xb64936d0 (LWP 13421)]        
0x0929db62 in ?? ()
(gdb) bt
#0  0x0929db62 in ?? ()
#1  0xb495f2b6 in FavIconsModule::slotKill (this=0x91ed5a0) at /usr/include/QtCore/qalgorithms.h:352
#2  0xb49621ab in FavIconsModule::qt_metacall (this=0x91ed5a0, _c=QMetaObject::InvokeMetaMethod, _id=8, _a=0xbfd19738)
    at /home/kde-devel/kdesvn/build/kdebase/apps/lib/konq/favicons/favicons.moc:92
#3  0xb738f79b in QMetaObject::activate () from /usr/lib/libQtCore.so.4
#4  0xb738fcf2 in QMetaObject::activate () from /usr/lib/libQtCore.so.4
#5  0xb7396817 in ?? () from /usr/lib/libQtCore.so.4
#6  0x092a6580 in ?? ()
#7  0xb7419b44 in ?? () from /usr/lib/libQtCore.so.4
#8  0x00000000 in ?? ()
(gdb) quit
The program is running.  Exit anyway? (y or n) n
Not confirmed.
(gdb) continue
Continuing.
KDE Daemon (kded) already running.

Program terminated with signal SIGALRM, Alarm clock.
The program no longer exists.
(gdb) kded(13477): Communication problem with  "kded" , it probably crashed.
Error message was:  "org.freedesktop.DBus.Error.NoReply" : " "Message did not receive a reply (timeout by message bus)" "

BUT:  

It is quite easy ro reproduce:

Just add that feed to akregator and set it to auto update it every minute. Then wait a few minutes (10 should be enough)  and kded4 should be crashed.

http://planet-soc.com/rss.xml

It is only that feed what is causing it. Doesn't happen with a lot of other feeds I have in akregator.
Comment 7 David Faure 2008-06-27 10:26:47 UTC
OK so that crash is Bug 161734. Please test the patch that I added there?
I'll test the steps you suggest, too.
Comment 8 David Faure 2008-06-27 12:05:33 UTC
OK, the ~SimpleJob warning in the initial report shows that this crash is indeed the same as the one in bug 161734, which I just fixed (the warning is fixed too). Fix will be in kde-4.1-whatever-comes-after-beta2.

*** This bug has been marked as a duplicate of 161734 ***