Gnus development mailing list
 help / color / mirror / Atom feed
From: gallego@cri.ensmp.fr (Emilio Jesús Gallego Arias)
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: ding@gnus.org
Subject: Re: duplicates with offlineimap+dovecot
Date: Sun, 14 Feb 2016 05:05:38 +0100	[thread overview]
Message-ID: <87k2m8ndgt.fsf@cri.ensmp.fr> (raw)
In-Reply-To: <87io1sdnpt.fsf@gnus.org> (Lars Ingebrigtsen's message of "Sun, 14 Feb 2016 13:34:22 +1100")

Hi Lars,

Lars Ingebrigtsen <larsi@gnus.org> writes:

> gallego@cri.ensmp.fr (Emilio Jes?FFFAs Gallego Arias) writes:
>
>>> *first press of g*
>>> 21:02:59 [domain] 9020 UID MOVE 4063:4064,4067,4069:4072 "folder1"
>>> * OK [COPYUID 1424475231 4063:4064,4067,4069:4072 26:32] Moved UIDs.
>>> * VANISHED 4062,4066,4068:4072
>>> * 3 RECENT
>>> 9020 OK [HIGHESTMODSEQ 5193] Move completed.
>>
>> I interpret this as "only 4062,4066,4068:4072" got moved.
>
> I can't find anything in the IMAP MOVE standard that says something like
> that.  And it only talks about having to be careful about streaming
> other commands after MOVE as a MOVE may lead to articles being
> renumbered.  And the VANISHED stuff is from unrelated QRESYNC support,
> if I'm reading the QRESYNC RFC correctly.

Note that gnus is currently streaming MOVE commands, however I'm not
sure the RFC means to allow this.

> And, as you see from the VANISHED above there, most of the stuff it says
> is vanished is stuff that we're not even trying to move (4062, 4066).

I'm sorry, I trimmed too much of the log, if you look at my previous
mail you'll see:

> 9019 UID MOVE 4062,4066,4068 "unrelated2"
> 9020 UID MOVE 4063:4064,4067,4069:4072 "folder1"
> * OK [COPYUID 1424475218 4062,4066,4068 376:378] Moved UIDs.
> * OK [COPYUID 1424475231 4063:4064,4067,4069:4072 26:32] Moved UIDs.
> * VANISHED 4062,4066,4068:4072

Thus yeah, we ordered the move of 4062, etc... and the server:

 a) confirms the move for all the messages.
 b) doesn't confirm the expunge from INBOX for all of them!

Thus, it is clear that 4063 was moved but not expunged from the mailbox;
hence the duplicated msg...

> So I don't know what's going on on the server...

I have no clue either but the server is a 100% vanilla Debian Dovecot. I
have this problem with several other servers not administered by me so
if there's a server problem here is not only on my server.

After some more experiments, I believe the bug can be reproduced as
follows: install a Debian stable with Dovecot, then have Gnus to issue
multiple (pipelined) MOVE commands with QRESYNC enabled.

I'd be happy to get in touch with dovecot upstream if we deem it OK.

Regarding the log, note that the RFC says:

   Because a MOVE applies to a set of messages, it might fail partway
   through the set.  Regardless of whether the command is successful in
   moving the entire set, each individual message SHOULD either be moved
   or unaffected.  The server MUST leave each message in a state where
                              ^^^^
   it is in at least one of the source or target mailboxes (no message
   can be lost or orphaned).  The server SHOULD NOT leave any message in
                                         ^^^^^^^^^^
   both mailboxes (it would be bad for a partial failure to result in a
   bunch of duplicate messages).  This is true even if the server
   returns a tagged NO response to the command.

So Dovecot here appears to be violating the "SHOULD NOT"; it effectively
leaves the message in the two mailboxes (even if it notifies us that it
was not VANISHED from INBOX). However:

> RFC6851:

> The server may send EXPUNGE (or VANISHED) responses before the tagged
> response, so the client cannot safely send more commands with message
> sequence number arguments while the server is processing MOVE or UID
> MOVE.

Doesn't that mean that gnus should not stream the two MOVES?

Thanks again for the help!
Regards,
E.



  reply	other threads:[~2016-02-14  4:05 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-01 17:31 Julien Cubizolles
2016-02-01 22:34 ` Malcolm Purvis
2016-02-02  8:49   ` Julien Cubizolles
2016-02-09 11:05   ` Emilio Jesús Gallego Arias
2016-02-09 23:42     ` Lars Ingebrigtsen
2016-02-10  1:17       ` Emilio Jesús Gallego Arias
2016-02-10  2:56         ` Lars Ingebrigtsen
2016-02-10 22:18           ` Emilio Jesús Gallego Arias
2016-02-10 23:56             ` Emilio Jesús Gallego Arias
2016-02-13  6:52               ` Lars Ingebrigtsen
2016-02-13 14:03             ` Emilio Jesús Gallego Arias
2016-02-14  2:34               ` Lars Ingebrigtsen
2016-02-14  4:05                 ` Emilio Jesús Gallego Arias [this message]
2016-02-14  4:36                   ` Lars Ingebrigtsen
2016-02-14  4:56                     ` Emilio Jesús Gallego Arias
2016-02-14  5:23                       ` Lars Ingebrigtsen
2016-02-14 12:19                         ` Emilio Jesús Gallego Arias
2016-02-15  7:54                           ` Lars Ingebrigtsen
2016-02-20  7:52                             ` Steinar Bang
2016-02-20  8:21                               ` Lars Ingebrigtsen
2016-02-20 14:47                                 ` Steinar Bang
2016-02-22 23:12                                 ` Emilio Jesús Gallego Arias
2016-02-23  0:58                                   ` Lars Ingebrigtsen
2016-02-23 18:54                                     ` Emilio Jesús Gallego Arias
2016-02-23 22:05                                       ` Dan Christensen
2016-02-24  1:10                                         ` Lars Ingebrigtsen
2016-02-24  1:11                                       ` Lars Ingebrigtsen
2016-02-24 17:59                                         ` Emilio Jesús Gallego Arias
2016-02-01 22:40 ` Dave Abrahams

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87k2m8ndgt.fsf@cri.ensmp.fr \
    --to=gallego@cri.ensmp.fr \
    --cc=ding@gnus.org \
    --cc=larsi@gnus.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).