[Users] [Bug 3902] UI deadlock when trying to exit

noreply at thewildbeast.co.uk noreply at thewildbeast.co.uk
Tue Dec 19 20:11:53 CET 2017


http://www.thewildbeast.co.uk/claws-mail/bugzilla/show_bug.cgi?id=3902

--- Comment #2 from Kostya Vasilyev <kmansoft at gmail.com> ---
OK it happened again and I was running with --debug in the terminal.

I was writing a message (draft) not sure if I'd hit Send yet or not, but:

Claws went into a loop trying to fetch a bunch of non-existent messages from
the "Queue" folder:

imap.c:1554:trying to fetch cached
/home/kman/.claws-mail/imapcache/mail.mobisystems.com/support at aqua-mail.com/INBOX/Queue/12993
imap.c:1600:getting session...
imap.c:529:locking session 0x55ef7b361be0 (0)
imap.c:1610:IMAP fetching messages
imap.c:1621:getting message 12993...
imap-thread.c:2595:imap fetch_content - begin
imap-thread.c:372:found imap 0x55ef7b2cad40
imap-thread.c:372:found imap 0x55ef7b2cad40
[21:57:25] IMAP> 4651 UID FETCH 12993 BODY.PEEK[] 
[21:57:25] IMAP< [data - 47 bytes]
imap-thread.c:2584:imap fetch_content run - end 25
imap-thread.c:388:generic_cb
imap-thread.c:372:found imap 0x55ef7b2cad40

** (claws-mail:16534): WARNING **: [21:57:25] IMAP error on
mail.mobisystems.com: FETCH error

imap.c:542:unlocking session 0x55ef7b361be0
imap.c:4324:fetch err 25

(claws-mail:16534): Claws-Mail-WARNING **: can't fetch message 12993

where the message's UID would increment and increment and increment.

The loop finished when the UID reached 13054 (doesn't seem special in any
way...) and the UI un-froze.

The server's Inbox.Queue folder never has this many messages, usually just a
few at most.

While Claws was looping, I connected to the server using openssl and checked
Inbox.Queue - it had zero messages.

---
k2 select Inbox.Queue
* OK [CLOSED] Previous mailbox closed.
* FLAGS (\Answered \Flagged \Deleted \Seen \Draft)
* OK [PERMANENTFLAGS (\Answered \Flagged \Deleted \Seen \Draft \*)] Flags
permitted.
* 0 EXISTS
* 0 RECENT
* OK [UIDVALIDITY 1478516821] UIDs valid
* OK [UIDNEXT 1885] Predicted next UID
k2 OK [READ-WRITE] Select completed (0.001 + 0.000 secs).
---

Looking at the log file, looks like the issue started out like this:

---
[21:51:41] IMAP> 601 SELECT "INBOX.Queue" 
[21:51:41] IMAP< * OK [CLOSED] Previous mailbox closed. 
[21:51:41] IMAP< * FLAGS (\Answered \Flagged \Deleted \Seen \Draft) 
[21:51:41] IMAP< * OK [PERMANENTFLAGS (\Answered \Flagged \Deleted \Seen \Draft
\*)] Flags permitted. 
[21:51:41] IMAP< * 0 EXISTS 
[21:51:41] IMAP< * 0 RECENT 
[21:51:41] IMAP< * OK [UIDVALIDITY 1478516821] UIDs valid 
[21:51:41] IMAP< * OK [UIDNEXT 1884] Predicted next UID 
[21:51:41] IMAP< 601 OK [READ-WRITE] Select completed (0.001 + 0.000 secs). 
[21:51:41] IMAP> 602 UID FETCH 6036 BODY.PEEK[] 
[21:51:42] IMAP< [data - 46 bytes]
[21:51:42] ** warning: IMAP error on mail.mobisystems.com: FETCH error
[21:51:42] IMAP> 603 UID FETCH 6038 BODY.PEEK[] 
[21:51:42] IMAP< [data - 46 bytes]
[21:51:42] ** warning: IMAP error on mail.mobisystems.com: FETCH error
[21:51:42] IMAP> 604 UID FETCH 6039 BODY.PEEK[] 
[21:51:42] IMAP< [data - 46 bytes]
[21:51:42] ** warning: IMAP error on mail.mobisystems.com: FETCH error
[21:51:42] IMAP> 605 UID FETCH 6040 BODY.PEEK[] 
[21:51:42] IMAP< [data - 46 bytes]
[21:51:42] ** warning: IMAP error on mail.mobisystems.com: FETCH error
[21:51:42] IMAP> 606 UID FETCH 6042 BODY.PEEK[] 
[21:51:42] IMAP< [data - 46 bytes]
[21:51:42] ** warning: IMAP error on mail.mobisystems.com: FETCH error
[21:51:42] IMAP> 607 UID FETCH 6044 BODY.PEEK[] 
[21:51:42] IMAP< [data - 46 bytes]
[21:51:42] ** warning: IMAP error on mail.mobisystems.com: FETCH error
---

1 - Given the "UIDNEXT 1885" for Inbox.Queue (above), there hasn't yet been a
message with UID 6036 and trying to fetch it (command 602) would of course
fail. So looks like Claws somehow comes up with a completely invalid UID for a
message in Inbox.Queue.

2 - Trying to rescue the IMAP session by fetching 12000 messages with ever
increasing UID's seems questionable to me (what is that supposed to do)?

3 - And then that UI is "half-frozen" as this "rescue attempt" is ongoing seems
weird to me too.

( sorry if comments are "too technical" - I have some experience with IMAP as a
developer, but don't mean to assume or impose )

-- 
You are receiving this mail because:
You are the assignee for the bug.



More information about the Users mailing list