Bug 115887 - crash when moving mail in IMAP -- won't restart till ~/.kde/share/apps/kmail/imap removed
Summary: crash when moving mail in IMAP -- won't restart till ~/.kde/share/apps/kmail/...
Status: RESOLVED DUPLICATE of bug 113329
Alias: None
Product: kmail
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR crash (vote)
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-11-08 01:22 UTC by Nathaniel Taylor
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 Nathaniel Taylor 2005-11-08 01:22:07 UTC
Version:            (using KDE KDE 3.4.92)
Installed from:    Compiled From Sources
OS:                Linux

Probably the cause of Bug 107530.

I can't reliably reproduce it -- probably depends on just how quickly actions of moving and reading are made.  But it happens often -- a couple of times a day when I'm sorting lots of email, and on several systems.

When dragging a mail to a folder (I have the option turned on for showing a "move|copy|cancel" dialogue) and quickly going to another folder, kmail sometimes crashes.
It then cannot be restarted, but removing the ~/.kde/share/apps/kmail/imap directory fixes this.

I know this isn't a very helpful report, with no reliable reproduceability, but there has apparently occurred since the stable release a problem somewhere in the consistency of the imap cache, so perhaps this is worth knowing in itself.
Comment 1 Richard Salts 2006-05-01 10:15:42 UTC
I get this as well.
Here is the output kmail gives from the command line:
kmail
kmail: WARNING: [void KMFolderImap::setImapPath(const QString&)] ignoring empty path
kmail: WARNING: [void KMFolderImap::setImapPath(const QString&)] ignoring empty path
kmail: WARNING: [void KMFolderImap::setImapPath(const QString&)] ignoring empty path
WeaverThreadLogger: thread (ID: 1) suspended.
WeaverThreadLogger: thread (ID: 2) suspended.
WeaverThreadLogger: thread (ID: 3) suspended.
WeaverThreadLogger: thread (ID: 4) suspended.
kdecore (KAction): WARNING: KAction::plugAccel(): call to deprecated action.
kdecore (KAction): WARNING: KAction::plugAccel( kacc = 0x8508af0 ): KAccel object already contains an action name "delete"
kdecore (KAction): WARNING: KAction::plugAccel(): call to deprecated action.
kdecore (KAction): WARNING: KAction::plugAccel( kacc = 0x8508af0 ): KAccel object already contains an action name "edit"
kdecore (KAction): WARNING: KAction::plugAccel(): call to deprecated action.
kdecore (KAction): WARNING: KAction::plugAccel( kacc = 0x8508af0 ): KAccel object already contains an action name "display_message"
*** KMail got signal 11 (Crashing)
KCrash: Application 'kmail' crashing...

Here is the output of a stack trace:

Using host libthread_db library "/lib/tls/i686/cmov/libthread_db.so.1".
[Thread debugging using libthread_db enabled]
[New Thread -1249613600 (LWP 20434)]
[New Thread -1278067792 (LWP 20438)]
[New Thread -1269675088 (LWP 20437)]
[New Thread -1261282384 (LWP 20436)]
[New Thread -1252889680 (LWP 20435)]
[KCrash handler]
#6  KMAcctImap::processNewMail (this=0x84a92a8, interactive=true)
    at qguardedptr.h:117
#7  0xb7c539df in KMail::AccountManager::processNextCheck (this=0x829db80, 
    _newMail=false)
    at /build/buildd/kdepim-3.5.2/build-tree/kdepim-3.5.2/kmail/accountmanager.cpp:196
#8  0xb7c53bbe in KMail::AccountManager::singleCheckMail (this=0x829db80, 
    account=0x84a92a8, interactive=true)
    at /build/buildd/kdepim-3.5.2/build-tree/kdepim-3.5.2/kmail/accountmanager.cpp:125
#9  0xb7c53d6f in KMail::AccountManager::checkMail (this=0x829db80, 
    _interactive=true)
    at /build/buildd/kdepim-3.5.2/build-tree/kdepim-3.5.2/kmail/accountmanager.cpp:312
#10 0xb7d76ab7 in KMMainWidget::slotCheckMail (this=0x878f248)
    at /build/buildd/kdepim-3.5.2/build-tree/kdepim-3.5.2/kmail/kmmainwidget.cpp:796
#11 0xb7d8ce31 in KMMainWidget::qt_invoke (this=0x878f248, _id=50, 
    _o=0xbfd1d5c8) at kmmainwidget.moc:472
#12 0xb72d154b in QObject::activate_signal () from /usr/lib/libqt-mt.so.3
#13 0xb76631a9 in QSignal::signal () from /usr/lib/libqt-mt.so.3
#14 0xb72eec4c in QSignal::activate () from /usr/lib/libqt-mt.so.3
#15 0xb72f6710 in QSingleShotTimer::event () from /usr/lib/libqt-mt.so.3
#16 0xb726787a in QApplication::internalNotify () from /usr/lib/libqt-mt.so.3
#17 0xb7267a76 in QApplication::notify () from /usr/lib/libqt-mt.so.3
#18 0xb6f1b02e in KApplication::notify () from /usr/lib/libkdecore.so.4
#19 0xb71f9001 in QApplication::sendEvent () from /usr/lib/libqt-mt.so.3
#20 0xb7259305 in QEventLoop::activateTimers () from /usr/lib/libqt-mt.so.3
#21 0xb720cd2a in QEventLoop::processEvents () from /usr/lib/libqt-mt.so.3
#22 0xb7280255 in QEventLoop::enterLoop () from /usr/lib/libqt-mt.so.3
#23 0xb728017a in QEventLoop::exec () from /usr/lib/libqt-mt.so.3
#24 0xb726638d in QApplication::exec () from /usr/lib/libqt-mt.so.3
#25 0x0804a098 in main (argc=139105308, argv=0x84a941c)
    at /build/buildd/kdepim-3.5.2/build-tree/kdepim-3.5.2/kmail/main.cpp:110
#26 0xb77c5eb0 in __libc_start_main () from /lib/tls/i686/cmov/libc.so.6
#27 0x08049e11 in _start () at ../sysdeps/i386/elf/start.S:119
Comment 2 Nathaniel Taylor 2006-05-01 11:23:01 UTC
Incidentally:  it's still happengin for me in kde 3.5.2 (kmail 1.9.1), 
and it does seem that it only happens on the computers where my home directory is mounted over NFS.
Comment 3 Richard Salts 2006-05-01 11:42:30 UTC
My home directory is mounted locally when this occurs. What imap server are you using? I'm using courier-imap. KDE 3.5.2 here, with debian packages from unstable.
I also tried an strace, and it worked the first time, but I tried unsubscribing from folders and it crashed again, this time running the strace didn't change things. It's too big to attach to a bug though.
Comment 4 Nathaniel Taylor 2006-05-01 17:46:57 UTC
I too am using courier-imap.   It's interesting if that could be 
significant:  perhaps sometime I'll try this dovecot thing in earnest.

It's rather strange:  two computers that I use, both with the same 
hardware and gentoo installation of KDE, both using the same IMAP 
server, and the main difference being the local versus remote 
home/auth/userinfo (nfs, nis).   Only on the one using the remote 
services does the problem occur (quite often).  The other has never 
shown it.  The KDE configs were set up on one of the computers (I 
forget which, but probably the remote-home one) and copied to the 
other, so should be similar too.


Kmail's entire handling of imap folders leaves much to be desired:  many 
friends of mine have remarked on this, using gentoo, suse, etc.  When a 
mailbox has been accessed by another program while kmail is open, e.g. 
various emails have come to and gone from the inbox, then one has at 
least to move to another folder, do a "check mail", then move back 
again to inbox (and possibly repeat this process) before the current 
state is correctly shown.

I shall endeavour to test another imap server just to see if that helps 
at all.
Comment 5 Andreas Kling 2006-07-31 23:29:20 UTC

*** This bug has been marked as a duplicate of 113329 ***
Comment 6 Nathaniel Taylor 2006-07-31 23:38:17 UTC
It can still happen when I use dovecot instead of courier-imap.
Removing the kmail cache is the only way to get things working again.

Furthermore, kmail is still bad on:
 * sometimes failing to show the content of new mails until the program has been closed and reopened, or in some cases only after the cache is deleted,
 * simply hanging if an ssl connection to an imap server is broken (e.g. a kmail is behind some connection using dhcp or ppp that changes its address); here it would be hoped that a reconnection would be made after a while, but I've not seen that happen -- it just sits there and never gets any new mail.

At least the first of these two complaints seems plausibly related to a problem with kmail's imap caching, as is the main subject of this bug.

Is there any plan for problem finding / solving of this?