After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 550478 - Error while Refreshing folder.
Error while Refreshing folder.
Status: RESOLVED OBSOLETE
Product: evolution
Classification: Applications
Component: Mailer
2.26.x (obsolete)
Other All
: Normal major
: ---
Assigned To: evolution-mail-maintainers
Evolution QA team
Depends on:
Blocks:
 
 
Reported: 2008-09-02 15:00 UTC by Martin Jürgens
Modified: 2014-02-23 14:53 UTC
See Also:
GNOME target: ---
GNOME version: 2.25/2.26


Attachments
evolog debugging imap (876 bytes, text/plain)
2008-09-03 12:11 UTC, Martin Jürgens
  Details
proposed eds patch (2.22 KB, patch)
2008-09-03 17:05 UTC, Milan Crha
rejected Details | Review

Description Martin Jürgens 2008-09-02 15:00:53 UTC
Please describe the problem:
Hi I am using Evolution IMAP. Since a few weeks I get "Error while Refreshing folder." when trying to receive mails.

The log says

(evolution:4522): camel-imap-provider-WARNING **: Unexpected FETCH response from server: (  )

(evolution:4522): camel-imap-provider-WARNING **: No information for message 12362

I already tried to delete the mails with that numbers (as Thunderbird works), but they always change

Steps to reproduce:
1. 
2. 
3. 


Actual results:


Expected results:


Does this happen every time?
Yes

Other information:
Comment 1 Martin Jürgens 2008-09-02 15:38:59 UTC
Funnily enough, there are no messages with such numbers in my IMAP folder.
Comment 2 Paul Bolle 2008-09-02 21:58:23 UTC
Do you have reason to believe these warnings concern actual messages you should have received (have messages gone missing)? Does this block receiving all or some messages (other than the messages that seem to be involved in this warning)? Other actions that apparently don't work?
Comment 3 Martin Jürgens 2008-09-03 06:24:19 UTC
Since this message arrived the first time, Evolution does not show newer mails (which exist, Thunderbird shows them), so it blocks them..

Looking into other folder works fine, also, Evolution does not crash.
Comment 4 Paul Bolle 2008-09-03 08:45:33 UTC
I see.

Maybe you could try to generate some debug info. See: http://www.gnome.org/projects/evolution/bugs.shtml That might help the people that actually understand IMAP to see what is going on.

I'd guess closing evolution, "evolution --force-shutdown" and restarting evolution with "env CAMEL_DEBUG=imap" in a terminal might do the trick.

Do scan for personal info before posting.
Comment 5 Martin Jürgens 2008-09-03 12:11:38 UTC
Created attachment 117925 [details]
evolog debugging imap

Thanks for your help, this is a short cut of the things that could help fixing the problem..
Comment 6 Martin Jürgens 2008-09-03 13:45:33 UTC
Also I found this:

received: A00010 OK FETCH completed.

sending : A00011 UID FETCH 70071:* (FLAGS RFC822.SIZE INTERNALDATE BODY.PEEK[HEADER.FIELDS (DATE FROM TO CC SUBJECT REFERENCES IN-REPLY-TO MESSAGE-ID MIME-VERSION CONTENT-TYPE X-MAILING-LIST X-LOOP LIST-ID LIST-POST MAILING-LIST ORIGINATOR X-LIST SENDER RETURN-PATH X-BEENTHERE)])

received: * 12359 FETCH (UID 70071 FLAGS ()   )


(evolution:3780): camel-imap-provider-WARNING **: Unexpected FETCH response from server: (  )
received: * NO Cannot open message 12359

Comment 7 Martin Jürgens 2008-09-03 13:51:11 UTC
I now solved my problem (The IMAP server is a Courier server):

I copied a mail which was stored in someone's other mailbox to my mailbox. Because of this I was not mentioned in that mail.

Thunderbird seems to just have ignored that mail, at least the mail did not appear in it. 

Evolution in contrast did not ignore thatmail and just stopped working.

Here's some information on how I found which mail caused the issue: First I deleted the file courierimapuiddb in the mailbox. Then I started Evolution, looked at the number which is displayed besides of the error and searched for it in the file courierimapuiddb. It contains the filename of the mail in the cur folder so you know what mail you have to delete.

I can try to reproduce the problem with a seperate email account so if an Evolution developer is interested in getting the account data, just ask.
Comment 8 Jeffrey Stedfast 2008-09-03 14:59:42 UTC
this is a courier imap bug, imap servers are not allowed to tell a client that a message exists if the server cannot open the message.

I've discussed this with the author of the imap specification and he has told me that courier imap is broken in this way and in a lot of other ways.

please complain loudly to the courier imap authors until they fix this long-lasting bug that has been going on for over 8 years.
Comment 9 Milan Crha 2008-09-03 15:14:27 UTC
Hi Jeff, and could we cope with this "properly" in Evolution, say at least as good as TB, thus not scream into the darkness and give up on the first problem, but keep going as long as we are able to?
Comment 10 Jeffrey Stedfast 2008-09-03 15:24:01 UTC
not easily, no, because Evolution depends on the summary being accurate to properly handle EXPUNGE notifications, etc. If the summary from the server is incorrect, it becomes difficult to properly track these things.

The problem is that all you have for that message is the sequence id, but evolution tracks messages based on uid. since you can't get the uid, you're screwed.
Comment 11 Milan Crha 2008-09-03 17:05:04 UTC
Created attachment 117944 [details] [review]
proposed eds patch

for evolution-data-server;

I know what you mean, Jeff, the error will be shown "forever" now on, but there is no need to stop showing properly downloaded messages from the server in the UI only because something was wrong with some preceding message. It should be better to show user as much as we can and then report the error. Which is, in my opinion, better way than with TB, which just stay calm. I know there is no way to user to fix in from evo, but it's better than actual behavior.

If you look into the patch, then I hope you'll agree that the fix in this part should not hurt. Do you think it should?
Comment 12 Jeffrey Stedfast 2008-09-03 18:57:39 UTC
If a user has this problem with your patch then his summary info will be out of sync with what the server's summary and so message indexes will not match up.

You can't ignore these bad responses from the server because these messages have uids on the server, it's just that the server won't tell us what the uids are.

the best you can do in this situation is to ignore all messages with a seq-id >= to the seq-id provided in the bad response (remember that the server need not respond in sequential order).
Comment 13 Srinivasa Ragavan 2008-09-07 15:46:05 UTC
Fejj, Are there any issues that you foresee due to the mismatch of sequences?

Comment 14 Milan Crha 2008-09-09 10:20:13 UTC
As far as I can tell, I believe this could not hurt. I do not know what exactly Jeff means with the sequence numbers, but in the place where I made the change has this thing no meaning, there are only message infos and uids.

If Jeff means problems with ranges when calling get_matching function, then this one has been fixed recently, after db-summary, to behave correctly in bug #545103.
Comment 15 Srinivasa Ragavan 2008-09-30 18:12:58 UTC
Fejj, what are your thoughts? Are there any issues  you forsee ?
Comment 16 Srinivasa Ragavan 2008-12-10 08:51:34 UTC
Fejj, we don't add that to the system and we just handle it before it. But I get your point.

Milan, imap_rescan would actually delete rest of the message/summary on the db, beyond this uid/sequence.

Consider...

Server CLIENT
1       1
2       2
3[P]    4
4       5
5       6

'3' is the problematic thing that we have on the server. We compare always cache against server. Since 4 != 3, we dete 4, 5, 6.. etc trying to find '3 there. So, it might mean that we redownload all the summary for him. We problably look at a more optimized solution, or rewrite imap_rescan to deal such things.
Comment 17 Milan Crha 2008-12-10 11:50:28 UTC
(In reply to comment #16)
> ...snip...

I'm sorry, I didn't get it.

When I look into 'add_message_from_data' then the 'messages' array is always resized based on the sequence number, which means it can do NULL gaps, which is probably our case. In your example above, it tried to create with message 4 on the server (with sequence number 4, I guess) array of size 4, but before it had only size 2.

When looking around, I think near line 3391 in camel-imap-folder.c (in my revision 9821), if messages->pdata[seq - first] is NULL, then at the end is created a clone of some previous message info. We should assign this pmi to the messages->pdata[seq - first] probably, to have it accessible later, in the function which I touched in the patch.

But, it'll show definitely wrong mail in there, thus it's probably irrelevant.

Summarized, I do not think the patch is so wrong, neither I see any change in imap_rescan which would help here. I'm missing here something, obviously.
Comment 18 Milan Crha 2009-04-07 15:02:22 UTC
srag/jeff ping?
Comment 19 Srinivasa Ragavan 2009-04-08 05:38:01 UTC
Milan, Ill try to recollect. 

THe point is not this iteration. In next start, we would endup in a different cache line up wrt uids. Which would end up with the uids to be deleted on the cache. 
Comment 20 Milan Crha 2009-04-08 09:37:56 UTC
Looking into place of the change in the above patch, I guess your presumption of client side is incorrect. The client has stored '3' in its cache, that's the reason why the request for a detailed information fails. Doing neither 'break' nor 'continue' removes anything from the cache in a place of the change.

I still feel like missing something here, though.
Comment 21 Milan Crha 2009-06-17 17:08:30 UTC
I'm not sure if I can ping srag again. This bug makes me feel silly.
Comment 22 Akhil Laddha 2009-10-01 07:31:10 UTC
bug 575923 is dupe ?
Comment 23 Milan Crha 2009-10-01 08:41:32 UTC
(In reply to comment #22)
> bug 575923 is dupe ?

Sounds different from me.
Comment 24 André Klapper 2012-06-18 10:31:52 UTC
Hi Martin, 
if you have time, could you please check again whether this issue still happens in Evolution 3.4.2 or 3.2.3 and update this report by adding a comment and changing the "Version" field and provide information about your distribution? Thanks a lot.
Comment 25 André Klapper 2013-08-24 15:03:19 UTC
Hi Martin, 
if you have time, could you please check again whether this issue still happens in Evolution 3.8.5 or 3.6.4 and update this report by adding a comment and changing the "Version" field and provide information about your distribution? Thanks a lot.
Comment 26 André Klapper 2014-02-23 14:53:49 UTC
No reply by reporter & IMAP backend has been rewritten in the meantime. Please reopen if this is still a problem in 3.10 or newer.