Bug 146139 - KMail asks again and again for rebuilding a corrupted index
Summary: KMail asks again and again for rebuilding a corrupted index
Status: RESOLVED WORKSFORME
Alias: None
Product: kmail
Classification: Applications
Component: index (show other bugs)
Version: 1.9.7
Platform: Debian testing Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-05-30 09:50 UTC by Martin Steigerwald
Modified: 2011-04-28 12:29 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 Martin Steigerwald 2007-05-30 09:50:46 UTC
Version:            (using KDE KDE 3.5.7)
Installed from:    Debian testing/unstable Packages

Hello, today KMail 3.5.7 told me that the index of a mail folder was corrupted - maybe due to that I tried xfs_fsr defragmenting on XFS filesystem while Kontact was still running. I said "Ok" since this was the only choice anyway and saw quite some disk activity and Kontact consumed quite some CPU.

After a while however I the requester that the same folder is *still* corrupted with only the choice to rebuild it again. When clicking "OK" I just got the same requester once again quickly. This actually seemed to be an endless loop. I tried 4-5 times as well.

I then quit KMail forcefully and started it again. I selected the folder in question and its index seemed to be okay.

Expected behavior would be that KMail doesn't tell me again about a corrupted index once it actually rebuilt it already. 

Ideally one would be able to bail out of of rebuilding the index, if one is about to just send a mail and wants to do that lengthy process later - but thats difficult to get right, KMail would need to display somehow that the index is corrupt and refuse to show to contents of the mail folder unless its rebuilt, probably not worth the effort for KDE 3.5.

Regards,
Martin
Comment 1 Martin Steigerwald 2007-05-30 10:03:16 UTC
Once I had it now that I just worked as expected.

On other occasions I got a crash like this (without debugging symbols I will install kdepim-dbg and maybe kdelibs-dbg and see whether I get that crash again):

(no debugging symbols found)
Using host libthread_db library "/lib/i686/cmov/libthread_db.so.1".
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
[Thread debugging using libthread_db enabled]
[New Thread -1249950000 (LWP 5240)]
[New Thread -1283253360 (LWP 5247)]
[New Thread -1274860656 (LWP 5246)]
[New Thread -1266467952 (LWP 5245)]
[New Thread -1258075248 (LWP 5244)]
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
[KCrash handler]
#6  0xb7819d1b in rewind () from /lib/i686/cmov/libc.so.6
#7  0xb7d58ea5 in KMFolderIndex::readIndex () from /usr/lib/libkmailprivate.so
#8  0xb7c7bc93 in KMFolderIndex::recreateIndex ()
   from /usr/lib/libkmailprivate.so
#9  0xb7c7be1b in KMMsgBase::getLongPart () from /usr/lib/libkmailprivate.so
#10 0xb7c7c244 in KMMsgInfo::status () from /usr/lib/libkmailprivate.so
#11 0xb7ba4351 in KMMsgBase::isDeleted () from /usr/lib/libkmailprivate.so
#12 0xb7d5903a in KMFolderIndex::readIndex () from /usr/lib/libkmailprivate.so
#13 0xb7dc1fc4 in KMFolderMaildir::open () from /usr/lib/libkmailprivate.so
#14 0xb7ba2b5e in KMFolder::open () from /usr/lib/libkmailprivate.so
#15 0xb7e74f1a in KMHeaders::setFolder () from /usr/lib/libkmailprivate.so
#16 0xb7e57123 in KMMainWidget::folderSelected ()
   from /usr/lib/libkmailprivate.so
#17 0xb7ea2127 in KMMainWidget::qt_invoke () from /usr/lib/libkmailprivate.so
#18 0xb706ae7c in QObject::activate_signal () from /usr/lib/libqt-mt.so.3
#19 0xb7be8fde in KMFolderTree::folderSelected ()
   from /usr/lib/libkmailprivate.so
#20 0xb7da8a58 in KMFolderTree::doFolderSelected ()
   from /usr/lib/libkmailprivate.so
#21 0xb7da90b9 in KMFolderTree::contentsMouseReleaseEvent ()
   from /usr/lib/libkmailprivate.so
#22 0xb719ee51 in QScrollView::viewportMouseReleaseEvent ()
   from /usr/lib/libqt-mt.so.3
#23 0xb71a03de in QScrollView::eventFilter () from /usr/lib/libqt-mt.so.3
#24 0xb716843e in QListView::eventFilter () from /usr/lib/libqt-mt.so.3
#25 0xb7bd3cf9 in KMFolderTree::eventFilter ()
   from /usr/lib/libkmailprivate.so
#26 0xb706a302 in QObject::activate_filters () from /usr/lib/libqt-mt.so.3
#27 0xb706a380 in QObject::event () from /usr/lib/libqt-mt.so.3
#28 0xb70a1612 in QWidget::event () from /usr/lib/libqt-mt.so.3
#29 0xb7002c26 in QApplication::internalNotify () from /usr/lib/libqt-mt.so.3
#30 0xb7004dc9 in QApplication::notify () from /usr/lib/libqt-mt.so.3
#31 0xb771b142 in KApplication::notify () from /usr/lib/libkdecore.so.4
#32 0xb6f96495 in QApplication::sendSpontaneousEvent ()
   from /usr/lib/libqt-mt.so.3
#33 0xb6f9512f in QETWidget::translateMouseEvent ()
   from /usr/lib/libqt-mt.so.3
#34 0xb6f936b0 in QApplication::x11ProcessEvent () from /usr/lib/libqt-mt.so.3
#35 0xb6fa9d02 in QEventLoop::processEvents () from /usr/lib/libqt-mt.so.3
#36 0xb701d179 in QEventLoop::enterLoop () from /usr/lib/libqt-mt.so.3
#37 0xb701cf9a in QEventLoop::exec () from /usr/lib/libqt-mt.so.3
#38 0xb70047bf in QApplication::exec () from /usr/lib/libqt-mt.so.3
#39 0x0804a26d in ?? ()
#40 0xbfdcd5f0 in ?? ()
#41 0xbfdcd7e0 in ?? ()
#42 0x00000000 in ?? ()

Comment 2 Martin Steigerwald 2007-05-30 10:10:02 UTC
Sorry, no more folders with corrupted indexes. If need be I can try to reproduce this corrupting an index by myself. Would it be enough to copy some random file over the index file in question?
Comment 3 Tim Eberhardt 2010-04-07 09:31:58 UTC
This happens to me with my IMAP inbox and kmail 4.4.2. When I try to close kmail and break out of this loop the following crash report is generated:

Application: Kontact (kontact), signal: Segmentation fault
[KCrash Handler]
#5  0x00007fd3a3440330 in typeinfo for QObjectPrivate () from /usr/lib64/qt4/libQtCore.so.4
#6  0x00007fd391f3726e in KMFolderIndex::recreateIndex (this=0x20f6a60) at /var/tmp/portage/kde-base/kmail-4.4.2/work/kmail-4.4.2/kmail/kmfolderindex.cpp:512
#7  0x00007fd391dcbb78 in KMMsgBase::getLongPart (this=0x28c71c0, t=KMMsgBase::MsgStatusPart) at /var/tmp/portage/kde-base/kmail-4.4.2/work/kmail-4.4.2/kmail/kmmsgbase.cpp:1058
#8  0x00007fd391d74d95 in KMMsgInfo::status (this=0x28c71c0) at /var/tmp/portage/kde-base/kmail-4.4.2/work/kmail-4.4.2/kmail/kmmsginfo.cpp:503
#9  0x00007fd391f38133 in KMFolderIndex::readIndex (this=0x20f6a60) at /var/tmp/portage/kde-base/kmail-4.4.2/work/kmail-4.4.2/kmail/kmfolderindex.cpp:267
#10 0x00007fd391f3a0b8 in KMFolderIndex::openInternal (this=0x20f6a60, options=) at /var/tmp/portage/kde-base/kmail-4.4.2/work/kmail-4.4.2/kmail/kmfolderindex_common.cpp:153
#11 0x00007fd391df98ee in KMFolderMbox::open (this=0x20f6a60, owner=<value optimized out>) at /var/tmp/portage/kde-base/kmail-4.4.2/work/kmail-4.4.2/kmail/kmfoldermbox.cpp:139
#12 0x00007fd391d69d4d in KMail::ActionScheduler::tempOpenFolder (this=0x2710900, aFolder=0x20f5eb0) at /var/tmp/portage/kde-base/kmail-4.4.2/work/kmail-4.4.2/kmail/actionscheduler.cpp:225
#13 0x00007fd391d69e8a in KMail::ActionScheduler::messageBase (this=0x2710900, serNum=<value optimized out>) at /var/tmp/portage/kde-base/kmail-4.4.2/work/kmail-4.4.2/kmail/actionscheduler.cpp:315
#14 0x00007fd391d6dba0 in KMail::ActionScheduler::fetchMessage (this=0x2710900) at /var/tmp/portage/kde-base/kmail-4.4.2/work/kmail-4.4.2/kmail/actionscheduler.cpp:436
#15 0x00007fd391d6e740 in KMail::ActionScheduler::qt_metacall (this=0x2710900, _c=QMetaObject::InvokeMetaMethod, _id=<value optimized out>, _a=0x7fff5f6482e0)
    at /var/tmp/portage/kde-base/kmail-4.4.2/work/kmail-4.4.2_build/kmail/actionscheduler.moc:124
#16 0x00007fd3a314431f in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /usr/lib64/qt4/libQtCore.so.4
#17 0x00007fd3a3140f93 in QObject::event(QEvent*) () from /usr/lib64/qt4/libQtCore.so.4
#18 0x00007fd3a385b66c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib64/qt4/libQtGui.so.4
#19 0x00007fd3a3861cbb in QApplication::notify(QObject*, QEvent*) () from /usr/lib64/qt4/libQtGui.so.4
#20 0x00007fd3a49ceb36 in KApplication::notify (this=0x7fff5f648d90, receiver=0x249b200, event=0x7fff5f648a30)
    at /var/tmp/portage/kde-base/kdelibs-4.4.2/work/kdelibs-4.4.2/kdeui/kernel/kapplication.cpp:302
#21 0x00007fd3a313162b in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib64/qt4/libQtCore.so.4
#22 0x00007fd3a315df22 in ?? () from /usr/lib64/qt4/libQtCore.so.4
#23 0x00007fd3a315ad18 in ?? () from /usr/lib64/qt4/libQtCore.so.4
#24 0x00007fd39ed3950d in g_main_dispatch (context=0x14be620) at gmain.c:1960
#25 IA__g_main_context_dispatch (context=0x14be620) at gmain.c:2513
#26 0x00007fd39ed3cec8 in g_main_context_iterate (context=0x14be620, block=<value optimized out>, dispatch=<value optimized out>, self=<value optimized out>) at gmain.c:2591
#27 0x00007fd39ed3cff0 in IA__g_main_context_iteration (context=0x14be620, may_block=1) at gmain.c:2654
#28 0x00007fd3a315a9e3 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/qt4/libQtCore.so.4
#29 0x00007fd3a39098ae in ?? () from /usr/lib64/qt4/libQtGui.so.4
#30 0x00007fd3a312ff82 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/qt4/libQtCore.so.4
#31 0x00007fd3a3130354 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/qt4/libQtCore.so.4
#32 0x00007fd3a313403b in QCoreApplication::exec() () from /usr/lib64/qt4/libQtCore.so.4
#33 0x00000000004042c4 in main (argc=<value optimized out>, argv=<value optimized out>) at /var/tmp/portage/kde-base/kontact-4.4.2/work/kontact-4.4.2/kontact/src/main.cpp:224

I use Kmail about 3 months now and it is the 3rd or 4th time this error occurs.
Comment 4 Martin Steigerwald 2011-04-28 10:46:40 UTC
I didn't see this for years now. Tim, did you see it again? Maybe it can be closed anyway, since KMail from 4.6 uses Akonadi.
Comment 5 Tim Eberhardt 2011-04-28 11:08:50 UTC
Don't remember the last version i saw this bug. I once got something similar 2-3 month ago but without the infinite loop. So I think it may could be closed as you say.
Comment 6 Martin Steigerwald 2011-04-28 12:29:13 UTC
Okay, then I close it with WORKSFORME, as its not clear whether the root cause has been fixed. Thanks.