Bug 180384

Summary: Kontact crash with kontact_specialdatespluginEnabled=false
Product: [Frameworks and Libraries] Akonadi Reporter: Damien Raude-Morvan <drazzib-web>
Component: KResource compat bridgesAssignee: Kevin Krammer <krammer>
Status: RESOLVED FIXED    
Severity: crash CC: andresbajotierra, vkrause
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: full BT
config to make Kontact crash
config to make Kontact startup successfuly

Description Damien Raude-Morvan 2009-01-11 22:27:28 UTC
Version:           1.3 (using Devel)
OS:                Linux
Installed from:    Compiled sources

My Kontact is crashing everytime with the following BT (see attachements).

I've found that removing "kontact_specialdatespluginEnabled=false" from the plugins section of kontactrc remove that crash.

I'm using KDE 4.2 packages from http://kde42.debian.net :

kmail                                   4:4.1.96+svn907519-0r1
korganizer                              4:4.1.96+svn907519-0r1
kontact                                 4:4.1.96+svn907519-0r1
libkontactinterfaces4                   4:4.1.96+svn907519-0r1
kdepim-dbg                              4:4.1.96+svn907519-0r1                
kdepim-groupware                        4:4.1.96+svn907519-0r1                
kdepim-kresources                       4:4.1.96+svn907519-0r1                
kdepim-strigi-plugins                   4:4.1.96+svn907519-0r1                
kdepim-wizards                          4:4.1.96+svn907519-0r1                
kdepimlibs-data                         4:4.1.96+svn906945-0r1                
kdepimlibs-dbg                          4:4.1.96+svn906945-0r1                
kdepimlibs5                             4:4.1.96+svn906945-0r1                
libkdepim4                              4:4.1.96+svn907519-0r1                
libmaildir4                             4:4.1.96+svn907519-0r1
Comment 1 Damien Raude-Morvan 2009-01-11 22:27:45 UTC
Created attachment 30144 [details]
full BT
Comment 2 Damien Raude-Morvan 2009-01-11 22:28:16 UTC
Created attachment 30145 [details]
config to make Kontact crash
Comment 3 Damien Raude-Morvan 2009-01-11 22:28:44 UTC
Created attachment 30146 [details]
config to make Kontact startup successfuly
Comment 4 Dario Andres 2009-01-11 22:30:09 UTC
Pasted backtrace from comment 1: (please paste the backtraces inline as it makes easier to find for duplicates)

Application : Kontact (kontact), signal SIGABRT
0x00007faa92632ff1 in nanosleep () from /lib/libc.so.6
[Current thread is 0 (LWP 6038)]

Thread 3 (Thread 0x40e27950 (LWP 6044)):
#0  0x00007faa9265bb66 in poll () from /lib/libc.so.6
#1  0x00007faa87938a0f in __libc_res_nsend () from /lib/libresolv.so.2
#2  0x00007faa87937524 in __libc_res_nquery () from /lib/libresolv.so.2
#3  0x00007faa87937816 in __libc_res_nquerydomain () from /lib/libresolv.so.2
#4  0x00007faa879379cf in __libc_res_nsearch () from /lib/libresolv.so.2
#5  0x00007faa781c0549 in _nss_dns_gethostbyname3_r () from /lib/libnss_dns.so.2
#6  0x00007faa781c07c4 in _nss_dns_gethostbyname2_r () from /lib/libnss_dns.so.2
#7  0x00007faa9264e65b in gaih_inet () from /lib/libc.so.6
#8  0x00007faa9264ff89 in getaddrinfo () from /lib/libc.so.6
#9  0x00007faa8dbad630 in QHostInfoAgent::fromName (hostName=@0x40e26fd0) at kernel/qhostinfo_unix.cpp:174
#10 0x00007faa8dba5472 in QHostInfo::fromName (name=<value optimized out>) at kernel/qhostinfo.cpp:216
#11 0x00007faa9128622b in QtConcurrent::StoredFunctorCall1<QHostInfo, QHostInfo (*)(QString const&), QString>::runFunctor (this=0x368bb40)
    at /usr/include/qt4/QtCore/qtconcurrentstoredfunctioncall.h:270
#12 0x00007faa91287203 in QtConcurrent::RunFunctionTask<QHostInfo>::run (this=0x368bb40) at /usr/include/qt4/QtCore/qtconcurrentrunbase.h:102
#13 0x00007faa937a9351 in QThreadPoolThread::run (this=0x368a0f0) at concurrent/qthreadpool.cpp:101
#14 0x00007faa937b2162 in QThreadPrivate::start (arg=0x368a0f0) at thread/qthread_unix.cpp:185
#15 0x00007faa8ce23fc7 in start_thread () from /lib/libpthread.so.0
#16 0x00007faa926645ad in clone () from /lib/libc.so.6
#17 0x0000000000000000 in ?? ()

Thread 2 (Thread 0x41628950 (LWP 6055)):
#0  0x00007faa8ce27fad in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#1  0x00007faa937b3137 in QWaitCondition::wait (this=0x3689f08, mutex=0x3689f00, time=30000) at thread/qwaitcondition_unix.cpp:80
#2  0x00007faa937a93f9 in QThreadPoolThread::run (this=0x218d500) at concurrent/qthreadpool.cpp:135
#3  0x00007faa937b2162 in QThreadPrivate::start (arg=0x218d500) at thread/qthread_unix.cpp:185
#4  0x00007faa8ce23fc7 in start_thread () from /lib/libpthread.so.0
#5  0x00007faa926645ad in clone () from /lib/libc.so.6
#6  0x0000000000000000 in ?? ()

Thread 1 (Thread 0x7faa94e926f0 (LWP 6038)):
[KCrash Handler]
#5  0x00007faa925c6ed5 in raise () from /lib/libc.so.6
#6  0x00007faa925c83f3 in abort () from /lib/libc.so.6
#7  0x00007faa92608970 in malloc_printerr () from /lib/libc.so.6
#8  0x00007faa938a7bb1 in QObjectPrivate::deleteChildren (this=0x3613e60) at kernel/qobject.cpp:1884
#9  0x00007faa938b0977 in ~QObject (this=0x35cc500) at kernel/qobject.cpp:884
#10 0x00007faa7c642dd7 in ~CollectionFetchJob (this=0x1796) at ../../akonadi/collectionfetchjob.cpp:100
#11 0x00007faa938a9375 in QObject::event (this=0x35cc500, e=0x1796) at kernel/qobject.cpp:1139
#12 0x00007faa92dbea5d in QApplicationPrivate::notify_helper (this=0x1b8da30, receiver=0x35cc500, e=0x37454a0) at kernel/qapplication.cpp:3803
#13 0x00007faa92dc67da in QApplication::notify (this=0x7fff9cfd8dc0, receiver=0x35cc500, e=0x37454a0) at kernel/qapplication.cpp:3768
#14 0x00007faa94227deb in KApplication::notify (this=0x7fff9cfd8dc0, receiver=0x35cc500, event=0x37454a0) at ../../kdeui/kernel/kapplication.cpp:307
#15 0x00007faa9389a391 in QCoreApplication::notifyInternal (this=0x7fff9cfd8dc0, receiver=0x35cc500, event=0x37454a0) at kernel/qcoreapplication.cpp:587
#16 0x00007faa9389b02a in QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=0, data=0x1b6c170) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:209
#17 0x00007faa938c2a93 in postEventSourceDispatch (s=<value optimized out>) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:214
#18 0x00007faa8d07278b in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#19 0x00007faa8d075f5d in ?? () from /usr/lib/libglib-2.0.so.0
#20 0x00007faa8d07611b in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#21 0x00007faa938c271f in QEventDispatcherGlib::processEvents (this=0x1b8d820, flags=<value optimized out>) at kernel/qeventdispatcher_glib.cpp:319
#22 0x00007faa92e5047f in QGuiEventDispatcherGlib::processEvents (this=0x1796, flags=<value optimized out>) at kernel/qguieventdispatcher_glib.cpp:198
#23 0x00007faa93898cb2 in QEventLoop::processEvents (this=<value optimized out>, flags={i = -1661163232}) at kernel/qeventloop.cpp:143
#24 0x00007faa93898e3d in QEventLoop::exec (this=0x7fff9cfca960, flags={i = -1661163152}) at kernel/qeventloop.cpp:194
#25 0x00007faa93c7c3f7 in KJob::exec (this=0x37142e0) at ../../kdecore/jobs/kjob.cpp:195
#26 0x00007faa77fa76ff in KABC::ResourceAkonadi::asyncLoad (this=0x36c05f0) at ../../../../kresources/akonadi/kabc/resourceakonadi.cpp:409
#27 0x00007faa9019ab01 in KABC::AddressBook::asyncLoad (this=0x3475520) at ../../kabc/addressbook.cpp:369
#28 0x00007faa901c5db8 in KABC::StdAddressBook::Private::init (this=0x36dc920, asynchronous=true) at ../../kabc/stdaddressbook.cpp:181
#29 0x00007faa901c705b in KABC::StdAddressBook::self (asynchronous=<value optimized out>) at ../../kabc/stdaddressbook.cpp:92
#30 0x00007faa7e2e0163 in KMail::FancyHeaderStyle::format (this=<value optimized out>, message=0x3680f60, strategy=0x2802090, vCardName=@0x7fff9cfd58e0, printing=<value optimized out>, topLevel=true)
    at ../../kmail/headerstyle.cpp:455
#31 0x00007faa7e1730c7 in KMReaderWin::writeMsgHeader (this=0x3003310, aMsg=0x3680f60, hasVCard=false, topLevel=false) at ../../kmail/kmreaderwin.cpp:1733
#32 0x00007faa7e179a88 in KMReaderWin::parseMsg (this=0x3003310, aMsg=0x3680f60) at ../../kmail/kmreaderwin.cpp:1618
#33 0x00007faa7e167a47 in KMReaderWin::displayMessage (this=0x3003310) at ../../kmail/kmreaderwin.cpp:1555
#34 0x00007faa7e167c35 in KMReaderWin::updateReaderWin (this=0x3003310) at ../../kmail/kmreaderwin.cpp:1495
#35 0x00007faa7e175045 in KMReaderWin::qt_metacall (this=0x3003310, _c=QMetaObject::InvokeMetaMethod, _id=<value optimized out>, _a=0x7fff9cfd6150) at ./kmreaderwin.moc:164
#36 0x00007faa938ae6e4 in QMetaObject::activate (sender=0x30033a8, from_signal_index=<value optimized out>, to_signal_index=4, argv=0xffffffffffffffff) at kernel/qobject.cpp:3031
#37 0x00007faa938a8ff3 in QObject::event (this=0x30033a8, e=0x1796) at kernel/qobject.cpp:1120
#38 0x00007faa92dbea5d in QApplicationPrivate::notify_helper (this=0x1b8da30, receiver=0x30033a8, e=0x7fff9cfd6800) at kernel/qapplication.cpp:3803
#39 0x00007faa92dc67da in QApplication::notify (this=0x7fff9cfd8dc0, receiver=0x30033a8, e=0x7fff9cfd6800) at kernel/qapplication.cpp:3768
#40 0x00007faa94227deb in KApplication::notify (this=0x7fff9cfd8dc0, receiver=0x30033a8, event=0x7fff9cfd6800) at ../../kdeui/kernel/kapplication.cpp:307
#41 0x00007faa9389a391 in QCoreApplication::notifyInternal (this=0x7fff9cfd8dc0, receiver=0x30033a8, event=0x7fff9cfd6800) at kernel/qcoreapplication.cpp:587
#42 0x00007faa938c6266 in QTimerInfoList::activateTimers (this=0x1b90640) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:209
#43 0x00007faa938c27bd in timerSourceDispatch (source=<value optimized out>) at kernel/qeventdispatcher_glib.cpp:160
#44 0x00007faa8d07278b in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#45 0x00007faa8d075f5d in ?? () from /usr/lib/libglib-2.0.so.0
#46 0x00007faa8d07611b in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#47 0x00007faa938c271f in QEventDispatcherGlib::processEvents (this=0x1b8d820, flags=<value optimized out>) at kernel/qeventdispatcher_glib.cpp:319
#48 0x00007faa92e5047f in QGuiEventDispatcherGlib::processEvents (this=0x1796, flags=<value optimized out>) at kernel/qguieventdispatcher_glib.cpp:198
#49 0x00007faa93898cb2 in QEventLoop::processEvents (this=<value optimized out>, flags={i = -1661113744}) at kernel/qeventloop.cpp:143
#50 0x00007faa93898e3d in QEventLoop::exec (this=0x7fff9cfd6ab0, flags={i = -1661113664}) at kernel/qeventloop.cpp:194
#51 0x00007faa93c7c3f7 in KJob::exec (this=0x35cc500) at ../../kdecore/jobs/kjob.cpp:195
#52 0x00007faa78bf8fe4 in KCal::ResourceAkonadi::doLoad (this=0x28b04d0, syncCache=<value optimized out>) at ../../../../kresources/akonadi/kcal/resourceakonadi.cpp:674
#53 0x00007faa8ff05ce8 in KCal::ResourceCalendar::load (this=0x28b04d0) at ../../kcal/resourcecalendar.cpp:168
#54 0x00007faa8ff17013 in KCal::CalendarResources::load (this=0x35949f0) at ../../kcal/calendarresources.cpp:272
#55 0x00007faa7f6c9c6e in ApptSummaryWidget (this=0x35956a0, plugin=<value optimized out>, parent=<value optimized out>) at ../../../../kontact/plugins/korganizer/apptsummarywidget.cpp:62
#56 0x00007faa7f6c4e84 in KOrganizerPlugin::createSummaryWidget (this=0x24f7e20, parent=0x358a6a0) at ../../../../kontact/plugins/korganizer/korganizerplugin.cpp:86
#57 0x00007faa7eba2f5c in SummaryViewPart::updateWidgets (this=0x3534d30) at ../../../../kontact/plugins/summary/summaryview_part.cpp:164
#58 0x00007faa7eba3cda in SummaryViewPart::initGUI (this=0x3534d30, core=<value optimized out>) at ../../../../kontact/plugins/summary/summaryview_part.cpp:485
#59 0x00007faa7eba3e51 in SummaryViewPart (this=0x3534d30, core=<value optimized out>, aboutData=0x217ace0, parent=<value optimized out>)
    at ../../../../kontact/plugins/summary/summaryview_part.cpp:74
#60 0x00007faa7eb9ff45 in SummaryView::createPart (this=0x24d1500) at ../../../../kontact/plugins/summary/summaryview_plugin.cpp:114
#61 0x00007faa94985b59 in Kontact::Plugin::part (this=0x1796) at ../../kontactinterfaces/plugin.cpp:187
#62 0x00007faa94baa1fb in Kontact::MainWindow::selectPlugin (this=0x1bab830, plugin=0x24d1500) at ../../../kontact/src/mainwindow.cpp:752
#63 0x00007faa94ba638a in Kontact::MainWindow::activatePluginModule (this=0x1bab830) at ../../../kontact/src/mainwindow.cpp:306
#64 0x0000000000403605 in KontactApp::newInstance (this=0x7fff9cfd8dc0) at ../../../kontact/src/main.cpp:136
#65 0x00007faa94230e76 in KUniqueApplicationAdaptor::newInstance (this=0x1c3cc40, asn_id=<value optimized out>, args=@0x1c7ab80) at ../../kdeui/kernel/kuniqueapplication_p.h:77
#66 0x00007faa9422f202 in KUniqueApplicationAdaptor::qt_metacall (this=0x1c3cc40, _c=QMetaObject::InvokeMetaMethod, _id=0, _a=0x7fff9cfd7d80) at ./kuniqueapplication_p.moc:74
#67 0x00007faa90e7bdb3 in QDBusConnectionPrivate::deliverCall (this=0x1b81de0, object=0x1c3cc40, msg=@0x1ccf5a0, metaTypes=@0x7fff9cfd8068, slotIdx=4) at qdbusintegrator.cpp:849
#68 0x00007faa90e7cfc4 in QDBusConnectionPrivate::activateCall (this=0x1b81de0, object=0x1c3cc40, flags=337, msg=@0x1ccf5a0) at qdbusintegrator.cpp:754
#69 0x00007faa90e7d6a1 in QDBusConnectionPrivate::activateObject (this=0x1b81de0, node=@0x1ccf578, msg=@0x1ccf5a0, pathStartPos=<value optimized out>) at qdbusintegrator.cpp:1283
#70 0x00007faa90e7d9b8 in QDBusActivateObjectEvent::placeMetaCall (this=0x1ccf530) at qdbusintegrator.cpp:1400
#71 0x00007faa938a9355 in QObject::event (this=0x7fff9cfd8dc0, e=0x1ccf530) at kernel/qobject.cpp:1155
#72 0x00007faa92dc416a in QApplication::event (this=0x7fff9cfd8dc0, e=0x1ccf530) at kernel/qapplication.cpp:2187
#73 0x00007faa92dbea5d in QApplicationPrivate::notify_helper (this=0x1b8da30, receiver=0x7fff9cfd8dc0, e=0x1ccf530) at kernel/qapplication.cpp:3803
#74 0x00007faa92dc67da in QApplication::notify (this=0x7fff9cfd8dc0, receiver=0x7fff9cfd8dc0, e=0x1ccf530) at kernel/qapplication.cpp:3768
#75 0x00007faa94227deb in KApplication::notify (this=0x7fff9cfd8dc0, receiver=0x7fff9cfd8dc0, event=0x1ccf530) at ../../kdeui/kernel/kapplication.cpp:307
#76 0x00007faa9389a391 in QCoreApplication::notifyInternal (this=0x7fff9cfd8dc0, receiver=0x7fff9cfd8dc0, event=0x1ccf530) at kernel/qcoreapplication.cpp:587
#77 0x00007faa9389b02a in QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=0, data=0x1b6c170) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:209
#78 0x00007faa938c2a93 in postEventSourceDispatch (s=<value optimized out>) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:214
#79 0x00007faa8d07278b in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#80 0x00007faa8d075f5d in ?? () from /usr/lib/libglib-2.0.so.0
#81 0x00007faa8d07611b in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#82 0x00007faa938c271f in QEventDispatcherGlib::processEvents (this=0x1b8d820, flags=<value optimized out>) at kernel/qeventdispatcher_glib.cpp:319
#83 0x00007faa92e5047f in QGuiEventDispatcherGlib::processEvents (this=0x1796, flags=<value optimized out>) at kernel/qguieventdispatcher_glib.cpp:198
#84 0x00007faa93898cb2 in QEventLoop::processEvents (this=<value optimized out>, flags={i = -1661105184}) at kernel/qeventloop.cpp:143
#85 0x00007faa93898e3d in QEventLoop::exec (this=0x7fff9cfd8c20, flags={i = -1661105104}) at kernel/qeventloop.cpp:194
#86 0x00007faa9389b2ed in QCoreApplication::exec () at kernel/qcoreapplication.cpp:845
#87 0x0000000000404821 in main (argc=1, argv=0x7fff9cfd9398) at ../../../kontact/src/main.cpp:218

Comment 5 Damien Raude-Morvan 2009-01-11 22:31:06 UTC
From .xsession-errors :

QObject: Do not delete object, 'unnamed', during its event handler!
kdeinit4: preparing to launch /usr/lib/kde4/libexec/drkonqi
ASSERT: "d->appConnection.inited()" in file ../../kio/kio/slavebase.cpp, line 265
kioslave: ####### CRASH ###### protocol = imap pid = 8713 signal = 6



From command line :

*** KMail got signal 6 (Crashing)
<unknown program name>(8705)/: Communication problem with  "kontact" , it probably crashed.
Error message was:  "org.freedesktop.DBus.Error.NoReply" : " "Message did not receive a reply (timeout by message bus)" "
KCrash: Application 'kontact' crashing...
sock_file=/home/drazzib/.kde4/socket-gauloise/kdeinit4__0
Comment 6 Dario Andres 2009-01-11 22:32:37 UTC
This is probably related to bug 179838 and bug 177294
Comment 7 Kevin Krammer 2009-02-08 14:40:58 UTC
SVN commit 923208 by krake:

Using nested event loops to achieve synchronous call behavior while doing Akonadi jobs has created way to many issues due to unexpected re-entrancy.

This is basically backport of a series of changes in trunk which replace this form of blocking with real blocking of the caller and delegating the Akonadi job execution to a worker thread.

This should fix all the bugs this is sent to. If they remain with 4.2.1 once it is released, please re-open.

DarĂ­o, in case I missed some of the eventloop related bugs, please feel free to close them as well.

BUG: 177294
BUG: 158129
BUG: 182475
BUG: 178869
BUG: 179577
BUG: 179838
BUG: 180384
BUG: 181153
BUG: 181966
BUG: 182833
BUG: 182956
BUG: 183187


 M  +210 -55   kabc/resourceakonadi.cpp  
 M  +202 -54   kcal/resourceakonadi.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=923208