Bug 214185 - KMail hangs, eating all CPU (seems to hang in KMMsgDict::update)
Summary: KMail hangs, eating all CPU (seems to hang in KMMsgDict::update)
Status: RESOLVED WORKSFORME
Alias: None
Product: kmail
Classification: Applications
Component: general (show other bugs)
Version: 1.12.2
Platform: Ubuntu Unspecified
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-11-11 23:03 UTC by Daniel Hahler
Modified: 2010-03-06 23:53 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Hahler 2009-11-11 23:03:41 UTC
Version:           1.12.2 (using KDE 4.3.2)
Installed from:    Ubuntu Packages

KMail currently hangs here, eating all CPU.

I do not remember exactly what I've done before, but something like:
 - report spam from the GMail account Spam folder
 - moving some messages to the right gmail folder (false positives), wondering why KMail has to download all mails from the folder in the move process (another bug I think)
 - the last action was probably some remove

Here's the first backtrace from gdb, followed by the tips of some continue-and-gdb-again processes:

#0 KMMsgDictREntry::get (this=0x92a3388, msg=0xe17a480, index=252611, newIndex=252610) at ../../kmail/kmmsgdict.cpp:108
#1 KMMsgDict::update (this=0x92a3388, msg=0xe17a480, index=252611, newIndex=252610) at ../../kmail/kmmsgdict.cpp:318
#2 0xb6bf2113 in KMMsgList::remove (this=0x9a39118, idx=162348) at ../../kmail/kmmsglist.cpp:151
#3 0xb6bf21af in KMMsgList::take (this=0x9a39118, idx=162348) at ../../kmail/kmmsglist.cpp:165
#4 0xb6d794e7 in KMFolderIndex::takeIndexEntry (this=0x9a390c8, idx=162348) at ../../kmail/kmfolderindex.cpp:530
#5 0xb6b7d3e6 in FolderStorage::removeMsg (this=0x9a390c8, idx=162348) at ../../kmail/folderstorage.cpp:397
#6 0xb6c2e87a in KMFolderImap::removeMsg (this=0x9a390c8, idx=162348, quiet=true) at ../../kmail/kmfolderimap.cpp:292
#7 0xb6c363fd in KMFolderImap::slotListFolderResult (this=0x9a390c8, job=0xb07a088) at ../../kmail/kmfolderimap.cpp:1368
#8 0xb6c3c290 in KMFolderImap::qt_metacall (this=0x9a390c8, _c=QMetaObject::InvokeMetaMethod, _id=27, _a=0xbfae5dc8) at ./kmfolderimap.moc:182
#9 0xb5d4bc3a in QMetaObject::metacall (object=0x9a390c8, cl=252611, idx=63, argv=0xbfae5dc8) at kernel/qmetaobject.cpp:237
#10 0xb5d5a6fb in QMetaObject::activate (sender=0xb07a088, m=0xb73acd68, local_signal_index=3, argv=0xbfae5dc8) at kernel/qobject.cpp:3398
#11 0xb7246fe3 in KJob::result (this=0xb07a088, _t1=0xb07a088) at ./kjob.moc:188
#12 0xb7247469 in KJob::emitResult (this=0xb07a088) at ../../kdecore/jobs/kjob.cpp:304
#13 0xb48de660 in KIO::SimpleJob::slotFinished (this=0xb07a088) at ../../kio/kio/job.cpp:477
#14 0xb48de7cb in KIO::ListJob::slotFinished (this=0xb07a088) at ../../kio/kio/job.cpp:2408
#15 0xb48e53ee in KIO::ListJob::qt_metacall (this=0xb07a088, _c=QMetaObject::InvokeMetaMethod, _id=43, _a=0xbfae600c) at ./jobclasses.moc:764
#16 0xb5d4bc3a in QMetaObject::metacall (object=0xb07a088, cl=252611, idx=43, argv=0xbfae600c) at kernel/qmetaobject.cpp:237
#17 0xb5d5a6fb in QMetaObject::activate (sender=0xaf82ce8, m=0xb4a90f64, local_signal_index=4, argv=0x0) at kernel/qobject.cpp:3398
#18 0xb49a8557 in KIO::SlaveInterface::finished (this=0xaf82ce8) at ./slaveinterface.moc:165
#19 0xb49ac44d in KIO::SlaveInterface::dispatch (this=0xaf82ce8, _cmd=104, rawdata=...) at ../../kio/kio/slaveinterface.cpp:175
#20 0xb49a8a13 in KIO::SlaveInterface::dispatch (this=0xaf82ce8) at ../../kio/kio/slaveinterface.cpp:91
#21 0xb499aaea in KIO::Slave::gotInput (this=0xaf82ce8) at ../../kio/kio/slave.cpp:322
#22 0xb499cee3 in KIO::Slave::qt_metacall (this=0xaf82ce8, _c=QMetaObject::InvokeMetaMethod, _id=30, _a=0xbfae62ec) at ./slave.moc:76
#23 0xb5d4bc3a in QMetaObject::metacall (object=0xaf82ce8, cl=252611, idx=30, argv=0xbfae62ec) at kernel/qmetaobject.cpp:237
#24 0xb5d5a6fb in QMetaObject::activate (sender=0xafad4e8, m=0xb4a8d8a0, local_signal_index=0, argv=0x0) at kernel/qobject.cpp:3398
#25 0xb48a4f97 in KIO::Connection::readyRead (this=0xafad4e8) at ./connection.moc:86
#26 0xb48a6d5e in KIO::ConnectionPrivate::dequeue (this=0xafad298) at ../../kio/kio/connection.cpp:82
#27 0xb48a6e8e in KIO::Connection::qt_metacall (this=0xafad4e8, _c=QMetaObject::InvokeMetaMethod, _id=5, _a=0x103d8c18) at ./connection.moc:73
#28 0xb5d4bc3a in QMetaObject::metacall (object=0xafad4e8, cl=252611, idx=5, argv=0x103d8c18) at kernel/qmetaobject.cpp:237
#29 0xb5d56306 in QMetaCallEvent::placeMetaCall (this=0x9186d48, object=0xafad4e8) at kernel/qobject.cpp:562
#30 0xb5d5735e in QObject::event (this=0xafad4e8, e=0x9186d48) at kernel/qobject.cpp:1246
#31 0xb5f8ec6c in QApplicationPrivate::notify_helper (this=0x90e24f8, receiver=0xafad4e8, e=0x9186d48) at kernel/qapplication.cpp:4277
#32 0xb5f95a1e in QApplication::notify (this=0xbfae6c50, receiver=0xafad4e8, e=0x9186d48) at kernel/qapplication.cpp:3702
#33 0xb7587bfa in KApplication::notify (this=0xbfae6c50, receiver=0xafad4e8, event=0x9186d48) at ../../kdeui/kernel/kapplication.cpp:302
#34 0xb5d469cb in QCoreApplication::notifyInternal (this=0xbfae6c50, receiver=0xafad4e8, event=0x9186d48) at kernel/qcoreapplication.cpp:704
#35 0xb5d49403 in QCoreApplication::sendEvent (receiver=0x0, event_type=0, data=0x90cdc80)
    at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:215
#36 QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=0, data=0x90cdc80) at kernel/qcoreapplication.cpp:1345
#37 0xb5d4956d in QCoreApplication::sendPostedEvents (receiver=0x0, event_type=0) at kernel/qcoreapplication.cpp:1238
#38 0xb5d729ff in QCoreApplication::sendPostedEvents (s=0x90f3258) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:220
#39 postEventSourceDispatch (s=0x90f3258) at kernel/qeventdispatcher_glib.cpp:276
#40 0xb3a5ee78 in g_main_context_dispatch () from /lib/libglib-2.0.so.0
#41 0xb3a62720 in ?? () from /lib/libglib-2.0.so.0
#42 0xb3a62853 in g_main_context_iteration () from /lib/libglib-2.0.so.0
#43 0xb5d724f5 in QEventDispatcherGlib::processEvents (this=0x90cd880, flags=...) at kernel/qeventdispatcher_glib.cpp:407
#44 0xb6042635 in QGuiEventDispatcherGlib::processEvents (this=0x90cd880, flags=...) at kernel/qguieventdispatcher_glib.cpp:202
#45 0xb5d45019 in QEventLoop::processEvents (this=0xbfae6b14, flags=DWARF-2 expression error: DW_OP_reg operations must be used either alone or in conjuction with DW_OP_piece.
) at kernel/qeventloop.cpp:149
#46 0xb5d4546a in QEventLoop::exec (this=0xbfae6b14, flags=...) at kernel/qeventloop.cpp:201
#47 0xb5d4962f in QCoreApplication::exec () at kernel/qcoreapplication.cpp:981
#48 0xb5f8ed07 in QApplication::exec () at kernel/qapplication.cpp:3616
#49 0x0804a702 in main (argc=3, argv=0xbfae6e04) at ../../kmail/main.cpp:146

#0 0xb6b74534 in FolderStorage::rDict (this=0x92a3388, msg=0xd84f1a8, index=172217, newIndex=172216) at ../../kmail/folderstorage.h:596
#1 KMMsgDict::update (this=0x92a3388, msg=0xd84f1a8, index=172217, newIndex=172216) at ../../kmail/kmmsgdict.cpp:316
#2 0xb6bf2113 in KMMsgList::remove (this=0x9a39118, idx=162348) at ../../kmail/kmmsglist.cpp:151

#0 KMMsgDictREntry::get (this=0x92a3388, msg=0xe330bd0, index=266644, newIndex=266643) at ../../kmail/kmmsgdict.cpp:108
#1 KMMsgDict::update (this=0x92a3388, msg=0xe330bd0, index=266644, newIndex=266643) at ../../kmail/kmmsgdict.cpp:318
#2 0xb6bf2113 in KMMsgList::remove (this=0x9a39118, idx=162348) at ../../kmail/kmmsglist.cpp:151

#0 KMMsgDict::update (this=0x92a3388, msg=0xdf1a848, index=230792, newIndex=230791) at ../../kmail/kmmsgdict.cpp:315
#1 0xb6bf2113 in KMMsgList::remove (this=0x9a39118, idx=162348) at ../../kmail/kmmsglist.cpp:151

ProblemType: Bug
Architecture: i386
Date: Wed Nov 11 22:39:08 2009
DistroRelease: Ubuntu 9.10
NonfreeKernelModules: nvidia
Package: kmail 4:4.3.2-0ubuntu6
ProcEnviron:
 LANGUAGE=
 PATH=(custom, user)
 LANG=de_DE.UTF-8
 SHELL=/bin/bash
ProcVersionSignature: Ubuntu 2.6.31-15.49-generic
SourcePackage: kdepim
Uname: Linux 2.6.31-15-generic i686

(via https://bugs.launchpad.net/ubuntu/+source/kdepim/+bug/480962)
Comment 1 Daniel Hahler 2009-11-11 23:46:21 UTC
It just happened again, still no (remembered) way to reproduce.

These are the related processes running:
$ ps aux|grep kmail
user    6169  0.0  0.1  81984  6184 ?        S    21:36   0:00 kdeinit4: kio_sieve [kdeinit] sieve local:/tmp/ksocket-user/klauncherkn4802.slave-socket local:/tmp/ksocket-user/kmailDK6161.slave-socket
user   22686 39.3 11.8 534668 366236 ?       R    23:01  16:03 /usr/bin/kmail
user   22687  0.4  0.8  99164 24976 ?        S    23:01   0:10 kdeinit4: kio_imap4 [kdeinit] imaps local:/tmp/ksocket-user/klauncherkn4802.slave-socket local:/tmp/ksocket-user/kmailY22686.slave-socket
user   22688  0.0  0.3  84364 10084 ?        S    23:01   0:00 kdeinit4: kio_imap4 [kdeinit] imaps local:/tmp/ksocket-user/klauncherkn4802.slave-socket local:/tmp/ksocket-user/kmailR22686.slave-socket
user   22689  0.0  0.4  88240 14064 ?        S    23:01   0:00 kdeinit4: kio_imap4 [kdeinit] imaps local:/tmp/ksocket-user/klauncherkn4802.slave-socket local:/tmp/ksocket-user/kmailN22686.slave-socket
user   22693  0.0  0.2  81984  7736 ?        S    23:01   0:00 kdeinit4: kio_sieve [kdeinit] sieve local:/tmp/ksocket-user/klauncherkn4802.slave-socket local:/tmp/ksocket-user/kmailt22686.slave-socket
user   22694  0.0  0.2  80768  6368 ?        S    23:01   0:00 kdeinit4: kio_file [kdeinit] file local:/tmp/ksocket-user/klauncherkn4802.slave-socket local:/tmp/ksocket-user/kmailq22686.slave-socket
user   22793  0.0  0.3  84364 10032 ?        S    23:06   0:00 kdeinit4: kio_imap4 [kdeinit] imaps local:/tmp/ksocket-user/klauncherkn4802.slave-socket local:/tmp/ksocket-user/kmailF22686.slave-socket
user   23054  0.0  0.3  83564  9780 ?        S    23:22   0:00 kdeinit4: kio_smtp [kdeinit] smtp local:/tmp/ksocket-user/klauncherkn4802.slave-socket local:/tmp/ksocket-user/kmailY22686.slave-socket


New backtrace:
(gdb) bt
#0  0xb6aff652 in KMMsgDict::update (this=0xa437628, msg=0x27a2c, index=-1074040184, newIndex=-1229964903) at ../../kmail/kmmsgdict.cpp:325
#1  0xb6b7d113 in KMMsgList::remove (this=0xa437628, idx=162348) at ../../kmail/kmmsglist.cpp:151
#2  0xb6b7d1af in KMMsgList::take (this=0xa437628, idx=162348) at ../../kmail/kmmsglist.cpp:165
#3  0xb6d044e7 in KMFolderIndex::takeIndexEntry (this=0xa4375d8, idx=162348) at ../../kmail/kmfolderindex.cpp:530
#4  0xb6b083e6 in FolderStorage::removeMsg (this=0xa4375d8, idx=162348) at ../../kmail/folderstorage.cpp:397
#5  0xb6bb987a in KMFolderImap::removeMsg (this=0xa4375d8, idx=162348, quiet=true) at ../../kmail/kmfolderimap.cpp:292
#6  0xb6bc13fd in KMFolderImap::slotListFolderResult (this=0xa4375d8, job=0xbcdc9a8) at ../../kmail/kmfolderimap.cpp:1368
#7  0xb6bc7290 in KMFolderImap::qt_metacall (this=0xa4375d8, _c=QMetaObject::InvokeMetaMethod, _id=27, _a=0xbffb75b8) at ./kmfolderimap.moc:182
#8  0xb5cd6c3a in QMetaObject::metacall (object=0xa4375d8, cl=177433360, idx=63, argv=0xbffb75b8) at kernel/qmetaobject.cpp:237
#9  0xb5ce56fb in QMetaObject::activate (sender=0xbcdc9a8, m=0xb7337d68, local_signal_index=3, argv=0xbffb75b8) at kernel/qobject.cpp:3398
#10 0xb71d1fe3 in KJob::result (this=0xbcdc9a8, _t1=0xbcdc9a8) at ./kjob.moc:188
#11 0xb71d2469 in KJob::emitResult (this=0xbcdc9a8) at ../../kdecore/jobs/kjob.cpp:304
#12 0xb4869660 in KIO::SimpleJob::slotFinished (this=0xbcdc9a8) at ../../kio/kio/job.cpp:477
#13 0xb48697cb in KIO::ListJob::slotFinished (this=0xbcdc9a8) at ../../kio/kio/job.cpp:2408
#14 0xb48703ee in KIO::ListJob::qt_metacall (this=0xbcdc9a8, _c=QMetaObject::InvokeMetaMethod, _id=43, _a=0xbffb77fc) at ./jobclasses.moc:764
#15 0xb5cd6c3a in QMetaObject::metacall (object=0xbcdc9a8, cl=177433360, idx=43, argv=0xbffb77fc) at kernel/qmetaobject.cpp:237
#16 0xb5ce56fb in QMetaObject::activate (sender=0xb9679b0, m=0xb4a1bf64, local_signal_index=4, argv=0x0) at kernel/qobject.cpp:3398
#17 0xb4933557 in KIO::SlaveInterface::finished (this=0xb9679b0) at ./slaveinterface.moc:165
#18 0xb493744d in KIO::SlaveInterface::dispatch (this=0xb9679b0, _cmd=104, rawdata=...) at ../../kio/kio/slaveinterface.cpp:175
#19 0xb4933a13 in KIO::SlaveInterface::dispatch (this=0xb9679b0) at ../../kio/kio/slaveinterface.cpp:91
#20 0xb4925aea in KIO::Slave::gotInput (this=0xb9679b0) at ../../kio/kio/slave.cpp:322
#21 0xb4927ee3 in KIO::Slave::qt_metacall (this=0xb9679b0, _c=QMetaObject::InvokeMetaMethod, _id=30, _a=0xbffb7adc) at ./slave.moc:76
#22 0xb5cd6c3a in QMetaObject::metacall (object=0xb9679b0, cl=177433360, idx=30, argv=0xbffb7adc) at kernel/qmetaobject.cpp:237
#23 0xb5ce56fb in QMetaObject::activate (sender=0xb975bf0, m=0xb4a188a0, local_signal_index=0, argv=0x0) at kernel/qobject.cpp:3398
#24 0xb482ff97 in KIO::Connection::readyRead (this=0xb975bf0) at ./connection.moc:86
#25 0xb4831d5e in KIO::ConnectionPrivate::dequeue (this=0xb978370) at ../../kio/kio/connection.cpp:82
#26 0xb4831e8e in KIO::Connection::qt_metacall (this=0xb975bf0, _c=QMetaObject::InvokeMetaMethod, _id=5, _a=0xbd38c88) at ./connection.moc:73
#27 0xb5cd6c3a in QMetaObject::metacall (object=0xb975bf0, cl=177433360, idx=5, argv=0xbd38c88) at kernel/qmetaobject.cpp:237
#28 0xb5ce1306 in QMetaCallEvent::placeMetaCall (this=0x10bcb918, object=0xb975bf0) at kernel/qobject.cpp:562
#29 0xb5ce235e in QObject::event (this=0xb975bf0, e=0x10bcb918) at kernel/qobject.cpp:1246
#30 0xb5f19c6c in QApplicationPrivate::notify_helper (this=0x9b6c190, receiver=0xb975bf0, e=0x10bcb918) at kernel/qapplication.cpp:4277
#31 0xb5f20a1e in QApplication::notify (this=0xbffb8440, receiver=0xb975bf0, e=0x10bcb918) at kernel/qapplication.cpp:3702
#32 0xb7512bfa in KApplication::notify (this=0xbffb8440, receiver=0xb975bf0, event=0x10bcb918) at ../../kdeui/kernel/kapplication.cpp:302
#33 0xb5cd19cb in QCoreApplication::notifyInternal (this=0xbffb8440, receiver=0xb975bf0, event=0x10bcb918) at kernel/qcoreapplication.cpp:704
#34 0xb5cd4403 in QCoreApplication::sendEvent (receiver=0x0, event_type=0, data=0x9aacc80)
    at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:215
#35 QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=0, data=0x9aacc80) at kernel/qcoreapplication.cpp:1345
#36 0xb5cd456d in QCoreApplication::sendPostedEvents (receiver=0x0, event_type=0) at kernel/qcoreapplication.cpp:1238
#37 0xb5cfd9ff in QCoreApplication::sendPostedEvents (s=0x9b6fe40) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:220
#38 postEventSourceDispatch (s=0x9b6fe40) at kernel/qeventdispatcher_glib.cpp:276
#39 0xb39e9e78 in g_main_context_dispatch () from /lib/libglib-2.0.so.0
#40 0xb39ed720 in ?? () from /lib/libglib-2.0.so.0
#41 0xb39ed853 in g_main_context_iteration () from /lib/libglib-2.0.so.0
#42 0xb5cfd4f5 in QEventDispatcherGlib::processEvents (this=0x9aac880, flags=...) at kernel/qeventdispatcher_glib.cpp:407
#43 0xb5fcd635 in QGuiEventDispatcherGlib::processEvents (this=0x9aac880, flags=...) at kernel/qguieventdispatcher_glib.cpp:202
#44 0xb5cd0019 in QEventLoop::processEvents (this=0xbffb8304, flags=DWARF-2 expression error: DW_OP_reg operations must be used either alone or in conjuction with DW_OP_piece.
) at kernel/qeventloop.cpp:149
#45 0xb5cd046a in QEventLoop::exec (this=0xbffb8304, flags=...) at kernel/qeventloop.cpp:201
#46 0xb5cd462f in QCoreApplication::exec () at kernel/qcoreapplication.cpp:981
#47 0xb5f19d07 in QApplication::exec () at kernel/qapplication.cpp:3616
#48 0x0804a702 in main (argc=1, argv=0xbffb85f4) at ../../kmail/main.cpp:146
Comment 2 Björn Ruberg 2010-03-06 23:33:33 UTC
Can you reproduce this?
Comment 3 Daniel Hahler 2010-03-06 23:47:48 UTC
No, it did not happen again - I've hoped the backtrace would be useful to find the cause/fix.

You can close this, if you think it's not useful if not reproducible.
Comment 4 Björn Ruberg 2010-03-06 23:53:11 UTC
I fear it is not useful with no way to reproduce. Developers can hardly fix something they do not have. If this occured only once, it may be triggered by a circumstance that may be even not kmails fault