Bug 140429 - Crash when writing maildir index
Summary: Crash when writing maildir index
Status: RESOLVED UNMAINTAINED
Alias: None
Product: kmail
Classification: Applications
Component: index (show other bugs)
Version: 1.9.5
Platform: openSUSE Linux
: NOR crash
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
: 150752 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-01-22 10:39 UTC by Michal Slonina
Modified: 2010-04-06 00:33 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
backtrace of the crash (3.32 KB, text/plain)
2007-01-22 10:41 UTC, Michal Slonina
Details
patch of kmail/cifs bug (499 bytes, patch)
2008-09-04 09:30 UTC, Peter Parzer
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michal Slonina 2007-01-22 10:39:57 UTC
Version:           1.9.5 (using KDE KDE 3.5.5)
Installed from:    SuSE RPMs
Compiler:          gcc 4.1 
OS:                Linux

Kmail exits with SIGSEGV just after GUI appears.

#6  0xb7d9cfc8 in KMFolderIndex::writeIndex (this=0x8151550,
    createEmptyIndex=false)
    at /usr/src/debug/kdepim-3.5.5/kmail/kmfolderindex.cpp:202
#7  0xb7ce5ad3 in KMFolderMaildir::createIndexFromContents (this=0x8151550)
    at /usr/src/debug/kdepim-3.5.5/kmail/kmfoldermaildir.cpp:893
#8  0xb7ce1a4c in KMFolderMaildir::open (this=0x8151550)
    at /usr/src/debug/kdepim-3.5.5/kmail/kmfoldermaildir.cpp:140
Comment 1 Michal Slonina 2007-01-22 10:41:33 UTC
Created attachment 19375 [details]
backtrace of the crash
Comment 2 Michal Slonina 2007-01-22 10:48:42 UTC
the binary and coredump file of this crash is available on:
http://chainsword.homeip.net/kmail_core.tar.bz2
Comment 3 Philip Rodrigues 2007-01-22 22:36:15 UTC
Can you isolate the file that is causing the crash? Does the crash still occur if you remove all the "*index*" files? (should be harmless, but back up your mail dir before you delete anything in it :-)
Comment 4 Michal Slonina 2007-01-24 15:38:58 UTC
Yes, removing the *index* files helped, after that kmail operates normaly :] 
I will try to further isolate the problem, what data is causing the crash,
although odd it seems to me that bad data in the index files is causing the crash ( ?lazy coding? ).
Comment 5 Thomas McGuire 2008-02-17 01:29:10 UTC
Pasting backtrace for easier searching:

#5  0xb6edb521 in fileno_unlocked () from /lib/libc.so.6
#6  0xb7d9cfc8 in KMFolderIndex::writeIndex (this=0x8151550, 
    createEmptyIndex=false)
    at /usr/src/debug/kdepim-3.5.5/kmail/kmfolderindex.cpp:202
#7  0xb7ce5ad3 in KMFolderMaildir::createIndexFromContents (this=0x8151550)
    at /usr/src/debug/kdepim-3.5.5/kmail/kmfoldermaildir.cpp:893
#8  0xb7ce1a4c in KMFolderMaildir::open (this=0x8151550)
    at /usr/src/debug/kdepim-3.5.5/kmail/kmfoldermaildir.cpp:140
#9  0xb7c108c7 in KMFolder::open (this=0x81513d8)
    at /usr/src/debug/kdepim-3.5.5/kmail/kmfolder.cpp:473
#10 0xb7be43f9 in KMHeaders::setFolder (this=0x818d7d8, aFolder=0x81513d8, 
    forceJumpToUnread=false)
    at /usr/src/debug/kdepim-3.5.5/kmail/kmheaders.cpp:713
#11 0xb7d89a85 in KMMainWidget::folderSelected (this=0x81768d0, 
    aFolder=0x81513d8, forceJumpToUnread=<value optimized out>)
    at /usr/src/debug/kdepim-3.5.5/kmail/kmmainwidget.cpp:1869
#12 0xb7d958c7 in KMMainWidget::qt_invoke (this=0x81768d0, _id=51, 
    _o=0xbfa1ef94) at /usr/src/debug/kdepim-3.5.5/kmail/kmmainwidget.moc:477
#13 0xb7303331 in QObject::activate_signal ()
   from /usr/lib/qt3/lib/libqt-mt.so.3
#14 0xb7bbbb3e in KMFolderTree::folderSelected (this=0x821b008, t0=0x81513d8)
    at /usr/src/debug/kdepim-3.5.5/kmail/kmfoldertree.moc:384
#15 0xb7bbd262 in KMFolderTree::doFolderSelected (this=0x821b008, 
    qlvi=0x827f898) at /usr/src/debug/kdepim-3.5.5/kmail/kmfoldertree.cpp:932
#16 0xb7bbd305 in KMFolderTree::showFolder (this=0x821b008, folder=0x81513d8)
    at /usr/src/debug/kdepim-3.5.5/kmail/kmfoldertree.cpp:1733
#17 0xb7d88ebb in KMMainWidget::slotShowStartupFolder (this=0x81768d0)
    at /usr/src/debug/kdepim-3.5.5/kmail/kmmainwidget.cpp:3215
#18 0xb7d96295 in KMMainWidget::qt_invoke (this=0x81768d0, _id=153, 
    _o=0xbfa1f0f4) at /usr/src/debug/kdepim-3.5.5/kmail/kmmainwidget.moc:579
#19 0xb73033cd in QObject::activate_signal ()
   from /usr/lib/qt3/lib/libqt-mt.so.3
#20 0xb763d0ce in QSignal::signal () from /usr/lib/qt3/lib/libqt-mt.so.3
#21 0xb731f497 in QSignal::activate () from /usr/lib/qt3/lib/libqt-mt.so.3
#22 0xb7326823 in QSingleShotTimer::event ()
   from /usr/lib/qt3/lib/libqt-mt.so.3
#23 0xb72a4647 in QApplication::internalNotify ()
   from /usr/lib/qt3/lib/libqt-mt.so.3
#24 0xb72a54f9 in QApplication::notify () from /usr/lib/qt3/lib/libqt-mt.so.3
#25 0xb79611f2 in KApplication::notify () from /opt/kde3/lib/libkdecore.so.4
#26 0xb7299663 in QEventLoop::activateTimers ()
   from /usr/lib/qt3/lib/libqt-mt.so.3
#27 0xb7253bd0 in QEventLoop::processEvents ()
   from /usr/lib/qt3/lib/libqt-mt.so.3
#28 0xb72bb0e0 in QEventLoop::enterLoop () from /usr/lib/qt3/lib/libqt-mt.so.3
#29 0xb72baf76 in QEventLoop::exec () from /usr/lib/qt3/lib/libqt-mt.so.3
#30 0xb72a400f in QApplication::exec () from /usr/lib/qt3/lib/libqt-mt.so.3
#31 0x0804a0eb in main (argc=1219996, argv=0xb70902a0)
    at /usr/src/debug/kdepim-3.5.5/kmail/main.cpp:110
#32 0xb6e93f9c in __libc_start_main () from /lib/libc.so.6
#33 0x08049e61 in _start ()
Comment 6 Thomas McGuire 2008-02-17 01:31:45 UTC
*** Bug 150752 has been marked as a duplicate of this bug. ***
Comment 7 Thomas McGuire 2008-05-05 09:37:54 UTC
*** Bug 161457 has been marked as a duplicate of this bug. ***
Comment 8 Peter Parzer 2008-09-04 09:30:34 UTC
Created attachment 27227 [details]
patch of kmail/cifs bug
Comment 9 Peter Parzer 2008-09-04 09:31:15 UTC
Bug 161457 has been marked as a duplicate of this bug, but I think it has not the same reason. Bug 161457 is actually related to the cifs bug 5431 "rename fails when newpath is open and deletes newpath". Cifs does not rename an open file but deletes it instead. The kmail part of the bug is that kmail does not check for errors after trying to rename an open file and crashes when trying to continue to work with the deleted file. This happens in kmail/kmfolderindex.cpp at line 192. Wilhelm Maier (wilhelm.meier@fh-kl.de) provided a simple patch for kmail that solves bug 161457 (see attachment).
Comment 10 Björn Ruberg 2010-01-03 00:33:06 UTC
bug #161457 is about the inability of kmail to cope with read-only mailboxes. So it is indeed another bug.

Concerning this bug: Is this still valid in KDE 4.3 or later?
Comment 11 Björn Ruberg 2010-04-06 00:33:41 UTC
No response. Closing old KDE 3 crash.