Bug 320713 - BAD response to SELECT is not reported to the user in a clear way
Summary: BAD response to SELECT is not reported to the user in a clear way
Status: RESOLVED FIXED
Alias: None
Product: trojita
Classification: Unmaintained
Component: IMAP (show other bugs)
Version: 0.3.93
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Trojita default assignee
URL: http://bugzilla.zimbra.com/show_bug.c...
Keywords:
Depends on:
Blocks:
 
Reported: 2013-06-04 12:37 UTC by kavol
Modified: 2014-03-16 17:56 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description kavol 2013-06-04 12:37:22 UTC
for some reason, Trojitá stopped loading new messages - I mean both displaying heads that were not downloaded yet, and bodies for those which have the head displayed already, after clicking on it

I believe this is the interesting part of the log:

14:28:02.644 Imap::Mailbox::ObtainSynchronizedMailboxTask STATE_SELECTING INBOX Synchronizing mailbox
14:28:02.671 >>> y33 SELECT INBOX (QRESYNC (1 3121164 (353,530,619,663,685,696,702,705 472104,571247,609992,622028,630531,633428,634703,635262)))␍␊
14:28:02.892 <<< * 704 EXISTS␍␊
14:28:02.892 <<< * 0 RECENT␍␊
14:28:02.892 <<< * OK [UNSEEN 599] mailbox contains unseen messages␍␊
14:28:02.892 <<< * OK [UIDVALIDITY 1] UIDs are valid for this mailbox␍␊
14:28:02.892 <<< * OK [UIDNEXT 635263] next expected UID is 635263␍␊
14:28:02.892 <<< * FLAGS (\Answered \Deleted \Draft \Flagged \Seen $Forwarded $MDNSent Forwarded $Junk $NotJunk Junk JunkRecorded NonJunk NotJunk $REPLIED $ATTACHMENT)␍␊
14:28:02.892 <<< * OK [PERMANENTFLAGS (\Answered \Deleted \Draft \Flagged \Seen $Forwarded $MDNSent Forwarded $REPLIED $ATTACHMENT \*)] junk-related flags are not permanent␍␊
14:28:02.893 <<< * OK [HIGHESTMODSEQ 3121167] modseq tracked on this mailbox␍␊
14:28:02.893 <<< y33 BAD parse error: invalid message sequence number: 353,530,619,663,685,696,702,705␍␊
14:28:02.893 Model BAD response: y33 BAD parse error: invalid message sequence number: 353,530,619,663,685,696,702,705
14:28:02.893 Imap::Mailbox::KeepMailboxOpenTask attached to INBOX Failed: Asked to die
14:28:02.893 Imap::Mailbox::ObtainSynchronizedMailboxTask STATE_SELECTING INBOX Failed: SELECT failed

removing the cache:
rm ~/.cache/flaska.net/trojita/imap.cache.sqlite
seems to fix the issue
Comment 1 Jan Kundrát 2013-06-04 12:54:04 UTC
OK, there's a bug in Trojita that it doesn't show this to the user in a clear way.

That said, what we're sending is completely valid. The Zimbra's IMAP implementation is totally broken here -- this is something which simply MUST work or QRESYNC should definitely not be advertised. Someone from RH already added a hack to Evolution which will limit the probability that this is triggered, see the Zimbra's report [1].

You can add QRESYNC to the extension blacklist until they fix their IMAP implementation.

[1] http://bugzilla.zimbra.com/show_bug.cgi?id=82493
Comment 2 Jan Kundrát 2014-03-16 17:30:46 UTC
Git commit 94746e8cbd52ae68137e913feda2439882bf1a72 by Jan Kundrát.
Committed on 15/03/2014 at 19:41.
Pushed by jkt into branch 'master'.

IMAP: do not leave lingering tasks behind when mailbox syncing fails

When the ObtainSynchronizedMailboxTask failed, the waiting KeepMailboxOpenTask
would not unregister itself from the Parser's maintainingTask, and therefore
further tasks kept getting queued "behind" this KeepMailboxOpenTask which stuck
for all practical purposes.

This does not fix #320713 (no UI popup is shown), but at least it makes sure
that further activity can be resumed. A proper indication should be added,
definitely.

M  +4    -3    src/Imap/Tasks/KeepMailboxOpenTask.cpp
M  +57   -0    tests/Imap/test_Imap_Tasks_ObtainSynchronizedMailbox.cpp
M  +2    -0    tests/Imap/test_Imap_Tasks_ObtainSynchronizedMailbox.h
M  +9    -0    tests/Utils/LibMailboxSync.cpp
M  +1    -0    tests/Utils/LibMailboxSync.h

http://commits.kde.org/trojita/94746e8cbd52ae68137e913feda2439882bf1a72
Comment 3 Jan Kundrát 2014-03-16 17:30:47 UTC
Git commit 3eddb2c05cca716d01b554744fa5e0605113e849 by Jan Kundrát.
Committed on 16/03/2014 at 00:14.
Pushed by jkt into branch 'master'.

IMAP: better error handling for further arrivals after initial sync

M  +3    -5    src/Imap/Tasks/KeepMailboxOpenTask.cpp

http://commits.kde.org/trojita/3eddb2c05cca716d01b554744fa5e0605113e849
Comment 4 Jan Kundrát 2014-03-16 17:56:56 UTC
Git commit e5ad4773eb7a8a66dd5f3ef906c03f7e21b4539c by Jan Kundrát.
Committed on 16/03/2014 at 17:26.
Pushed by jkt into branch 'master'.

Merge branch 'bug-320713'
REVIEW: 116834

M  +2    -0    src/Imap/Model/Model.h

http://commits.kde.org/trojita/e5ad4773eb7a8a66dd5f3ef906c03f7e21b4539c