Bug 128233 - IMAP protocol client error: fetching UID 0 causes lockup in client
Summary: IMAP protocol client error: fetching UID 0 causes lockup in client
Status: RESOLVED UNMAINTAINED
Alias: None
Product: kmail
Classification: Applications
Component: IMAP (show other bugs)
Version: 1.8.2
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-05-29 11:34 UTC by Andreas Aardal Hanssen
Modified: 2015-04-12 10:27 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 Andreas Aardal Hanssen 2006-05-29 11:34:52 UTC
Version:           1.8.2 (using KDE KDE 3.5.1)
Installed from:    SuSE RPMs
Compiler:          gcc version 4.0.2 20050901 (prerelease) (SUSE Linux)
 Installed KMail via RPMs in SuSE 9.3
OS:                Linux

KMail updates its flags by issuing a UID FETCH 1:* FLAGS. After this response, it fetches messages with UID 2006:*, and because message UID 2005 is the largest message, the IMAP server returns only this (in IMAP, * = max message number, and 2006:2005 == 2005 if there is no 2006). It looks like KMail is confused by this response, because it promptly does a refresh of the entire mailbox by fetching 0:2005.

Bug 1: UID 0 - that's a protocol error. There is no such thing in IMAP.
Bug 2: It shouldn't have done the full refresh in the first place. :-)

Protocol dump:

* 1714 FETCH (UID 2004 FLAGS (\Seen \Recent))<CR><LF>
* 1714 FETCH (FLAGS (\Seen \Recent))<CR><LF>
* 1715 FETCH (UID 2005 FLAGS (\Recent))<CR><LF>
88139 OK FETCH completed<CR><LF>
88140 UID FETCH 2006:* (UID RFC822.SIZE FLAGS ENVELOPE BODY.PEEK[HEADER.FIELDS (REFERENCES)])<CR><LF>
* 1715 FETCH (UID 2005 RFC822.SIZE 2708 FLAGS (\Recent) ENVELOPE ("Mon, 29 May 2006 14:34:17 +0900" "Fw: (Hopefully)temporally block-out of my KO account" ((NIL NIL "Takayasu_Fukui" "jetro.go.jp")) ((NIL NIL "Takayasu_Fukui" "jetro.go.jp")) ((NIL NIL "Takayasu_Fukui" "jetro.go.jp")) ((NIL NIL "fktac" "hotmail.com")) NIL NIL NIL "<OF0A119772.9197A33F-ON4925717D.001E7FB4-4925717D.001EB0FA@jetro.go.jp>") BODY[HEADER.FIELDS ("REFERENCES")] {2}<CR><LF>
<CR><LF>
)<CR><LF>
88140 OK FETCH completed<CR><LF>
88141 UID FETCH 0,2005 (UID RFC822.SIZE FLAGS ENVELOPE BODY.PEEK[HEADER.FIELDS (REFERENCES)])<CR><LF>
* NO Expected sequence set after FETCH SPACE<CR><LF>
Comment 1 Carsten Burghardt 2006-05-29 14:43:40 UTC
> Bug 1: UID 0 - that's a protocol error. There is no such thing in IMAP.


Nearly, the error is that the kioslave requests 0,2005 (the comma is the
problem).

> Bug 2: It shouldn't have done the full refresh in the first place. :-)


Good catch!
I wonder how you reproduce this behaviour. The 2006 was the highest UID so
you must have deleted this messages before. Is that correct?



Carsten
Comment 2 Andreas Aardal Hanssen 2006-05-29 14:56:25 UTC
On Monday 29 May 2006 14:43, Carsten Burghardt wrote:
[bugs.kde.org quoted mail]

Perhaps, but the comma is perfectly fine. That simply means that the
client requested message 0 and 2005. But 0 is invalid. So maybe this
is several bugs ;-).

> > Bug 2: It shouldn't have done the full refresh in the first place. :-)
> Good catch!
> I wonder how you reproduce this behaviour. The 2006 was the highest UID so
> you must have deleted this messages before. Is that correct?


Indeed. It's very hard to reproduce; I'm running KMail against Binc IMAP
v1.2.13b2. It happens so seldomly that I've set up a protocol log
constantly at work to catch it when it happens. It does seem to happen
right after I delete a message, and after KMail refreshes its flags.

Andreas
Comment 3 Andreas Aardal Hanssen 2006-05-29 17:21:49 UTC
On Monday 29 May 2006 14:43, Carsten Burghardt wrote:
[bugs.kde.org quoted mail]

BTW, can you please scramble my friend's email address from
the protocol dump?

Thanks.

Andreas
Comment 4 Laurent Montel 2015-04-12 10:27:25 UTC
Thank you for taking the time to file a bug report.

KMail2 was released in 2011, and the entire code base went through significant changes. We are currently in the process of porting to Qt5 and KF5. It is unlikely that these bugs are still valid in KMail2.

We welcome you to try out KMail 2 with the KDE 4.14 release and give your feedback.