Bug 289476 - KMail Hangs When Trying to Load Large IMAP Inbox / Blocks Ability to Send Mail
Summary: KMail Hangs When Trying to Load Large IMAP Inbox / Blocks Ability to Send Mail
Status: RESOLVED WAITINGFORINFO
Alias: None
Product: kmail2
Classification: Applications
Component: general (show other bugs)
Version: 4.7
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-12-21 03:54 UTC by Andy
Modified: 2014-03-18 09:56 UTC (History)
3 users (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 Andy 2011-12-21 03:54:42 UTC
Version:           4.7 (using KDE 4.7.3) 
OS:                Linux

I've been having a lot of problems with kmail2 ever since it upgraded to use akondai. I have about four disconnected IMAP accounts, one of which has approximately 42,300 saved emails spread across five different folders. For some reason this large account always gets hung and I can never open up my inbox. Whenever I go to click on the "inbox" folder, sometimes the icon will just spin forever and it will never come up. So I always have to close kmail and execute "akonadictl restart" in a terminal for it start working again.  

After upgrading to KDE 4.7.3 tonight, I can no longer access any of my mail (even after restarting akonadi), but now I can't even send mail. When I click on "Send Message", the windows darkens and then after a while it just pops up an error box that says:

> There were problems trying to queue the message for sending: Append failed

I should note that my "Sent" folder is in the large IMAP account that I can't open. When I look at the Akonadi Console, it just says that its status is "Online, Running 100%". I've tried clicking "Synchronize" and "Restart" a couple times over the course of several hours, but I still can't read my inbox or send any messages.

I'm not sure what the problem is because it was never sluggish or problematic with the old kmail. I had to disable the Nepomuk stuff too because that was just killing the machine for days.

Reproducible: Always

Steps to Reproduce:
Original Problem:
(1) Start Kmail
(2) Click on IMAP account's inbox
(3) Icon for clicked on inbox is spinning forever, no mail shows up

New Problem
(1) Click "New Message" to write a new email
(2) Click "Send Message"
(3) Application hangs and then displays the error "There were problems trying to queue the message for sending: Append failed"


Expected Results:  
I would like to read my mail and send new messages using kmail.

$ kmail --version
Qt: 4.7.4
KDE Development Platform: 4.7.3 (4.7.3)
KMail: 4.7.3

$ uname -a
Linux nero 3.0.0-14-generic #23-Ubuntu SMP Mon Nov 21 20:28:43 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux

$ cat /etc/issue
Ubuntu 11.10
Comment 1 Andy 2011-12-21 20:13:42 UTC
I deleted the IMAP account and re-added it. The problem of not being able to load my inbox went away, but then I still couldn't send any messages.

After restarting (because akonadi_email_feeder was killing my CPU), I am back at the same problem. Restarting Akonadi from the command line eventually prints the following messages:

> posting retrieval request for item 82590  there are  1  queues and  0  items in mine 
> processing retrieval request for item 82590  parts: ("ENVELOPE")  of resource: "akonadi_imap_resource_6" 
> request for item 82590 still pending - waiting 
> continuing 
> request for item 82590 "503875" failed: "Unable to retrieve item from resource: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken." 
ItemRetrieverException :  Unable to retrieve item from resource: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
> Error during executing query "UPDATE PimItemTable SET atime = :0 WHERE ( collectionId = :1 )" :  "Lock wait timeout exceeded; try restarting transaction QMYSQL3: Unable to execute statement" 
> Unable to update item access time 
> Error during executing query "UPDATE PimItemTable SET atime = :0 WHERE ( collectionId = :1 )" :  "Lock wait timeout exceeded; try restarting transaction QMYSQL3: Unable to execute statement"

The inbox still works in the old version of kmail.
Comment 2 Andy 2011-12-21 21:02:47 UTC
I just noticed that my emails are magically disappearing from my online Sent directory. I used the web-based version of my IMAP account and all the emails that I sent today from another machine running kmail 4.7.2 are gone. Not cool!
Comment 3 Massimiliano Torromeo 2012-01-03 10:55:09 UTC
I also have several problems with IMAP accounts with large amounts of emails and recently I have become unable to send emails and akonadi_imap_resource is always stuck trying to sync a folder.
Comment 4 Christopher Yeleighton 2012-02-13 15:27:30 UTC
I added my Gmail account to KMail and now it hangs on startup.
Process kmail uses 70% CPU.

Backtrace:


#0  0x00007f8ef3facf40 in value (i=3, this=0x7fff1deadd90)
    at /usr/include/QtCore/qlist.h:650
#1  _getRootListRow (index=<optimized out>, rootAncestors=...)
    at /usr/src/debug/kdelibs-4.7.2/kdeui/itemviews/kselectionproxymodel.cpp:191
#2  getRootListRow<QPersistentModelIndex> (index=<optimized out>, list=<optimized out>)
    at /usr/src/debug/kdelibs-4.7.2/kdeui/itemviews/kselectionproxymodel.cpp:267
#3  getRootListRow<QPersistentModelIndex> (list=<optimized out>, index=<optimized out>)
    at /usr/src/debug/kdelibs-4.7.2/kdeui/itemviews/kselectionproxymodel.cpp:224
#4  0x00007f8ef3fad325 in KSelectionProxyModelPrivate::insertSelectionIntoProxy (this=
    0xe866b0, selection=...)
    at /usr/src/debug/kdelibs-4.7.2/kdeui/itemviews/kselectionproxymodel.cpp:1940
#5  0x00007f8ef3fadc67 in KSelectionProxyModelPrivate::selectionChanged (this=0xe866b0, 
    _selected=<optimized out>, _deselected=<optimized out>)
    at /usr/src/debug/kdelibs-4.7.2/kdeui/itemviews/kselectionproxymodel.cpp:1870
#6  0x00007f8ef3faefd0 in KSelectionProxyModelPrivate::sourceLayoutChanged (this=0xe866b0)
    at /usr/src/debug/kdelibs-4.7.2/kdeui/itemviews/kselectionproxymodel.cpp:766
#7  0x00007f8ef3faf59e in KSelectionProxyModel::qt_metacall (this=0xe53b30, _c=
    QMetaObject::InvokeMetaMethod, _id=<optimized out>, _a=0x7fff1deae410)
    at /usr/src/debug/kdelibs-4.7.2/build/kdeui/moc_kselectionproxymodel.cpp:132
#8  0x00007f8eedfd44c5 in Akonadi::SelectionProxyModel::qt_metacall (this=0xe53b30, _c=
    QMetaObject::InvokeMetaMethod, _id=<optimized out>, _a=0x7fff1deae410)
    at /usr/src/debug/kdepimlibs-4.7.2/build/akonadi/selectionproxymodel.moc:70
#9  0x00007f8eee039615 in Akonadi::FavoriteCollectionsModel::qt_metacall (this=0xe53b30, 
    _c=QMetaObject::InvokeMetaMethod, _id=<optimized out>, _a=0x7fff1deae410)
    at /usr/src/debug/kdepimlibs-4.7.2/build/akonadi/favoritecollectionsmodel.moc:81
#10 0x00007f8ef2f3d5aa in QMetaObject::activate (sender=0xf33700, m=<optimized out>, 
    local_signal_index=<optimized out>, argv=0x0) at kernel/qobject.cpp:3287
#11 0x00007f8ef2889e14 in QSortFilterProxyModelPrivate::_q_sourceDataChanged (this=
    0xf5ada0, source_top_left=..., source_bottom_right=...)
    at itemviews/qsortfilterproxymodel.cpp:1165
#12 0x00007f8ef288b24b in QSortFilterProxyModel::qt_metacall (this=0xf33700, _c=
    QMetaObject::InvokeMetaMethod, _id=5, _a=0x7fff1deae720)
    at .moc/release-shared/moc_qsortfilterproxymodel.cpp:130
#13 0x00007f8eed262248 in MailCommon::EntityCollectionOrderProxyModel::qt_metacall (this=
    0xf33700, _c=QMetaObject::InvokeMetaMethod, _id=<optimized out>, _a=<optimized out>)
    at /usr/src/debug/kdepim-4.7.2/build/mailcommon/entitycollectionorderproxymodel.moc:70
#14 0x00007f8ef2f3d5aa in QMetaObject::activate (sender=0xe80010, m=<optimized out>, 
    local_signal_index=<optimized out>, argv=0x7fff1deae720) at kernel/qobject.cpp:3287
#15 0x00007f8ef2f863f7 in QAbstractItemModel::dataChanged (this=<optimized out>, 
    _t1=<optimized out>, _t2=<optimized out>)
    at .moc/release-shared/moc_qabstractitemmodel.cpp:148
#16 0x00007f8ef28898cf in QSortFilterProxyModelPrivate::_q_sourceDataChanged (this=
    0xf31340, source_top_left=..., source_bottom_right=...)
    at itemviews/qsortfilterproxymodel.cpp:1191
#17 0x00007f8ef288b24b in QSortFilterProxyModel::qt_metacall (this=0xe80010, _c=
    QMetaObject::InvokeMetaMethod, _id=5, _a=0x7fff1deaea00)
    at .moc/release-shared/moc_qsortfilterproxymodel.cpp:130
#18 0x00007f8ef3f7f8a0 in KRecursiveFilterProxyModel::qt_metacall (this=0xe80010, _c=
    QMetaObject::InvokeMetaMethod, _id=<optimized out>, _a=0x7fff1deaea00)
    at /usr/src/debug/kdelibs-4.7.2/build/kdeui/krecursivefilterproxymodel.moc:78
#19 0x00007f8ef2f31b20 in QMetaMethod::invoke (this=0x7fff1deaebf0, object=0xe80010, 
    connectionType=Qt::DirectConnection, returnValue=..., val0=..., val1=..., val2=..., 
    val3=..., val4=..., val5=..., val6=..., val7=..., val8=..., val9=...)
    at kernel/qmetaobject.cpp:1597
#20 0x00007f8ef2f33d00 in QMetaObject::invokeMethod (obj=0xe80010, 
    member=<optimized out>, type=Qt::DirectConnection, ret=..., val0=..., val1=..., val2=
    ..., val3=..., val4=..., val5=..., val6=..., val7=..., val8=..., val9=...)
    at kernel/qmetaobject.cpp:1151
#21 0x00007f8ef3f7ebab in invokeMethod (val9=..., val8=..., val7=..., val6=..., val5=..., 
    val4=..., val3=..., val2=..., val1=..., val0=..., type=Qt::DirectConnection, member=
    0x7f8ef4131b73 "_q_sourceDataChanged", obj=0xe80010)
    at /usr/include/QtCore/qobjectdefs.h:410
#22 invokeDataChanged (bottomRight=..., topLeft=..., this=<optimized out>)
    at /usr/src/debug/kdelibs-4.7.2/kdeui/itemviews/krecursivefilterproxymodel.cpp:55
#23 KRecursiveFilterProxyModelPrivate::sourceDataChanged (this=0xc34470, source_top_left=
    ..., source_bottom_right=...)
    at /usr/src/debug/kdelibs-4.7.2/kdeui/itemviews/krecursivefilterproxymodel.cpp:131
#24 0x00007f8ef3f7f996 in KRecursiveFilterProxyModel::qt_metacall (this=0xe80010, _c=
    QMetaObject::InvokeMetaMethod, _id=<optimized out>, _a=0x7fff1deaf100)
    at /usr/src/debug/kdelibs-4.7.2/build/kdeui/krecursivefilterproxymodel.moc:83
#25 0x00007f8ef2f3d5aa in QMetaObject::activate (sender=0xec0da0, m=<optimized out>, 
    local_signal_index=<optimized out>, argv=0x7fff1deaf100) at kernel/qobject.cpp:3287
#26 0x00007f8ef2f863f7 in QAbstractItemModel::dataChanged (this=<optimized out>, 
    _t1=<optimized out>, _t2=<optimized out>)
    at .moc/release-shared/moc_qabstractitemmodel.cpp:148
#27 0x00007f8ef3f7c6b7 in KIdentityProxyModelPrivate::_k_sourceDataChanged (
    this=<optimized out>, topLeft=..., bottomRight=<optimized out>)
    at /usr/src/debug/kdelibs-4.7.2/kdeui/itemviews/kidentityproxymodel.cpp:572
#28 0x00007f8ef3f7d986 in KIdentityProxyModel::qt_metacall (this=0xec0da0, _c=
    QMetaObject::InvokeMetaMethod, _id=<optimized out>, _a=0x7fff1deaf270)
    at /usr/src/debug/kdelibs-4.7.2/build/kdeui/kidentityproxymodel.moc:128
#29 0x00007f8ef2f3d5aa in QMetaObject::activate (sender=0xc084f0, m=<optimized out>, 
    local_signal_index=<optimized out>, argv=0x7fff1deaf270) at kernel/qobject.cpp:3287
#30 0x00007f8ef2f863f7 in QAbstractItemModel::dataChanged (this=<optimized out>, 
    _t1=<optimized out>, _t2=<optimized out>)
    at .moc/release-shared/moc_qabstractitemmodel.cpp:148
#31 0x00007f8ef28898cf in QSortFilterProxyModelPrivate::_q_sourceDataChanged (this=
    0xf32780, source_top_left=..., source_bottom_right=...)
    at itemviews/qsortfilterproxymodel.cpp:1191
#32 0x00007f8ef288b24b in QSortFilterProxyModel::qt_metacall (this=0xc084f0, _c=
    QMetaObject::InvokeMetaMethod, _id=5, _a=0x7fff1deaf540)
    at .moc/release-shared/moc_qsortfilterproxymodel.cpp:130
#33 0x00007f8eee02c450 in Akonadi::StatisticsProxyModel::qt_metacall (this=0xc084f0, _c=
    QMetaObject::InvokeMetaMethod, _id=<optimized out>, _a=0x7fff1deaf540)
    at /usr/src/debug/kdepimlibs-4.7.2/build/akonadi/statisticsproxymodel.moc:72
#34 0x00007f8ef2f3d5aa in QMetaObject::activate (sender=0xec1e10, m=<optimized out>, 
   local_signal_index=<optimized out>, argv=0x7fff1deaf540) at kernel/qobject.cpp:3287
#35 0x00007f8ef2f863f7 in QAbstractItemModel::dataChanged (this=<optimized out>, 
    _t1=<optimized out>, _t2=<optimized out>)
    at .moc/release-shared/moc_qabstractitemmodel.cpp:148
#36 0x00007f8ef28898cf in QSortFilterProxyModelPrivate::_q_sourceDataChanged (this=
    0xf3c060, source_top_left=..., source_bottom_right=...)
    at itemviews/qsortfilterproxymodel.cpp:1191
#37 0x00007f8ef288b24b in QSortFilterProxyModel::qt_metacall (this=0xec1e10, _c=
    QMetaObject::InvokeMetaMethod, _id=5, _a=0x7fff1deaf820)
    at .moc/release-shared/moc_qsortfilterproxymodel.cpp:130
#38 0x00007f8ef3f7f8a0 in KRecursiveFilterProxyModel::qt_metacall (this=0xec1e10, _c=
    QMetaObject::InvokeMetaMethod, _id=<optimized out>, _a=0x7fff1deaf820)
    at /usr/src/debug/kdelibs-4.7.2/build/kdeui/krecursivefilterproxymodel.moc:78
#39 0x00007f8ef2f31b20 in QMetaMethod::invoke (this=0x7fff1deafa10, object=0xec1e10, 
    connectionType=Qt::DirectConnection, returnValue=..., val0=..., val1=..., val2=..., 
    val3=..., val4=..., val5=..., val6=..., val7=..., val8=..., val9=...)
    at kernel/qmetaobject.cpp:1597
#40 0x00007f8ef2f33d00 in QMetaObject::invokeMethod (obj=0xec1e10, 
    member=<optimized out>, type=Qt::DirectConnection, ret=..., val0=..., val1=..., val2=
    ..., val3=..., val4=..., val5=..., val6=..., val7=..., val8=..., val9=...)
    at kernel/qmetaobject.cpp:1151
#41 0x00007f8ef3f7ebab in invokeMethod (val9=..., val8=..., val7=..., val6=..., val5=..., 
    val4=..., val3=..., val2=..., val1=..., val0=..., type=Qt::DirectConnection, member=
    0x7f8ef4131b73 "_q_sourceDataChanged", obj=0xec1e10)
    at /usr/include/QtCore/qobjectdefs.h:410
#42 invokeDataChanged (bottomRight=..., topLeft=..., this=<optimized out>)
    at /usr/src/debug/kdelibs-4.7.2/kdeui/itemviews/krecursivefilterproxymodel.cpp:55
#43 KRecursiveFilterProxyModelPrivate::sourceDataChanged (this=0xc05ae0, source_top_left=
    ..., source_bottom_right=...)
    at /usr/src/debug/kdelibs-4.7.2/kdeui/itemviews/krecursivefilterproxymodel.cpp:131
#44 0x00007f8ef3f7f996 in KRecursiveFilterProxyModel::qt_metacall (this=0xec1e10, _c=
    QMetaObject::InvokeMetaMethod, _id=<optimized out>, _a=0x7fff1deaff20)
    at /usr/src/debug/kdelibs-4.7.2/build/kdeui/krecursivefilterproxymodel.moc:83
#45 0x00007f8ef2f3d5aa in QMetaObject::activate (sender=0xc32700, m=<optimized out>, 
    local_signal_index=<optimized out>, argv=0x7fff1deaff20) at kernel/qobject.cpp:3287
#46 0x00007f8ef2f863f7 in QAbstractItemModel::dataChanged (this=<optimized out>, 
    _t1=<optimized out>, _t2=<optimized out>)
    at .moc/release-shared/moc_qabstractitemmodel.cpp:148
#47 0x00007f8ef28898cf in QSortFilterProxyModelPrivate::_q_sourceDataChanged (this=
    0x7c8380, source_top_left=..., source_bottom_right=...)
    at itemviews/qsortfilterproxymodel.cpp:1191
#48 0x00007f8ef288b24b in QSortFilterProxyModel::qt_metacall (this=0xc32700, _c=
    QMetaObject::InvokeMetaMethod, _id=5, _a=0x7fff1deb01c0)
    at .moc/release-shared/moc_qsortfilterproxymodel.cpp:130
#49 0x00007f8ef2f3d5aa in QMetaObject::activate (sender=0x728c50, m=<optimized out>, 
    local_signal_index=<optimized out>, argv=0x7fff1deb01c0) at kernel/qobject.cpp:3287
#50 0x00007f8ef2f863f7 in QAbstractItemModel::dataChanged (this=<optimized out>, 
    _t1=<optimized out>, _t2=<optimized out>)
    at .moc/release-shared/moc_qabstractitemmodel.cpp:148
#51 0x00007f8eee0046eb in Akonadi::EntityTreeModelPrivate::changeFetchState (
    this=<optimized out>, parent=<optimized out>)
    at /usr/src/debug/kdepimlibs-4.7.2/akonadi/entitytreemodel_p.cpp:233
#52 0x00007f8eee0743ab in Akonadi::EntityTreeModel::qt_metacall (this=0x728c50, _c=
    QMetaObject::InvokeMetaMethod, _id=<optimized out>, _a=0x10a6460)
    at /usr/src/debug/kdepimlibs-4.7.2/build/akonadi/entitytreemodel.moc:173
#53 0x00007f8ef2f4115a in QObject::event (this=0x728c50, e=<optimized out>)
    at kernel/qobject.cpp:1226
#54 0x00007f8ef22f9c34 in notify_helper (e=0x10a5e10, receiver=0x728c50, this=0x662030)
    at kernel/qapplication.cpp:4481
#55 QApplicationPrivate::notify_helper (this=0x662030, receiver=0x728c50, e=0x10a5e10)
    at kernel/qapplication.cpp:4453
#56 0x00007f8ef22feac1 in QApplication::notify (this=0x7fff1deb0c90, receiver=0x728c50, e=
    0x10a5e10) at kernel/qapplication.cpp:4360
#57 0x00007f8ef3fbfe36 in KApplication::notify (this=0x7fff1deb0c90, receiver=0x728c50, 
#55 QApplicationPrivate::notify_helper (this=0x662030, receiver=0x728c50, e=0x10a5e10)
    at kernel/qapplication.cpp:4453
#56 0x00007f8ef22feac1 in QApplication::notify (this=0x7fff1deb0c90, receiver=0x728c50, e=
    0x10a5e10) at kernel/qapplication.cpp:4360
#57 0x00007f8ef3fbfe36 in KApplication::notify (this=0x7fff1deb0c90, receiver=0x728c50, 
---Type <return> to continue, or q <return> to quit---
    event=0x10a5e10) at /usr/src/debug/kdelibs-4.7.2/kdeui/kernel/kapplication.cpp:311
#58 0x00007f8ef2f2a82c in QCoreApplication::notifyInternal (this=0x7fff1deb0c90, receiver=
    0x728c50, event=0x10a5e10) at kernel/qcoreapplication.cpp:787
#59 0x00007f8ef2f2dc08 in sendEvent (event=0x10a5e10, receiver=0x728c50)
    at kernel/qcoreapplication.h:215
#60 QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=0, data=0x60ba70)
    at kernel/qcoreapplication.cpp:1428
#61 0x00007f8ef2f550c3 in sendPostedEvents () at kernel/qcoreapplication.h:220
#62 postEventSourceDispatch (s=<optimized out>) at kernel/qeventdispatcher_glib.cpp:277
#63 0x00007f8ee9bf058d in g_main_dispatch (context=0x664800) at gmain.c:2425
#64 g_main_context_dispatch (context=0x664800) at gmain.c:2995
#65 0x00007f8ee9bf0d88 in g_main_context_iterate (context=0x664800, 
    block=<optimized out>, dispatch=1, self=<optimized out>) at gmain.c:3073
#66 0x00007f8ee9bf0f59 in g_main_context_iteration (context=0x664800, may_block=1)
    at gmain.c:3136
#67 0x00007f8ef2f5551f in QEventDispatcherGlib::processEvents (this=0x60b280, 
    flags=<optimized out>) at kernel/qeventdispatcher_glib.cpp:422
#68 0x00007f8ef239cf9e in QGuiEventDispatcherGlib::processEvents (this=<optimized out>, 
    flags=<optimized out>) at kernel/qguieventdispatcher_glib.cpp:204
#69 0x00007f8ef2f29a32 in QEventLoop::processEvents (this=<optimized out>, flags=...)
    at kernel/qeventloop.cpp:149
#70 0x00007f8ef2f29c2f in QEventLoop::exec (this=0x7fff1deb0b60, flags=...)
    at kernel/qeventloop.cpp:201
#71 0x00007f8ef2f2ddf7 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1064
#72 0x0000000000402df3 in main (argc=<optimized out>, argv=<optimized out>)
    at /usr/src/debug/kdepim-4.7.2/kmail/main.cpp:145

The infinite loop probably starts at 

kdelibs-4.7.2/kdeui/itemviews/kselectionproxymodel.cpp:185

(it is hard to determine exactly because of optimization)
Comment 5 Christopher Yeleighton 2012-02-13 17:56:19 UTC
My back trace is due to Bug 294005.

Workaround: remove kmail2rc.
Comment 6 Christopher Yeleighton 2012-02-14 17:19:59 UTC
And after you are able to start KMail, configure it not to show favorite folders.
Create INBOX links in the Summary page instead.
Comment 7 Christian Mollekopf 2014-03-18 09:56:38 UTC
Please reopen if you can still reproduce this in 4.13