Bug 89878

Summary: Crash after error from POP3 server (KMAcctExpPop::~KMAcctExpPop())
Product: [Unmaintained] kmail Reporter: A. Pfaller <apfaller>
Component: pop3Assignee: kdepim bugs <kdepim-bugs>
Status: RESOLVED WORKSFORME    
Severity: crash CC: bjoern, bugs.kde, decibelshelp, mark, rizsanyi
Priority: NOR    
Version: 1.7   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description A. Pfaller 2004-09-20 14:59:48 UTC
Version:           1.7 (using KDE KDE 3.3.0)
Installed from:    Compiled From Sources
Compiler:          gcc (GCC) 3.3.1 (SuSE Linux) Standard SuSE 9.0 gcc
OS:                Linux

Kmail crashes after receiving the following error
while retrieving mail from POP3 server.

+OK ready  <nnnnnnnnnnnnnnnnn@xxxxx.de>
USER xxxxxx
+OK Password required for xxxxxx.
PASS yyyyyy
+OK xxxxxx has 0 visible messages (1 hidden) in 1360 octets.
LIST
+OK 0 visible messages (1360 octets)
0 447
.
UIDL
+OK uidl command accepted.
0 
.
-ERR POP EOF or I/O Error
+OK Pop server at mail.xxxxxx.de signing off.


The mail retrival never terminates (the progress dialog
continues to be displayed, I waited for about 5 minutes).
The crash happens either when trying to cancel the
the current retrieval via the "X" button in the progress
indicator or when simply closing kmail. The following
backtrace was obtained by simply closing kmail:

[New Thread 16384 (LWP 11580)]
[KCrash handler]
#4  0x00630065 in ?? ()
#5  0x402eed10 in KMAcctExpPop::~KMAcctExpPop() ()
   from /opt/kde3/lib/libkmailprivate.so.0
#6  0x4027956e in QPtrList<KMAccount>::deleteItem(void*) ()
   from /opt/kde3/lib/libkmailprivate.so.0
#7  0x41ed393e in QGList::clear() () from /usr/lib/qt3/lib/libqt-mt.so.3
#8  0x40278eac in QPtrList<KMAccount>::clear() ()
   from /opt/kde3/lib/libkmailprivate.so.0
#9  0x40278e38 in QPtrList<KMAccount>::~QPtrList() ()
   from /opt/kde3/lib/libkmailprivate.so.0
#10 0x402769fa in KMAcctMgr::~KMAcctMgr() ()
   from /opt/kde3/lib/libkmailprivate.so.0
#11 0x402fad5e in KMKernel::cleanup() ()
   from /opt/kde3/lib/libkmailprivate.so.0
#12 0x0804a35b in main ()


Andreas
Comment 1 A. Pfaller 2004-09-27 01:01:17 UTC
I did some further investigation. kmail closes the
connection to the POP3 server. The "-ERR POP EOF or I/O Error"
is the reaction of the server to this. The POP3 server
issuing the (probably faulty) replies to the LIST and UIDL
replies is not under my control but I expirience the crash quite
often (about once or twice each day). The mail with the "0" id is
only shown when "hidden" messages are present. If "visible"
messages are present they will be listed by the LIST and UIDL
commands before the one with the "0" id. Simply retrying the
collection after restarting kmail it usually succeeds 
(no hidden messages).

If have tried debugging this with a debug build of kmail but
I am no Qt or KDE guru and get stuck in the kioslave
kmail interaction. The only thing I now for sure is that the
crash occurs during execution of "job->kill()" in 
"KMAcctExpPop::~KMAcctExpPop()".

Andreas
Comment 2 Thomas McGuire 2007-04-20 12:49:19 UTC
*** Bug 99589 has been marked as a duplicate of this bug. ***
Comment 3 Karl Tomlinson 2007-05-13 10:32:48 UTC
Confirming that I see this with kmail 1.9.5 (kde 3.5.5).

It is caused when there is no unique-uid field in the (invalid) UIDL response:

  uidl
  +OK 224 messages
  ...
  212 <0660472257.20070510230429@gpreeves.com>
  213
  214 <209l452f.3417037@fonterra.com>
  ...

Deleting the single message with no unique-uid, corrected the problem.

I don't have control of my pop server, but it appears to generate unique-ids from message-id headers.  The problem message had the following header:

  Message-ID: 20070511113407190@www.aa.co.nz

Note the missing <> which confused the pop server.

If anyone else hits this issue, the following commands may be helpful.

openssl s_client -host pop3_host -port 995

+OK POP3 server ready.
user your_username
+OK please send PASS command
pass your_password
+OK your_username is welcome here
uidl
Comment 4 Karl Tomlinson 2007-05-13 10:40:33 UTC
I should clarify that the symptoms I am seeing are the message
"unable to complete LIST operation",
and the mail retrieval never terminates,
but I'm not seeing the crash on quit.
Comment 5 carl 2007-06-04 12:15:15 UTC
Hi,
I do have the same problems (?) since a few days. One server (now having 255 emails waiting) or one email from there causes a popup window: 'LIST-operation cannot be completed' (or s.th. like this, it is my german translation). KMail does not crash, but fails to load and delete all the mails on that server.
Carl
Comment 6 carl 2007-06-04 12:18:36 UTC
uups, I just want to add my versions:
KMail 1.9.6 (KDE 3.5.6 "release 77.1" , openSUSE )
1  Application  E-Mail Client
1  Operating System  Linux (i686) release 2.6.11.4-21.17-smp
1  Compiler  gcc version 3.3.5 20050117 (prerelease) (SUSE Linux)
Comment 7 Mark Phillips 2007-06-25 01:19:38 UTC
I also have the same problem. I looked at the offending email on the server, and this is what I found:

From: zaezotxjoajvx@afropoets.com
To: undisclosed-recipients:;
Date: Sun, 24 Jun 2007 15:13:04 -0700 (PDT)
Message-ID: <2[20
Return-Path: <zaezotxjoajvx@afropoets.com>

Note the malformed Message-ID. I get these once every 2 or three days.

Shouldn't KMail be able to handle this problem and not come to a screeching halt and stop responding?

I am running KDE 3.5.5 and KMail 1.9.5 and Kontact 1.2.3 on Debian Etch. 

I hope we get a patch soon - it is a pain to wade through 200+ emails to find the one offending email using a web browser!

Thanks!

Mark Phillips
Comment 8 Mark Phillips 2007-06-25 01:22:05 UTC
I forgot to add that in order to resolve the problem, I have to:

1. Kill KMail and Kontact from the command line
2. Clean out my pop3 email account
3. Restart Kontact and Kmail

It is not enough to just exit from KMail - I have to kill all kontact processes from the command line.

Thanks!

Mark
Comment 9 David 2007-12-02 14:02:58 UTC
I just got the same error in Kmail. Wasn't using Kontact fyi. 
Didn't have to kill Kmail from the command line. Exited it a couple times to see if problem still there while deleting mail from the ISP server. 

Problem gone after deleting the emails from the server. My luck only few emails to deal with. This would have been a real pain if had lot of emails to deal with.

Using KDE 3.5.8  Kmail 1.9.7
Comment 10 David 2007-12-02 20:30:05 UTC
Haven't rebooted, but did end session and still getting error. Guess going to have to use Thunderbird till figure this one out.
Comment 11 Björn Ruberg 2009-12-20 00:03:03 UTC
Is this still valid in the recent kmail releases?
Comment 12 David 2009-12-20 04:41:11 UTC
(In reply to comment #11)
> Is this still valid in the recent kmail releases?

This is rather old. I am using KDE4.3.3 now and still using Kmail. Haven't had this issue in long time. I would say clear it.