Closed Bug 1796903 Opened 2 years ago Closed 2 years ago

107.0b1 ignores POP3 message UIDL - messages are being downloaded twice or more times - once a message is deleted

Categories

(MailNews Core :: Networking: POP, defect, P1)

Thunderbird 107

Tracking

(thunderbird_esr102 fixed, thunderbird107 fixed)

RESOLVED FIXED
108 Branch
Tracking Status
thunderbird_esr102 --- fixed
thunderbird107 --- fixed

People

(Reporter: office, Assigned: mkmelin)

References

(Regression)

Details

(Keywords: regression)

Attachments

(1 file)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:106.0) Gecko/20100101 Firefox/106.0

Steps to reproduce:

Get new messages from POP3 server. (TB 107.0b1)

Actual results:

C: STAT
S: +OK 5 125062
C: LIST
S: +OK 5 (125062 octets)
S: 1 29006
S: 2 20564
S: 3 28498
S: 4 28466
S: 5 18528
S: .
C: UIDL
S: +OK Unique-ID listing follows:
S: 1 221009.024604.MTY2NTI3Mjc2NDE5MjEyOTYyNQ00
S: 2 221011.004122.MTY2NTQzODA4MjU3NDM3MjU3Mg00
S: 3 221013.101620.MTY2NTY0NTM4MDkyOTY1NDU5OA00
S: 4 221019.063233.MTY2NjE1MDM1MzY3NzE1OTMzNg00
S: 5 221020.190647.MTY2NjI4MjAwNzg1Mzg3MDEwNA00
S: .

All those messages with Unique-IDs above are already in TB database. But TB issuing commands:

C: RETR 1
then
C: RETR 2
and so on.

Expected results:

Message with same UIDL should be not downloaded.

Component: Untriaged → Networking: POP
Product: Thunderbird → MailNews Core

This happens after some message was deleted.

Which settings do you have for leave on server?
I don't seem to reproduce.

Please also attach the full protocol log so we can see more details of what's going on.

Leave on server for example 15 days. As you can see from example - there are 5 messages at server. If you click "Download messages" - all will be downloaded. Click again - no messages will be downloaded. But if you delete for example the last message from TB (#5) - and again click "Download messages" - all 5, that is #1, #2, #3, #4 and #5 will be downloaded again. Means I will have duplicate messages in TB (I can see in "Mail" file these duplicate messages with the same UIDL).. So at the moment I'm afraid to delete some messages, downloaded hundreds of duplicate messages already...

I can confirm this with:

[X] Leave messages on server
[X] Until I delete them

If I delete a single message from Inbox, TB removes all UIDLs from the popstate.dat file.

This will of course reload all mails the next time they are retrieved.

Status: UNCONFIRMED → NEW
Ever confirmed: true

Ok, I see it now, the until i delete them has to be set.
Backing out bug 1793374 - https://hg.mozilla.org/comm-central/rev/25d39f4c728c - fixes it

Keywords: regression
Regressed by: 1793374
Summary: TB ignores POP3 message UIDL - messages are being downloaded twice or more times → TB ignores POP3 message UIDL - messages are being downloaded twice or more times - if delete from server is set

We're spinning the event loop in markMessages() waiting for _uidlMap to be set. But inside _loadUidlState there is internal waiting after _uidlMap is set.
Set _uidlMap late enough that there won't be any internal async functionality after it.

Assignee: nobody → mkmelin+mozilla
Status: NEW → ASSIGNED
Priority: -- → P1
Target Milestone: --- → 108 Branch

Pushed by mkmelin@iki.fi:
https://hg.mozilla.org/comm-central/rev/1ade14d4caa0
TB ignores POP3 message UIDL - messages are being downloaded twice or more times - if delete from server is set. r=rnons

Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED

Comment on attachment 9299805 [details]
Bug 1796903 - TB ignores POP3 message UIDL - messages are being downloaded twice or more times - if delete from server is set. r=rnons

[Triage Comment]
Approved for beta per wsmwk via Matrix.

Attachment #9299805 - Flags: approval-comm-beta+
Summary: TB ignores POP3 message UIDL - messages are being downloaded twice or more times - if delete from server is set → 107.0b1 ignores POP3 message UIDL - messages are being downloaded twice or more times - once a message is deleted

This bug is only partially resolved.

I've downloaded the latest version: 107.0b2 (32 bit).

When I've deleted an email, it removes it from the the inbox window pane. It doesn't seem to move it to trash.

Then, it re-downloads, but now it only pulls the item(s) I have just deleted - not the last 500 messages as it previously did.There is only 1 copy of the deleted item, it doesn't pull multiple copies. So if I delete it, it's gone, it downloads again - and then it stops unless I try to delete again.

There is no copy in the trash folder.

I have selected to leave messages on server until I delete them.

(In reply to Uri Estrin from comment #16)

This bug is only partially resolved.

I've downloaded the latest version: 107.0b2 (32 bit).

When I've deleted an email, it removes it from the the inbox window pane. It doesn't seem to move it to trash.

Then, it re-downloads, but now it only pulls the item(s) I have just deleted - not the last 500 messages as it previously did.There is only 1 copy of the deleted item, it doesn't pull multiple copies. So if I delete it, it's gone, it downloads again - and then it stops unless I try to delete again.

There is no copy in the trash folder.

I have selected to leave messages on server until I delete them.

CORRECTION:::

the messages are being moved to trash - and then downloading again

I don't see that. Please file a new bug and attach pop3 logs.

bug 1793374 comment 3 requests that this be uplifted to 102

Flags: needinfo?(mkmelin+mozilla)

Comment on attachment 9299805 [details]
Bug 1796903 - TB ignores POP3 message UIDL - messages are being downloaded twice or more times - if delete from server is set. r=rnons

[Approval Request Comment]
Regression caused by (bug #): bug 1793374
User impact if declined: duplicate downloads
Testing completed (on c-c, etc.): c-c, beta
Risk to taking this patch (and alternatives if risky): needed for bug 1793374. No risk in itself.

Flags: needinfo?(mkmelin+mozilla)
Attachment #9299805 - Flags: approval-comm-esr102?

Comment on attachment 9299805 [details]
Bug 1796903 - TB ignores POP3 message UIDL - messages are being downloaded twice or more times - if delete from server is set. r=rnons

[Triage Comment]
Approved for esr102

Attachment #9299805 - Flags: approval-comm-esr102? → approval-comm-esr102+

(In reply to Wayne Mery (:wsmwk) from comment #21)

Comment on attachment 9299805 [details]
Bug 1796903 - TB ignores POP3 message UIDL - messages are being downloaded twice or more times - if delete from server is set. r=rnons

[Triage Comment]
Approved for esr102

So TB102.* is affected after all?
Then Bug 1798300 is likely to be a dupe of this.

Duplicate of this bug: 1797508
Duplicate of this bug: 1794611
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: