VM

IMAP headers-only mode fails after copy

Bug #507421 reported by Uday Reddy
4
This bug affects 1 person
Affects Status Importance Assigned to Milestone
VM
Fix Released
Low
Uday Reddy

Bug Description

It appears that after doing vm-save-message-to-imap-folder, the IMAP session is not in a 'valid' state. Subsequent IMAP session interactions possibly lead to assertion failure. A backtrace when using headers-only mode is attached. The trace buffer shows:

starting IMAP session Thu Jan 14 10:22:42 2010
connecting to localhost:143
connected
* OK IMAP4 Ready imap 0001cdf3
VM CAPABILITY
* CAPABILITY IMAP4 IMAP4REV1
VM OK CAPABILITY
VM LOGIN <parameters omitted>
VM OK Logged in.
VM SELECT "INBOX"
* FLAGS (\Answered \Flagged \Deleted \Seen \Draft forwarded filed redistributed ! $Forwarded 7350 7354 7391 signed * accept action plagiarism Junk NonJunk)
* OK [PERMANENTFLAGS (\Answered \Flagged \Deleted \Seen \Draft forwarded filed redistributed ! $Forwarded 7350 7354 7391 signed * accept action plagiarism Junk NonJunk \*)] Flags permitted.
* 2357 EXISTS
* 0 RECENT
* OK [UIDVALIDITY 1217243146] UIDs valid
* OK [UIDNEXT 20443] Predicted next UID
VM OK [READ-WRITE] Select completed.
VM FETCH 1:2357 (UID RFC822.SIZE FLAGS)
* 1 FETCH (UID 13893 RFC822.SIZE 3501 FLAGS (\Seen filed))
* 2357 FETCH (UID 20442 RFC822.SIZE 8280 FLAGS ())
VM OK Fetch completed.
VM FETCH 2335:2335 (RFC822.SIZE)
* 2335 FETCH (RFC822.SIZE 7217)
VM OK Fetch completed.
VM FETCH 2335:2344 (BODY.PEEK[HEADER])
* 2335 FETCH (BODY[HEADER] {5134}
VM OK Fetch completed.
VM FETCH 2345:2345 (RFC822.SIZE)
* 2345 FETCH (RFC822.SIZE 8211)
VM OK Fetch completed.
VM FETCH 2345:2354 (BODY.PEEK[HEADER])
* 2345 FETCH (BODY[HEADER] {5187}
)
* 2346 FETCH (BODY[HEADER] {2897}
)
* 2347 FETCH (BODY[HEADER] {3617}
)
* 2348 FETCH (BODY[HEADER] {4124}
)
* 2349 FETCH (BODY[HEADER] {6041}
)
* 2350 FETCH (BODY[HEADER] {3403}
)
* 2351 FETCH (BODY[HEADER] {2634}
)
* 2352 FETCH (BODY[HEADER] {5836}
)
* 2353 FETCH (BODY[HEADER] {4706}
)
* 2354 FETCH (BODY[HEADER] {3870}
)
VM OK Fetch completed.
VM FETCH 2355:2355 (RFC822.SIZE)
* 2355 FETCH (RFC822.SIZE 11570)
VM OK Fetch completed.
VM FETCH 2355:2357 (BODY.PEEK[HEADER])
* 2355 FETCH (BODY[HEADER] {5568}
)
* 2356 FETCH (BODY[HEADER] {2686}
)
* 2357 FETCH (BODY[HEADER] {5004}
)
VM OK Fetch completed.
VM FETCH 2335:2335 (BODY.PEEK[])
* 2335 FETCH (BODY[] {7217}
)
VM OK Fetch completed.
VM UID COPY 20420 "test-imap"
VM OK Copy completed.
VM UID STORE 20420 +FLAGS.SILENT (\deleted filed)
VM OK Store completed.
VM UID COPY 20420 "test-imap"
VM OK Copy completed.

Tags: imap

Related branches

Revision history for this message
Uday Reddy (reddyuday) wrote :
Changed in vm:
status: New → Confirmed
importance: Undecided → Low
assignee: nobody → Uday Reddy (reddyuday)
tags: added: imap
Revision history for this message
Uday Reddy (reddyuday) wrote :

The problem is that COPY commands can generate untagged EXPUNGE responses. So, the message sequence numbers are not valid any more. So, the IMAP session is not in a valid state.

Perhaps, FETCH can be done using UID's instead of message sequence numbers?

Revision history for this message
Uday Reddy (reddyuday) wrote :

vm-fetch-imap-message modified to use UID's. This should solve the problem.

To-be-done: Clean up the function getting rid of the old message-num stuff. Test it.

Changed in vm:
status: Confirmed → In Progress
Revision history for this message
Uday Reddy (reddyuday) wrote :

Because UID FETCH may invalidate sequence numbers, the sequence numbers should be dumped.

summary: - IMAP assertion failure after copy
+ IMAP headers-only mode fails after copy
Uday Reddy (reddyuday)
Changed in vm:
milestone: none → 8.1.1-devo
status: In Progress → Fix Committed
Uday Reddy (reddyuday)
Changed in vm:
milestone: 8.2.0-devo → 8.1.90a
Uday Reddy (reddyuday)
Changed in vm:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.