Bug 84215 - check new mail on IMAP and sending email hangs
Summary: check new mail on IMAP and sending email hangs
Status: RESOLVED WORKSFORME
Alias: None
Product: kmail
Classification: Applications
Component: IMAP (show other bugs)
Version: 1.6.82
Platform: unspecified Linux
: NOR crash
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-06-29 17:49 UTC by Ferdinand Gassauer
Modified: 2007-09-14 12:17 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
backtrace of the crash (3.30 KB, text/plain)
2004-07-27 14:26 UTC, Ferdinand Gassauer
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ferdinand Gassauer 2004-06-29 17:49:00 UTC
Version:           1.6.82 (using KDE 3.2.3, compiled sources)
Compiler:          gcc version 3.2.2
OS:                Linux (i686) release 2.4.19-64GB-SMP

Hi!
IMHO the IMAP fetch mail processes hang if sending an email occurs at the same time.

lot of processes are shown and the progress bar shows "working" 

have to close kmail and restart to make it work again.

cu ferdinand
Comment 1 Ferdinand Gassauer 2004-06-30 12:10:15 UTC
kmail than consumes 100% CPU
Comment 2 Ferdinand Gassauer 2004-06-30 12:13:46 UTC
the outgoing message is placed in the "sent mail of the local folder" instead of the sent mail of the IMAP folder.
Comment 3 Carsten Burghardt 2004-06-30 22:43:54 UTC
Do you have any special way to reproduce this? Send a big email and check for 
new mail or something like that?

Carsten

Comment 4 Ferdinand Gassauer 2004-07-01 10:03:49 UTC
not realy
if I sent a big mail I have to wait until the composer window closes and the main window becomes available. only then I can click "check mail", which propably is already to late to make kmail hang.

BTW I use kdepim CVS against KDE 3.2.3
Comment 5 Ferdinand Gassauer 2004-07-21 09:40:25 UTC
well currently (CVS_HEAD) kmail does not hang any more, but it takes a very long time to finsh. and it's always the process "retrieving mail from sentmail" which seems to block further processing. IMHO this delay semms not very depentant of the message size. it happens (almost?) always when I sent a mail and immediately click on an other folder to check mails there.
Comment 6 Till Adam 2004-07-23 08:49:46 UTC
Ferdinand, sounds like the index of your imap sent mail folder is corrupted. Can you try setting a local sent mail folder and/or nuke the index of the imap one?
Comment 7 Till Adam 2004-07-26 23:35:34 UTC
CVS commit by tilladam: 

Make sure an imap sent mail folder is properly kept open during move of
the message from the local sent mail (where it is placed for fallback) to
the imap folder by using a KMMoveCommand, which nicely encapsulates all
that. This avoids the folder constantly opening and closing during
processing of incoming data which makes KMail appear hung and consumes
massive amounts of cpu.

Ferdinand, can you confirm this fixes it?

CCMAIL: 84215-done@bugs.kde.org


  M +6 -1      kmsender.cpp   1.218


--- kdepim/kmail/kmsender.cpp  #1.217:1.218
@@ -36,4 +36,5 @@ using namespace KMime::Types;
 #include "kmmsgpart.h"
 #include "protocols.h"
+#include "kmcommands.h"
 #include <mimelib/mediatyp.h>
 
@@ -350,5 +351,9 @@ void KMSender::doSendMsg()
         return;
       }
-      if (imapSentFolder) imapSentFolder->moveMsg(mCurrentMsg);
+      if (imapSentFolder) {
+        // Does proper folder refcounting and message locking
+        KMCommand *command = new KMMoveCommand( imapSentFolder, mCurrentMsg );
+        command->start();
+      }
     default:
       break;


Comment 8 Ferdinand Gassauer 2004-07-27 09:29:13 UTC
Hmm! 
Something strange happend -
the first mail I tried stayed in the local and kmail crashed
after this it seems to work as expected without the blocking "check sent mail"
please let me observe this a little bit more 
Comment 9 Ferdinand Gassauer 2004-07-27 14:26:24 UTC
Created attachment 6873 [details]
backtrace of the crash

sent an email as first action in kmail -
Comment 10 Ferdinand Gassauer 2004-07-27 14:28:21 UTC
see attachment
Comment 11 Till Adam 2004-07-27 15:10:59 UTC
As first action? You mean right after startup? Do you have the imap account 
with the sent mail folder expanded at that point? Was it still listing 
folders, maybe? Was an imap folder open, if so, on the same account?

Comment 12 Ferdinand Gassauer 2004-07-27 15:35:54 UTC
> ------- Additional Comments From adam kde org  2004-07-27 15:10 -------
> As first action? You mean right after startup? 
Yes
> Do you have the imap account 
> with the sent mail folder expanded at that point? 
Yes
> Was it still listing folders, maybe? 
No
> Was an imap folder open, if so, on the same account? 
Yes - I have set up kmail to open the "inbox" of my imap account an startup.

Comment 13 Ferdinand Gassauer 2004-07-27 15:37:09 UTC
> ------- Additional Comments From adam kde org  2004-07-27 15:10 -------

BTW, it crashes also if I move to my KDE-Bugs-folder and click answer 
Comment 14 Ferdinand Gassauer 2004-07-27 15:39:42 UTC
But it does not crash, if I click "send again" in my "lokal-sent-mail

anyhow, if it crashes, than only at the very beginning after startup. 
Comment 15 Ferdinand Gassauer 2004-07-29 08:33:11 UTC
IMHO the problem is solved now. it does not and does not hang any more.