Bug 137314 - kmail crashes very randomly
Summary: kmail crashes very randomly
Status: RESOLVED FIXED
Alias: None
Product: kmail
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR crash
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-11-14 07:08 UTC by Michael Seiwert
Modified: 2007-09-14 12:17 UTC (History)
0 users

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 Michael Seiwert 2006-11-14 07:08:52 UTC
Version:           1.9.5 + Features (using KDE 3.5.5, compiled sources)
Compiler:          Target: i586-suse-linux
OS:                Linux (i686) release 2.6.16.21-0.25-default

This crash in Kmail (Features Branch 1.9.5+) is not reproducible for me but it happens fairly often (> 5 times a day). It seems to happen while selecting mails, but I had also crashes while simply doing nothing. I'm using Cyrus imap server.
Comment 1 Michael Seiwert 2006-11-14 07:09:12 UTC
Using host libthread_db library "/lib/libthread_db.so.1".
[Thread debugging using libthread_db enabled]
[New Thread -1250789712 (LWP 21645)]
[New Thread -1281918048 (LWP 21649)]
[New Thread -1273525344 (LWP 21648)]
[New Thread -1265132640 (LWP 21647)]
[New Thread -1256739936 (LWP 21646)]
[KCrash handler]
#5  0xb7c87fbc in (anonymous namespace)::copy_from_stream<unsigned int> (
    x=@0xbfaa560c)
    at /home/mseiwert/src/svn/kde/branches/work/kdepim-3.5.5+/kmail/kmmsgbase.cpp:1083
#6  0xb7c839c5 in KMMsgBase::getStringPart (this=0x8503fe8, 
    t=KMMsgBase::MsgTagPart)
    at /home/mseiwert/src/svn/kde/branches/work/kdepim-3.5.5+/kmail/kmmsgbase.cpp:1118
#7  0xb7c3cea7 in KMMsgInfo::tagList (this=0x8503fe8)
    at /home/mseiwert/src/svn/kde/branches/work/kdepim-3.5.5+/kmail/kmmsginfo.cpp:288
#8  0xb7b3cc52 in KMMessage (this=0x8aeed20, msgInfo=@0x8503fe8)
    at /home/mseiwert/src/svn/kde/branches/work/kdepim-3.5.5+/kmail/kmmessage.cpp:130
#9  0xb7caa35c in KMFolderMbox::readMsg (this=0x81fb870, idx=10324)
    at /home/mseiwert/src/svn/kde/branches/work/kdepim-3.5.5+/kmail/kmfoldermbox.cpp:828
#10 0xb7c21266 in FolderStorage::getMsg (this=0x81fb870, idx=10324)
    at /home/mseiwert/src/svn/kde/branches/work/kdepim-3.5.5+/kmail/folderstorage.cpp:475
#11 0xb7cbaf55 in KMFolderImap::getMsg (this=0x81fb870, idx=10324)
    at /home/mseiwert/src/svn/kde/branches/work/kdepim-3.5.5+/kmail/kmfolderimap.cpp:153
#12 0xb7bff1b1 in KMFolder::getMsg (this=0x81f3d40, idx=10324)
    at /home/mseiwert/src/svn/kde/branches/work/kdepim-3.5.5+/kmail/kmfolder.cpp:310
#13 0xb7bc2cea in KMHeaders::highlightMessage (this=0x82b6960, lvi=0x8abf050, 
    markitread=false)
    at /home/mseiwert/src/svn/kde/branches/work/kdepim-3.5.5+/kmail/kmheaders.cpp:2049
#14 0xb7bc5428 in KMHeaders::highlightMessage (this=0x82b6960, i=0x8abf050)
    at /home/mseiwert/src/svn/kde/branches/work/kdepim-3.5.5+/kmail/kmheaders.cpp:2310
#15 0xb7bcad39 in KMHeaders::qt_invoke (this=0x82b6960, _id=107, _o=0xbfaa58a4)
    at /home/mseiwert/src/svn/kde/branches/work/kdepim-3.5.5+/kmail/kmheaders.moc:295
#16 0xb5e7266d in QObject::activate_signal ()
   from /usr/lib/qt3/lib/libqt-mt.so.3
#17 0xb61bef54 in QListView::currentChanged ()
   from /usr/lib/qt3/lib/libqt-mt.so.3
#18 0xb5f54357 in QListView::setCurrentItem ()
   from /usr/lib/qt3/lib/libqt-mt.so.3
#19 0xb7bc5369 in KMHeaders::setCurrentItemByIndex (this=0x82b6960, 
    msgIdx=10324)
    at /home/mseiwert/src/svn/kde/branches/work/kdepim-3.5.5+/kmail/kmheaders.cpp:2428
#20 0xb7bc4f1b in KMHeaders::readSortOrder (this=0x82b6960, 
    set_selection=true, forceJumpToUnread=false)
    at /home/mseiwert/src/svn/kde/branches/work/kdepim-3.5.5+/kmail/kmheaders.cpp:3318
#21 0xb7bc529e in KMHeaders::updateMessageList (this=0x82b6960, 
    set_selection=true, forceJumpToUnread=false)
    at /home/mseiwert/src/svn/kde/branches/work/kdepim-3.5.5+/kmail/kmheaders.cpp:2115
#22 0xb7bc9461 in KMHeaders::setFolder (this=0x82b6960, aFolder=0x81f3d40, 
    forceJumpToUnread=false)
    at /home/mseiwert/src/svn/kde/branches/work/kdepim-3.5.5+/kmail/kmheaders.cpp:733
#23 0xb7d7d893 in KMMainWidget::folderSelected (this=0x828f040, 
    aFolder=0x81f3d40, forceJumpToUnread=false)
    at /home/mseiwert/src/svn/kde/branches/work/kdepim-3.5.5+/kmail/kmmainwidget.cpp:1994
#24 0xb7d7d8fe in KMMainWidget::folderSelected (this=0x828f040)
    at /home/mseiwert/src/svn/kde/branches/work/kdepim-3.5.5+/kmail/kmmainwidget.cpp:1883
#25 0xb7d85ee6 in KMMainWidget::qt_invoke (this=0x828f040, _id=53, 
    _o=0xbfaa5d64)
    at /home/mseiwert/src/svn/kde/branches/work/kdepim-3.5.5+/kmail/kmmainwidget.moc:519
#26 0xb5e725d1 in QObject::activate_signal ()
   from /usr/lib/qt3/lib/libqt-mt.so.3
#27 0xb7caf46a in KMFolderImap::folderComplete (this=0x81fb870, t0=0x81fb870, 
    t1=true)
    at /home/mseiwert/src/svn/kde/branches/work/kdepim-3.5.5+/kmail/kmfolderimap.moc:270
#28 0xb7caf610 in KMFolderImap::finishMailCheck (this=0x81fb870, 
    state=KMFolderImap::imapFinished)
    at /home/mseiwert/src/svn/kde/branches/work/kdepim-3.5.5+/kmail/kmfolderimap.cpp:2313
#29 0xb7cb09c2 in KMFolderImap::getMessagesResult (this=0x81fb870, 
    job=0x8591e20, lastSet=true)
    at /home/mseiwert/src/svn/kde/branches/work/kdepim-3.5.5+/kmail/kmfolderimap.cpp:1630
#30 0xb7cb0a46 in KMFolderImap::slotGetLastMessagesResult (this=0x81fb870, 
    job=0x8591e20)
    at /home/mseiwert/src/svn/kde/branches/work/kdepim-3.5.5+/kmail/kmfolderimap.cpp:1639
#31 0xb7cba438 in KMFolderImap::qt_invoke (this=0x81fb870, _id=30, 
    _o=0xbfaa5f24)
    at /home/mseiwert/src/svn/kde/branches/work/kdepim-3.5.5+/kmail/kmfolderimap.moc:323
#32 0xb5e7266d in QObject::activate_signal ()
   from /usr/lib/qt3/lib/libqt-mt.so.3
#33 0xb6a160de in KIO::Job::result () from /opt/kde35/lib/libkio.so.4
#34 0xb6a1ad6d in KIO::Job::emitResult () from /opt/kde35/lib/libkio.so.4
#35 0xb6a1aede in KIO::SimpleJob::slotFinished ()
   from /opt/kde35/lib/libkio.so.4
#36 0xb6a22e9d in KIO::TransferJob::slotFinished ()
   from /opt/kde35/lib/libkio.so.4
#37 0xb6a190ea in KIO::TransferJob::qt_invoke ()
   from /opt/kde35/lib/libkio.so.4
#38 0xb5e7266d in QObject::activate_signal ()
   from /usr/lib/qt3/lib/libqt-mt.so.3
#39 0xb5e732cd in QObject::activate_signal ()
   from /usr/lib/qt3/lib/libqt-mt.so.3
#40 0xb6a0532c in KIO::SlaveInterface::finished ()
   from /opt/kde35/lib/libkio.so.4
#41 0xb6a07a45 in KIO::SlaveInterface::dispatch ()
   from /opt/kde35/lib/libkio.so.4
#42 0xb6a0620a in KIO::SlaveInterface::dispatch ()
   from /opt/kde35/lib/libkio.so.4
#43 0xb6a02e6c in KIO::Slave::gotInput () from /opt/kde35/lib/libkio.so.4
#44 0xb6a03010 in KIO::Slave::qt_invoke () from /opt/kde35/lib/libkio.so.4
#45 0xb5e7266d in QObject::activate_signal ()
   from /usr/lib/qt3/lib/libqt-mt.so.3
#46 0xb5e731d2 in QObject::activate_signal ()
   from /usr/lib/qt3/lib/libqt-mt.so.3
#47 0xb61ac100 in QSocketNotifier::activated ()
   from /usr/lib/qt3/lib/libqt-mt.so.3
#48 0xb5e90870 in QSocketNotifier::event () from /usr/lib/qt3/lib/libqt-mt.so.3
#49 0xb5e13547 in QApplication::internalNotify ()
   from /usr/lib/qt3/lib/libqt-mt.so.3
#50 0xb5e14311 in QApplication::notify () from /usr/lib/qt3/lib/libqt-mt.so.3
#51 0xb645baf2 in KApplication::notify () from /opt/kde35/lib/libkdecore.so.4
#52 0xb5e07e64 in QEventLoop::activateSocketNotifiers ()
   from /usr/lib/qt3/lib/libqt-mt.so.3
#53 0xb5dc2874 in QEventLoop::processEvents ()
   from /usr/lib/qt3/lib/libqt-mt.so.3
#54 0xb5e2a368 in QEventLoop::enterLoop () from /usr/lib/qt3/lib/libqt-mt.so.3
#55 0xb5e2a1fe in QEventLoop::exec () from /usr/lib/qt3/lib/libqt-mt.so.3
#56 0xb5e130ff in QApplication::exec () from /usr/lib/qt3/lib/libqt-mt.so.3
#57 0x0804a90f in main (argc=7, argv=0xbfaa6cc4)
    at /home/mseiwert/src/svn/kde/branches/work/kdepim-3.5.5+/kmail/main.cpp:110
Comment 2 Jason 'vanRijn' Kasper 2006-11-18 15:14:25 UTC
I just caught the same crash, I think with gdb.  This is kdepim-3.5.5+, at revision 605527.

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 809357936 (LWP 4719)]
0x0d714068 in copy_from_stream<Q_UINT32> (x=@0x7fbe6930) at kmmsgbase.cpp:1083
1083          memcpy( &x, g_chunk + g_chunk_offset, sizeof(T) );
(gdb) bt
#0  0x0d714068 in copy_from_stream<Q_UINT32> (x=@0x7fbe6930) at kmmsgbase.cpp:1083
#1  0x0d7149b8 in KMMsgBase::getStringPart (this=0x107eb730, t=KMMsgBase::MsgTagPart) at kmmsgbase.cpp:1118
#2  0x0d6b6de8 in KMMsgInfo::tagList (this=0x107eb730) at kmmsginfo.cpp:288
#3  0x0d6b6ee8 in KMMsgInfo::tagString (this=0x107eb730) at kmmsginfo.cpp:281
#4  0x0d712320 in KMMsgBase::asIndexString (this=0x107eb730, length=@0x7fbe6b7c) at kmmsgbase.cpp:1312
#5  0x0d713be4 in KMMsgBase::syncIndexString (this=0x107eb730) at kmmsgbase.cpp:1360
#6  0x0d85832c in KMFolderIndex::updateIndex (this=0x10440d18) at kmfolderindex.cpp:115
#7  0x0d77b6d8 in KMFolderMaildir::close (this=0x10440d18, aForced=false) at kmfoldermaildir.cpp:240
#8  0x0d7695a8 in KMFolderCachedImap::serverSyncInternal (this=0x10440d18) at kmfoldercachedimap.cpp:1091
#9  0x0d7708e8 in KMFolderCachedImap::qt_invoke (this=0x10440d18, _id=32, _o=0x7fbe6f78) at kmfoldercachedimap.moc:395
#10 0x013a3ef4 in QObject::activate_signal () from /usr/lib/qt-3.3/lib/libqt-mt.so.3
#11 0x013a4f68 in QObject::activate_signal () from /usr/lib/qt-3.3/lib/libqt-mt.so.3
#12 0x0d863c08 in KMail::FolderJob::finished (this=0x10d2d210) at folderjob.moc:188
#13 0x0d864794 in ~FolderJob (this=0x10d2d210) at folderjob.cpp:98
#14 0x0d869c8c in ~CachedImapJob (this=0x10d2d210) at cachedimapjob.cpp:123
#15 0x0d868ad4 in KMail::CachedImapJob::slotGetNextMessage (this=0x10d2d210, job=0x108b05a0) at cachedimapjob.cpp:303
#16 0x0d8694f8 in KMail::CachedImapJob::qt_invoke (this=0x10d2d210, _id=3, _o=0x7fbe7170) at cachedimapjob.moc:154
#17 0x013a3ff0 in QObject::activate_signal () from /usr/lib/qt-3.3/lib/libqt-mt.so.3
#18 0x003aa394 in KIO::Job::result () from /usr/lib/libkio.so.4
#19 0x003eec1c in KIO::Job::emitResult () from /usr/lib/libkio.so.4
#20 0x00415d14 in KIO::SimpleJob::slotFinished () from /usr/lib/libkio.so.4
#21 0x004163ac in KIO::TransferJob::slotFinished () from /usr/lib/libkio.so.4
#22 0x003ee674 in KIO::TransferJob::qt_invoke () from /usr/lib/libkio.so.4
#23 0x013a3ff0 in QObject::activate_signal () from /usr/lib/qt-3.3/lib/libqt-mt.so.3
#24 0x013a4f68 in QObject::activate_signal () from /usr/lib/qt-3.3/lib/libqt-mt.so.3
#25 0x003a4bfc in KIO::SlaveInterface::finished () from /usr/lib/libkio.so.4
#26 0x0040dec4 in KIO::SlaveInterface::dispatch () from /usr/lib/libkio.so.4
#27 0x00415570 in KIO::SlaveInterface::dispatch () from /usr/lib/libkio.so.4
#28 0x003bd8f0 in KIO::Slave::gotInput () from /usr/lib/libkio.so.4
#29 0x00405054 in KIO::Slave::qt_invoke () from /usr/lib/libkio.so.4
#30 0x013a3ff0 in QObject::activate_signal () from /usr/lib/qt-3.3/lib/libqt-mt.so.3
#31 0x013a4ce8 in QObject::activate_signal () from /usr/lib/qt-3.3/lib/libqt-mt.so.3
#32 0x017b01a4 in QSocketNotifier::activated () from /usr/lib/qt-3.3/lib/libqt-mt.so.3
#33 0x013c98a8 in QSocketNotifier::event () from /usr/lib/qt-3.3/lib/libqt-mt.so.3
#34 0x01328bb4 in QApplication::internalNotify () from /usr/lib/qt-3.3/lib/libqt-mt.so.3
#35 0x0132a760 in QApplication::notify () from /usr/lib/qt-3.3/lib/libqt-mt.so.3
#36 0x0f9cb384 in KApplication::notify () from /usr/lib/libkdecore.so.4
#37 0x01318ebc in QEventLoop::activateSocketNotifiers () from /usr/lib/qt-3.3/lib/libqt-mt.so.3
#38 0x012c7198 in QEventLoop::processEvents () from /usr/lib/qt-3.3/lib/libqt-mt.so.3
#39 0x01345e08 in QEventLoop::enterLoop () from /usr/lib/qt-3.3/lib/libqt-mt.so.3
#40 0x01345c08 in QEventLoop::exec () from /usr/lib/qt-3.3/lib/libqt-mt.so.3
#41 0x01328724 in QApplication::exec () from /usr/lib/qt-3.3/lib/libqt-mt.so.3
#42 0x10012774 in main (argc=2, argv=0x7fbe7f24) at main.cpp:161
Comment 3 Jason 'vanRijn' Kasper 2006-11-18 15:35:38 UTC
Hm.  Okay, just caught it again.  This is, as Michael noted, just from kontact/kmail sitting doing its thing..

(gdb) run
Starting program: /home/gideon/local/kde3/bin/kontact --nofork
[Thread debugging using libthread_db enabled]
[New Thread 809357936 (LWP 16553)]
[New Thread 824439984 (LWP 16554)]
[New Thread 834925744 (LWP 16555)]
[New Thread 845411504 (LWP 16556)]
[New Thread 855897264 (LWP 16557)]
WeaverThreadLogger: thread (ID: 1) suspended.
WeaverThreadLogger: thread (ID: 4) suspended.
WeaverThreadLogger: thread (ID: 3) suspended.
WeaverThreadLogger: thread (ID: 2) suspended.
ConditionalOffset: 1.0.106, condition=0
Date is a 7
ConditionalOffset: 4.6.106, condition=0
Date is a 2
ConditionalOffset: 11.10.106, condition=0
Date is a 6
ConditionalOffset: 25.11.106, condition=0
Date is a 1
ConditionalOffset: 2.1.106, condition=0
Date is a 4
ConditionalOffset: 12.1.106, condition=0
Date is a 7
ConditionalOffset: 14.1.106, condition=0
Date is a 2
ConditionalOffset: 15.1.106, condition=0
Date is a 3
ConditionalOffset: 17.2.106, condition=0
Date is a 5
ConditionalOffset: 1.4.106, condition=0
Date is a 1
ConditionalOffset: 17.8.106, condition=0
Date is a 7
ConditionalOffset: 15.9.106, condition=0
Date is a 7
ConditionalOffset: 24.9.106, condition=0
Date is a 2
ConditionalOffset: 31.9.106, condition=0
Date is a 2
ConditionalOffset: 15.11.106, condition=0
Date is a 5
ConditionalOffset: 17.11.106, condition=0
Date is a 7
ConditionalOffset: 22.2.106, condition=0
Date is a 3
ConditionalOffset: 22.5.106, condition=0
Date is a 4
ConditionalOffset: 22.8.106, condition=0
Date is a 5
ConditionalOffset: 22.11.106, condition=0
Date is a 5
QLayout::addChildLayout: layout already has a parent

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 809357936 (LWP 16553)]
0x0d780068 in copy_from_stream<Q_UINT32> (x=@0x7fbe1930) at kmmsgbase.cpp:1083
1083          memcpy( &x, g_chunk + g_chunk_offset, sizeof(T) );
(gdb) bt
#0  0x0d780068 in copy_from_stream<Q_UINT32> (x=@0x7fbe1930) at kmmsgbase.cpp:1083
#1  0x0d7809b8 in KMMsgBase::getStringPart (this=0x105434c0, t=KMMsgBase::MsgTagPart) at kmmsgbase.cpp:1118
#2  0x0d722de8 in KMMsgInfo::tagList (this=0x105434c0) at kmmsginfo.cpp:288
#3  0x0d722ee8 in KMMsgInfo::tagString (this=0x105434c0) at kmmsginfo.cpp:281
#4  0x0d77e320 in KMMsgBase::asIndexString (this=0x105434c0, length=@0x7fbe1b7c) at kmmsgbase.cpp:1312
#5  0x0d77fbe4 in KMMsgBase::syncIndexString (this=0x105434c0) at kmmsgbase.cpp:1360
#6  0x0d8c432c in KMFolderIndex::updateIndex (this=0x10449f90) at kmfolderindex.cpp:115
#7  0x0d7e76d8 in KMFolderMaildir::close (this=0x10449f90, aForced=false) at kmfoldermaildir.cpp:240
#8  0x0d7d55a8 in KMFolderCachedImap::serverSyncInternal (this=0x10449f90) at kmfoldercachedimap.cpp:1091
#9  0x0d7dc8e8 in KMFolderCachedImap::qt_invoke (this=0x10449f90, _id=32, _o=0x7fbe1f78) at kmfoldercachedimap.moc:395
#10 0x013a3ef4 in QObject::activate_signal () from /usr/lib/qt-3.3/lib/libqt-mt.so.3
#11 0x013a4f68 in QObject::activate_signal () from /usr/lib/qt-3.3/lib/libqt-mt.so.3
#12 0x0d8cfc08 in KMail::FolderJob::finished (this=0x10e06018) at folderjob.moc:188
#13 0x0d8d0794 in ~FolderJob (this=0x10e06018) at folderjob.cpp:98
#14 0x0d8d5c8c in ~CachedImapJob (this=0x10e06018) at cachedimapjob.cpp:123
#15 0x0d8d4ad4 in KMail::CachedImapJob::slotGetNextMessage (this=0x10e06018, job=0x1086ca20) at cachedimapjob.cpp:303
#16 0x0d8d54f8 in KMail::CachedImapJob::qt_invoke (this=0x10e06018, _id=3, _o=0x7fbe2170) at cachedimapjob.moc:154
#17 0x013a3ff0 in QObject::activate_signal () from /usr/lib/qt-3.3/lib/libqt-mt.so.3
#18 0x003aa394 in KIO::Job::result () from /usr/lib/libkio.so.4
#19 0x003eec1c in KIO::Job::emitResult () from /usr/lib/libkio.so.4
#20 0x00415d14 in KIO::SimpleJob::slotFinished () from /usr/lib/libkio.so.4
#21 0x004163ac in KIO::TransferJob::slotFinished () from /usr/lib/libkio.so.4
#22 0x003ee674 in KIO::TransferJob::qt_invoke () from /usr/lib/libkio.so.4
#23 0x013a3ff0 in QObject::activate_signal () from /usr/lib/qt-3.3/lib/libqt-mt.so.3
#24 0x013a4f68 in QObject::activate_signal () from /usr/lib/qt-3.3/lib/libqt-mt.so.3
#25 0x003a4bfc in KIO::SlaveInterface::finished () from /usr/lib/libkio.so.4
#26 0x0040dec4 in KIO::SlaveInterface::dispatch () from /usr/lib/libkio.so.4
#27 0x00415570 in KIO::SlaveInterface::dispatch () from /usr/lib/libkio.so.4
#28 0x003bd8f0 in KIO::Slave::gotInput () from /usr/lib/libkio.so.4
#29 0x00405054 in KIO::Slave::qt_invoke () from /usr/lib/libkio.so.4
#30 0x013a3ff0 in QObject::activate_signal () from /usr/lib/qt-3.3/lib/libqt-mt.so.3
#31 0x013a4ce8 in QObject::activate_signal () from /usr/lib/qt-3.3/lib/libqt-mt.so.3
#32 0x017b01a4 in QSocketNotifier::activated () from /usr/lib/qt-3.3/lib/libqt-mt.so.3
#33 0x013c98a8 in QSocketNotifier::event () from /usr/lib/qt-3.3/lib/libqt-mt.so.3
#34 0x01328bb4 in QApplication::internalNotify () from /usr/lib/qt-3.3/lib/libqt-mt.so.3
#35 0x0132a760 in QApplication::notify () from /usr/lib/qt-3.3/lib/libqt-mt.so.3
#36 0x0f9cb384 in KApplication::notify () from /usr/lib/libkdecore.so.4
#37 0x01318ebc in QEventLoop::activateSocketNotifiers () from /usr/lib/qt-3.3/lib/libqt-mt.so.3
#38 0x012c7198 in QEventLoop::processEvents () from /usr/lib/qt-3.3/lib/libqt-mt.so.3
#39 0x01345e08 in QEventLoop::enterLoop () from /usr/lib/qt-3.3/lib/libqt-mt.so.3
#40 0x01345c08 in QEventLoop::exec () from /usr/lib/qt-3.3/lib/libqt-mt.so.3
#41 0x01328724 in QApplication::exec () from /usr/lib/qt-3.3/lib/libqt-mt.so.3
#42 0x10012774 in main (argc=2, argv=0x7fbe2f24) at main.cpp:161

Comment 4 Ismail Onur Filiz 2007-02-09 23:56:50 UTC
This is the dreaded copy_from_stream bug I unfortunately introduced with the tagging patch. I can reproduce it quite reliably. One way to reproduce if you are running a local IMAP server:
1. Select any folder other than inbox.
2. Assuming you use maildir, and users' maildirs are under $HOME/.maildir, choose any message in the inbox, e.g. $HOME/.maildir/cur/1166857707.P13573Q1.monur-tecra:2,S
3. Run perl -e '$basename="1166857707.P13573Q1"; $suffix="some-word:2,S"; for (1..50) {  system("cp","$ENV{HOME}/.maildir/cur/1166857707.P13573Q1.monur-tecra:2,S", "$ENV{HOME}/.maildir/new/${basename}$_.$suffix"); }'
4. Now in kmail, select inbox again.

This quite reliably reproduces the crash for me. It helps if new mails are filtered by some filter that takes time to do its job, e.g. a spam filter. This makes me suspect some sort of 'race condition', i.e. index file trying to be read before the updated version ( because of new mails ) is written back.

Debugging this is the first thing on my KDE to-do list, but I am short of hobby time for some time now. Hence, any help is highly appreciated.
Comment 5 groot 2007-02-14 14:20:27 UTC
Fixed in r633413. See also commit message to kde-pim@. The getStringPart code assumes that all of the messages *are* in the index, which isn't the case with new messages; getStringPart was accessing memory that was not mmap()ed. Added a guard for this case, but didn't cover all possible cases (no mmap available or using getLongPart).