From time to time KMail2 freezes when a conflict dialog is shown. After attaching gdb it looks like there is a deadlock when at the same time a mail check is going on: #0 0x00007fdc3e0ba503 in poll () from /lib64/libc.so.6 #1 0x00007fdc3816a114 in ?? () from /lib64/libglib-2.0.so.0 #2 0x00007fdc3816a650 in g_main_context_iteration () from /lib64/libglib-2.0.so.0 #3 0x00007fdc406ededb in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /opt/qt4/lib/libQtCore.so.4 #4 0x00007fdc3f38b52e in QGuiEventDispatcherGlib::processEvents (this=0x6124d0, flags=...) at kernel/qguieventdispatcher_glib.cpp:204 #5 0x00007fdc406b271e in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /opt/qt4/lib/libQtCore.so.4 #6 0x00007fdc406b2872 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /opt/qt4/lib/libQtCore.so.4 #7 0x00007fdc40baaa24 in KJob::exec (this=0x915d010) at /home/andris/development/sources/kde-trunk/kdelibs/kdecore/jobs/kjob.cpp:204 #8 0x00007fdc2b12a34d in KMMainWidget::slotEndCheckMail (this=0x1515640) at /home/andris/development/sources/kde-trunk/kdepim/kmail/kmmainwidget.cpp:390 #9 0x00007fdc2b12bb5d in KMMainWidget::qt_metacall (this=0x1515640, _c=QMetaObject::InvokeMetaMethod, _id=27, _a=0x7fff8d0b0380) at /home/andris/development/build/kde-trunk/kdepim/kmail/kmmainwidget.moc:369 #10 0x00007fdc406bcd2f in QMetaObject::metacall(QObject*, QMetaObject::Call, int, void**) () from /opt/qt4/lib/libQtCore.so.4 #11 0x00007fdc406d1e0b in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /opt/qt4/lib/libQtCore.so.4 #12 0x00007fdc2b0da7ec in KMKernel::slotProgressItemCompletedOrCanceled (this=0x1005470, item=<value optimized out>) at /home/andris/development/sources/kde-trunk/kdepim/kmail/kmkernel.cpp:1660 #13 0x00007fdc2b0e64bc in KMKernel::qt_metacall (this=0x1005470, _c=QMetaObject::InvokeMetaMethod, _id=36, _a=0x7fff8d0b0670) at /home/andris/development/build/kde-trunk/kdepim/kmail/kmkernel.moc:205 #14 0x00007fdc406bcd2f in QMetaObject::metacall(QObject*, QMetaObject::Call, int, void**) () from /opt/qt4/lib/libQtCore.so.4 #15 0x00007fdc406d1e0b in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /opt/qt4/lib/libQtCore.so.4 #16 0x00007fdc44bf80b2 in KPIM::ProgressManager::progressItemCompleted (this=<value optimized out>, _t1=0x1596af0) at /home/andris/development/build/kde-trunk/kdepim/libkdepim/progressmanager.moc:272 #17 0x00007fdc44bf8b23 in KPIM::ProgressManager::qt_metacall (this=0x98a050, _c=QMetaObject::InvokeMetaMethod, _id=<value optimized out>, _a=0x7fff8d0b07e0) at /home/andris/development/build/kde-trunk/kdepim/libkdepim/progressmanager.moc:246 #18 0x00007fdc406bcd2f in QMetaObject::metacall(QObject*, QMetaObject::Call, int, void**) () from /opt/qt4/lib/libQtCore.so.4 #19 0x00007fdc406d1e0b in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /opt/qt4/lib/libQtCore.so.4 #20 0x00007fdc44bf7c82 in KPIM::ProgressItem::progressItemCompleted (this=<value optimized out>, _t1=0x1596af0) at /home/andris/development/build/kde-trunk/kdepim/libkdepim/progressmanager.moc:121 #21 0x00007fdc44bf8360 in KPIM::ProgressItem::setComplete (this=0x1596af0) at /home/andris/development/sources/kde-trunk/kdepim/libkdepim/progressmanager.cpp:56 #22 0x00007fdc44bf989d in KPIM::AgentProgressMonitor::Private::instanceStatusChanged (this=0xbf724b0, instance=...) at /home/andris/development/sources/kde-trunk/kdepim/libkdepim/agentprogressmonitor.cpp:86 #23 0x00007fdc44bf997a in KPIM::AgentProgressMonitor::qt_metacall (this=0x23f8e00, _c=QMetaObject::InvokeMetaMethod, _id=<value optimized out>, _a=0x7fff8d0b0990) at /home/andris/development/build/kde-trunk/kdepim/libkdepim/agentprogressmonitor.moc:78 #24 0x00007fdc406bcd2f in QMetaObject::metacall(QObject*, QMetaObject::Call, int, void**) () from /opt/qt4/lib/libQtCore.so.4 #25 0x00007fdc406d1e0b in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /opt/qt4/lib/libQtCore.so.4 #26 0x00007fdc4326bea3 in Akonadi::AgentManager::instanceStatusChanged (this=0x136e360, _t1=...) ---Type <return> to continue, or q <return> to quit--- at /home/andris/development/build/kde-trunk/kdepimlibs/akonadi/agentmanager.moc:177 #27 0x00007fdc43269629 in Akonadi::AgentManagerPrivate::agentInstanceStatusChanged (this=0x136e990, identifier="akonadi_imap_resource_6", status=0, msg="Ready") at /home/andris/development/sources/kde-trunk/kdepimlibs/akonadi/agentmanager.cpp:129 #28 0x00007fdc4326bbb0 in Akonadi::AgentManager::qt_metacall (this=0x136e360, _c=QMetaObject::InvokeMetaMethod, _id=14, _a=0x7fff8d0b0b70) at /home/andris/development/build/kde-trunk/kdepimlibs/akonadi/agentmanager.moc:131 #29 0x00007fdc406bcd2f in QMetaObject::metacall(QObject*, QMetaObject::Call, int, void**) () from /opt/qt4/lib/libQtCore.so.4 #30 0x00007fdc406d1e0b in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /opt/qt4/lib/libQtCore.so.4 #31 0x00007fdc43386306 in OrgFreedesktopAkonadiAgentManagerInterface::agentInstanceStatusChanged (this=0xdc20e0, _t1="akonadi_imap_resource_6", _t2=0, _t3="Ready") at /home/andris/development/build/kde-trunk/kdepimlibs/akonadi/agentmanagerinterface.moc:285 #32 0x00007fdc43385130 in OrgFreedesktopAkonadiAgentManagerInterface::qt_metacall (this=0xdc20e0, _c=QMetaObject::InvokeMetaMethod, _id=7, _a=0x7fff8d0b0dd0) at /home/andris/development/build/kde-trunk/kdepimlibs/akonadi/agentmanagerinterface.moc:167 #33 0x00007fdc40061749 in QDBusConnectionPrivate::deliverCall(QObject*, int, QDBusMessage const&, QList<int> const&, int) () from /opt/qt4/lib/libQtDBus.so.4 #34 0x00007fdc4006d4bf in QDBusCallDeliveryEvent::placeMetaCall(QObject*) () from /opt/qt4/lib/libQtDBus.so.4 #35 0x00007fdc406cd729 in QObject::event(QEvent*) () from /opt/qt4/lib/libQtCore.so.4 #36 0x00007fdc3f2b269a in QApplicationPrivate::notify_helper (this=0x646170, receiver=0xdc20e0, e=0x8ce9a30) at kernel/qapplication.cpp:4462 #37 0x00007fdc3f2afcbe in QApplication::notify (this=0x7fff8d0b2c80, receiver=0xdc20e0, e=0x8ce9a30) at kernel/qapplication.cpp:3862 #38 0x00007fdc412387d1 in KApplication::notify (this=0x7fff8d0b2c80, receiver=0xdc20e0, event=0x8ce9a30) at /home/andris/development/sources/kde-trunk/kdelibs/kdeui/kernel/kapplication.cpp:311 #39 0x00007fdc406b4bbb in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /opt/qt4/lib/libQtCore.so.4 #40 0x00007fdc46030ad7 in QCoreApplication::sendEvent(QObject*, QEvent*) () from /opt/qt4/lib/libQtWebKit.so.4 #41 0x00007fdc406b5df4 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () from /opt/qt4/lib/libQtCore.so.4 #42 0x00007fdc406b5a15 in QCoreApplication::sendPostedEvents(QObject*, int) () from /opt/qt4/lib/libQtCore.so.4 #43 0x00007fdc406ee633 in QCoreApplication::sendPostedEvents() () from /opt/qt4/lib/libQtCore.so.4 #44 0x00007fdc406ed5ec in postEventSourceDispatch(_GSource*, int (*)(void*), void*) () from /opt/qt4/lib/libQtCore.so.4 #45 0x00007fdc38169bd3 in g_main_context_dispatch () from /lib64/libglib-2.0.so.0 #46 0x00007fdc3816a3b0 in ?? () from /lib64/libglib-2.0.so.0 #47 0x00007fdc3816a650 in g_main_context_iteration () from /lib64/libglib-2.0.so.0 #48 0x00007fdc406ededb in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /opt/qt4/lib/libQtCore.so.4 #49 0x00007fdc3f38b52e in QGuiEventDispatcherGlib::processEvents (this=0x6124d0, flags=...) at kernel/qguieventdispatcher_glib.cpp:204 #50 0x00007fdc406b271e in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /opt/qt4/lib/libQtCore.so.4 #51 0x00007fdc406b2872 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /opt/qt4/lib/libQtCore.so.4 #52 0x00007fdc3f8ce38c in QDialog::exec (this=0x7fff8d0b1dc0) at dialogs/qdialog.cpp:552 #53 0x00007fdc432afdf9 in Akonadi::ConflictHandler::resolve (this=0xb8a7ac0) at /home/andris/development/sources/kde-trunk/kdepimlibs/akonadi/conflicthandling/conflicthandler.cpp:80 #54 0x00007fdc432b02f0 in Akonadi::ConflictHandler::qt_metacall (this=0xb8a7ac0, _c=QMetaObject::InvokeMetaMethod, _id=6, _a=0x956f1a0) ---Type <return> to continue, or q <return> to quit--- at /home/andris/development/build/kde-trunk/kdepimlibs/akonadi/conflicthandler_p.moc:91 #55 0x00007fdc406bcd2f in QMetaObject::metacall(QObject*, QMetaObject::Call, int, void**) () from /opt/qt4/lib/libQtCore.so.4 #56 0x00007fdc406cc44e in QMetaCallEvent::placeMetaCall(QObject*) () from /opt/qt4/lib/libQtCore.so.4 #57 0x00007fdc406cd729 in QObject::event(QEvent*) () from /opt/qt4/lib/libQtCore.so.4 #58 0x00007fdc3f2b269a in QApplicationPrivate::notify_helper (this=0x646170, receiver=0xb8a7ac0, e=0xbf286b0) at kernel/qapplication.cpp:4462 #59 0x00007fdc3f2afcbe in QApplication::notify (this=0x7fff8d0b2c80, receiver=0xb8a7ac0, e=0xbf286b0) at kernel/qapplication.cpp:3862 #60 0x00007fdc412387d1 in KApplication::notify (this=0x7fff8d0b2c80, receiver=0xb8a7ac0, event=0xbf286b0) at /home/andris/development/sources/kde-trunk/kdelibs/kdeui/kernel/kapplication.cpp:311 #61 0x00007fdc406b4bbb in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /opt/qt4/lib/libQtCore.so.4 #62 0x00007fdc46030ad7 in QCoreApplication::sendEvent(QObject*, QEvent*) () from /opt/qt4/lib/libQtWebKit.so.4 #63 0x00007fdc406b5df4 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () from /opt/qt4/lib/libQtCore.so.4 #64 0x00007fdc406b5a15 in QCoreApplication::sendPostedEvents(QObject*, int) () from /opt/qt4/lib/libQtCore.so.4 #65 0x00007fdc406ee633 in QCoreApplication::sendPostedEvents() () from /opt/qt4/lib/libQtCore.so.4 #66 0x00007fdc406ed5ec in postEventSourceDispatch(_GSource*, int (*)(void*), void*) () from /opt/qt4/lib/libQtCore.so.4 #67 0x00007fdc38169bd3 in g_main_context_dispatch () from /lib64/libglib-2.0.so.0 #68 0x00007fdc3816a3b0 in ?? () from /lib64/libglib-2.0.so.0 #69 0x00007fdc3816a650 in g_main_context_iteration () from /lib64/libglib-2.0.so.0 #70 0x00007fdc406ededb in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /opt/qt4/lib/libQtCore.so.4 #71 0x00007fdc3f38b52e in QGuiEventDispatcherGlib::processEvents (this=0x6124d0, flags=...) at kernel/qguieventdispatcher_glib.cpp:204 #72 0x00007fdc406b271e in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /opt/qt4/lib/libQtCore.so.4 #73 0x00007fdc406b2872 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /opt/qt4/lib/libQtCore.so.4 #74 0x00007fdc406b52ae in QCoreApplication::exec() () from /opt/qt4/lib/libQtCore.so.4 #75 0x00007fdc3f2af836 in QApplication::exec () at kernel/qapplication.cpp:3736 #76 0x000000000040436f in main (argc=1, argv=0x7fff8d0b32a8) at /home/andris/development/sources/kde-trunk/kdepim/kontact/src/main.cpp:218
I have the same behaviour very often (with KDE 4.7rc1/KMail 2.0.95) : the conflict resolution box appears but I can't click on a button. Gdb gives exactly the same backtrace : #0 0x00007f3529991f33 in poll () from /lib64/libc.so.6 #1 0x00007f3522133f89 in g_main_context_poll (context=0x7f74e0, block=<value optimized out>, dispatch=<value optimized out>, self=<value optimized out>) at gmain.c:3405 #2 g_main_context_iterate (context=0x7f74e0, block=<value optimized out>, dispatch=<value optimized out>, self=<value optimized out>) at gmain.c:3087 #3 0x00007f35221343dc in g_main_context_iteration (context=0x7f74e0, may_block=1) at gmain.c:3155 #4 0x00007f352a30dd73 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/qt4/libQtCore.so.4 #5 0x00007f352a88dcbe in ?? () from /usr/lib64/qt4/libQtGui.so.4 #6 0x00007f352a2e09e2 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/qt4/libQtCore.so.4 #7 0x00007f352a2e0dc4 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/qt4/libQtCore.so.4 #8 0x00007f352bab53f6 in KJob::exec (this=0x2103210) at /var/tmp/portage/kde-base/kdelibs-4.6.90/work/kdelibs-4.6.90/kdecore/jobs/kjob.cpp:204 #9 0x00007f352b418553 in KMMainWidget::slotEndCheckMail (this=<value optimized out>) at /var/tmp/portage/kde-base/kmail-4.6.90-r1/work/kmail-4.6.90/kmail/kmmainwidget.cpp:390 #10 0x00007f352b41b62d in KMMainWidget::qt_metacall (this=0xc2c7b0, _c=QMetaObject::InvokeMetaMethod, _id=<value optimized out>, _a=0x7fffc8d9a1a0) at /var/tmp/portage/kde-base/kmail-4.6.90-r1/work/kmail-4.6.90_build/kmail/kmmainwidget.moc:369 #11 0x00007f352a2f996f in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /usr/lib64/qt4/libQtCore.so.4 #12 0x00007f352b3c4a3c in KMKernel::slotProgressItemCompletedOrCanceled (this=0x7fffc8d9c6c0, item=<value optimized out>) at /var/tmp/portage/kde-base/kmail-4.6.90-r1/work/kmail-4.6.90/kmail/kmkernel.cpp:1660 #13 0x00007f352b3d356c in KMKernel::qt_metacall (this=0x7fffc8d9c6c0, _c=QMetaObject::InvokeMetaMethod, _id=<value optimized out>, _a=0x7fffc8d9a430) at /var/tmp/portage/kde-base/kmail-4.6.90-r1/work/kmail-4.6.90_build/kmail/kmkernel.moc:205 #14 0x00007f352a2f996f in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /usr/lib64/qt4/libQtCore.so.4 #15 0x00007f3523a33232 in KPIM::ProgressManager::progressItemCompleted (this=0x34a5860, _t1=0x10f9bf0) at /var/tmp/portage/kde-base/kdepim-common-libs-4.6.90/work/kdepim-common-libs-4.6.90_build/libkdepim/progressmanager.moc:272 #16 0x00007f3523a34aab in KPIM::ProgressManager::qt_metacall (this=0xadb6b0, _c=QMetaObject::InvokeMetaMethod, _id=<value optimized out>, _a=0x7fffc8d9a570) at /var/tmp/portage/kde-base/kdepim-common-libs-4.6.90/work/kdepim-common-libs-4.6.90_build/libkdepim/progressmanager.moc:246 #17 0x00007f352a2f996f in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /usr/lib64/qt4/libQtCore.so.4 #18 0x00007f3523a33482 in KPIM::ProgressItem::progressItemCompleted (this=0x34a5860, _t1=0x10f9bf0) at /var/tmp/portage/kde-base/kdepim-common-libs-4.6.90/work/kdepim-common-libs-4.6.90_build/libkdepim/progressmanager.moc:121 #19 0x00007f3523a33bb0 in KPIM::ProgressItem::setComplete (this=0x10f9bf0) at /var/tmp/portage/kde-base/kdepim-common-libs-4.6.90/work/kdepim-common-libs-4.6.90/libkdepim/progressmanager.cpp:56 #20 0x00007f3523a3564d in KPIM::AgentProgressMonitor::Private::instanceStatusChanged (this=0x3143ed0, instance=...) at /var/tmp/portage/kde-base/kdepim-common-libs-4.6.90/work/kdepim-common-libs-4.6.90/libkdepim/agentprogressmonitor.cpp:86 #21 0x00007f3523a357e2 in KPIM::AgentProgressMonitor::qt_metacall (this=0x31c5c10, _c=QMetaObject::InvokeMetaMethod, _id=<value optimized out>, _a=0x7fffc8d9a6e0) at /var/tmp/portage/kde-base/kdepim-common-libs-4.6.90/work/kdepim-common-libs-4.6.90_build/libkdepim/agentprogressmonitor.moc:78 #22 0x00007f352a2f996f in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /usr/lib64/qt4/libQtCore.so.4 #23 0x00007f3525fecb65 in Akonadi::AgentManager::instanceStatusChanged (this=0x34a5860, _t1=<value optimized out>) at /var/tmp/portage/kde-base/kdepimlibs-4.6.90/work/kdepimlibs-4.6.90_build/akonadi/agentmanager.moc:177 #24 0x00007f3525ff279b in Akonadi::AgentManagerPrivate::agentInstanceStatusChanged (this=0x6bded0, identifier=<value optimized out>, status=0, msg=...) at /var/tmp/portage/kde-base/kdepimlibs-4.6.90/work/kdepimlibs-4.6.90/akonadi/agentmanager.cpp:129 #25 0x00007f3525ff2fa6 in Akonadi::AgentManager::qt_metacall (this=0x6bdea0, _c=QMetaObject::InvokeMetaMethod, _id=<value optimized out>, _a=0x7fffc8d9a890) at /var/tmp/portage/kde-base/kdepimlibs-4.6.90/work/kdepimlibs-4.6.90_build/akonadi/agentmanager.moc:131 #26 0x00007f352a2f996f in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /usr/lib64/qt4/libQtCore.so.4 #27 0x00007f35261022ab in OrgFreedesktopAkonadiAgentManagerInterface::agentInstanceStatusChanged (this=0x34a5860, _t1=<value optimized out>, _t2=0, _t3=<value optimized out>)
In fact, with 4.7rc1, the problem occurs each time the conflict box appears.
Git commit e3e527084fc730829919c7a827dfe144029c89b9 by Andras Mantia. Committed on 17/09/2011 at 23:30. Pushed by amantia into branch 'master'. Change synchornous akonadi job execution to async to prevent strange deadlocks. Remove code that doesn't make sense anymore, and try to actually make it work (fails though, too tired to debug it, but see the existing FIXME). BUG: 275789 M +35 -31 kmail/kmmainwidget.cpp M +1 -2 kmail/kmmainwidget.h http://commits.kde.org/kdepim/e3e527084fc730829919c7a827dfe144029c89b9
Will this fix make 4.7 branch as well?
*** Bug 281085 has been marked as a duplicate of this bug. ***
(In reply to comment #4) > Will this fix make 4.7 branch as well? Unfortunately, it still doesn't present in 4.7 branch. I have tried to compare the patch https://projects.kde.org/projects/kde/kdepim/repository/revisions/e3e527084fc730829919c7a827dfe144029c89b9/diff with C header (kmmainwidget.h) code: https://projects.kde.org/projects/kde/kdepim/repository/entry/kmail/kmmainwidget.h?rev=KDE%2F4.7 @kde-pim team Please, please, include the fix into 4.7.2! KDE's bugzilla doesn't transmit votes from duplicates (I mean Bug 281085) and breaks reality this way :)
To my knowledge the fix has not been backported yet to 4.7 branch, but I'll try to do it asap.
Git commit 7585e58daed226455d235d2a0a2e61de0a805d4d by Andras Mantia. Committed on 17/09/2011 at 23:30. Pushed by amantia into branch 'KDE/4.7'. Change synchornous akonadi job execution to async to prevent strange deadlocks. Remove code that doesn't make sense anymore, and try to actually make it work (fails though, too tired to debug it, but see the existing FIXME). BUG: 275789 M +35 -26 kmail/kmmainwidget.cpp M +1 -2 kmail/kmmainwidget.h http://commits.kde.org/kdepim/7585e58daed226455d235d2a0a2e61de0a805d4d
Andras, really hearty thanks!
Have not observed a lockup with the CR dialogue since the commit in comment #3 and the implementation of the separate Email Filter Agent in Akonadi. Still getting the CR occasionally, but I can live with that. Many thanks for the fix!