Bug 161734

Summary: kded / kded4 crashes loading favicons
Product: [Unmaintained] kdelibs Reporter: Manuel Nickschas <sputnick>
Component: kdedAssignee: David Faure <faure>
Status: RESOLVED FIXED    
Severity: crash CC: dw
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: unspecified   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Manuel Nickschas 2008-05-07 11:38:20 UTC
Version:            (using Devel)
Compiler:          gcc-4.2.3 
OS:                Linux

Since quite recently (maybe one or two weeks ago), kded4 dies/terminates quite regularly on all of my KDE4 machines. I usually notice when Alt+F2 does not work anymore, or cookies are ignored. Restarting kded4 makes everything work again. As it stands now, it dies several times a day.

I couldn't figure out yet how to get a backtrace or other useful output from kded4 that might help in finding the issue; if you have hints or need more information, please tell me.
Comment 1 Manuel Nickschas 2008-05-07 11:44:52 UTC
Argh, missed a possible/probable duplicate again. Bug 156087 seems to be the same issue. Sorry for that, we used quite different keywords I guess :)
Comment 2 Manuel Nickschas 2008-05-08 11:06:50 UTC
Lately (i.e. since my last update yesterday, I guess, though I can't pinpoint), the silent termination seems to have been mostly replaced by frequent hanging (see also Bug 161733). Happens every few minutes now. In these cases, I need to kill -9 kded4 to make KDE4 work again. Haven't had kded4 die since, but that might well be because I keep killing it myself...
Comment 3 Manuel Nickschas 2008-05-29 17:30:00 UTC
Terminates again on my laptop all the time. Finally managed to get a backtrace:

(gdb) run --nofork
Starting program: /usr/kde/svn/bin/kded4 --nofork

Program received signal SIGSEGV, Segmentation fault.
0x08176f47 in ?? ()
(gdb) bt
#0  0x08176f47 in ?? ()
#1  0x000812bf in ?? ()
#2  0xb44f1f12 in qDeleteAll<QList<KIO::Job*>::const_iterator> () from /usr/kde/svn/lib/kde4/kded_favicons.so
#3  0xb44ee3e6 in FavIconsModule::slotKill () from /usr/kde/svn/lib/kde4/kded_favicons.so
#4  0xb44f059f in FavIconsModule::qt_metacall () from /usr/kde/svn/lib/kde4/kded_favicons.so
#5  0xb72b472b in QMetaObject::activate () from /usr/lib/qt4/libQtCore.so.4
#6  0xb72b4dc2 in QMetaObject::activate () from /usr/lib/qt4/libQtCore.so.4
#7  0xb72bb237 in QSingleShotTimer::timeout () from /usr/lib/qt4/libQtCore.so.4
#8  0xb72bb35c in QSingleShotTimer::timerEvent () from /usr/lib/qt4/libQtCore.so.4
#9  0xb72afeaa in QObject::event () from /usr/lib/qt4/libQtCore.so.4
#10 0xb6906eac in QApplicationPrivate::notify_helper () from /usr/lib/qt4/libQtGui.so.4
#11 0xb690ba29 in QApplication::notify () from /usr/lib/qt4/libQtGui.so.4
#12 0xb79651bd in KApplication::notify () from /usr/kde/svn/lib/libkdeui.so.5
#13 0xb729fa09 in QCoreApplication::notifyInternal () from /usr/lib/qt4/libQtCore.so.4
#14 0xb72cd1f1 in QTimerInfoList::activateTimers () from /usr/lib/qt4/libQtCore.so.4
#15 0xb72caab0 in timerSourceDispatch () from /usr/lib/qt4/libQtCore.so.4
#16 0xb63ff6e8 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#17 0xb640293e in ?? () from /usr/lib/libglib-2.0.so.0
#18 0x08061358 in ?? ()
#19 0x00000000 in ?? ()

Comment 4 Florian Kriener 2008-06-18 14:25:57 UTC
I have the same problem. It comes with this error message:
                                                     
kded(9000): 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 5 Andrew Belitsky 2008-06-22 12:27:25 UTC
Same problem.
kded(4947): 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 6 David Faure 2008-06-23 10:31:43 UTC
On Sunday 22 June 2008, Andrew Belitsky wrote:
> kded(4947): 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)" "

This gives no information. Backtraces please.
Comment 7 David Faure 2008-06-26 21:49:03 UTC
For the favicon crash, please test http://web.davidfaure.fr/kde/favicons.cpp.diff
( from the code: this can only happen when you go to a site which has a HUGE favicon file....)

For other kded crashes, please see Bug 162140.
Comment 8 David Faure 2008-06-27 11:14:46 UTC
Wow http://planet-soc.com/favicon.ico is big indeed.  133K. file(1) says MPG sequence,
but xli says: favicon.ico is a 576x720 MacPaint image. Not that it can display it though.

OK the crash depends on a race condition between "end of download" and "kill thisdownload", I think,
and my patch addresses that, but I can't trigger the crash here yet; I'll leave it running to see if it happens.
I'll fix the code (also for the warning from ~SimpleJob).
Comment 9 David Faure 2008-06-27 12:03:37 UTC
SVN commit 825063 by dfaure:

Fix crash when aborting download of a too big favicon.
http://planet-soc.com/favicon.ico is a strange file indeed, can't figure out its format :)
BUG: 161734


 M  +10 -4     favicons.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=825063
Comment 10 David Faure 2008-06-27 12:05:34 UTC
*** Bug 162140 has been marked as a duplicate of this bug. ***
Comment 11 Daniel Winter 2008-06-27 17:56:44 UTC
Thanks David:

It's fixed :-)