move/copying multiple local messages moved by incoming filters leads to corruption

RESOLVED FIXED in Thunderbird 14.0

Status

MailNews Core
Backend
--
critical
RESOLVED FIXED
6 years ago
5 years ago

People

(Reporter: Bienvenu, Assigned: Bienvenu)

Tracking

({dataloss})

Trunk
Thunderbird 14.0
dataloss
Bug Flags:
in-testsuite +

Thunderbird Tracking Flags

(thunderbird12+ fixed, thunderbird13+ fixed)

Details

Attachments

(1 attachment)

(Assignee)

Description

6 years ago
Created attachment 606642 [details] [diff] [review]
proposed fix

if a pop3 incoming mail filters moves messages to a folder, and then those same messages are move/copied to an other folder, the resulting messages will be corrupted. This is because the pop3 incoming msg filter move action auto-assigns the message key instead of using the offset into the folder. Then, the multiple message move copy code still thinks messages keys are the offset into the message folder.

The fix is to make the multiple message move/copy code use the message offset, the way the single message move code does. And I've extended a unit test to include a test for this bug.

We will want this fix for aurora and beta channels as soon as possible because it does cause data corruption.
Attachment #606642 - Flags: review?(mbanner)
Severity: normal → critical
Keywords: dataloss
Comment on attachment 606642 [details] [diff] [review]
proposed fix

Review of attachment 606642 [details] [diff] [review]:
-----------------------------------------------------------------

::: mailnews/local/src/nsMailboxProtocol.cpp
@@ +185,1 @@
>          NS_ASSERTION(NS_SUCCEEDED(rv), "oops....i messed something up");

You can drop this line as well.
Attachment #606642 - Flags: review?(mbanner) → review+
tracking-thunderbird12: --- → +
tracking-thunderbird13: --- → +
Comment on attachment 606642 [details] [diff] [review]
proposed fix

[Triage Comment]
I assume this is fallout from the pluggable stores change, if so a=me for both channels.
Attachment #606642 - Flags: approval-comm-beta+
Attachment #606642 - Flags: approval-comm-aurora+
(Assignee)

Comment 3

6 years ago
fixed on trunk - http://hg.mozilla.org/comm-central/rev/82ca6e424d5c

yes, this is fallout from pluggable stores. The other fix would be to make the berkeley mailbox store implement MoveNewlyDownloadedMessage and set the message key to the dest file size, which would maintain compatibility with prev versions of Thunderbird, but this still fix would still be required for folders > 4GB and for correctnesss in general. I'll transplant the patch to the other two branches this morning.
Status: NEW → RESOLVED
Last Resolved: 6 years ago
Flags: in-testsuite+
OS: Windows 7 → All
Hardware: x86_64 → All
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 14.0
(Assignee)

Comment 4

6 years ago
landed on aurora and beta channels
http://hg.mozilla.org/releases/comm-aurora/rev/2f4f201075bd
http://hg.mozilla.org/releases/comm-beta/rev/be8909bb020b
status-thunderbird12: --- → fixed
status-thunderbird13: --- → fixed

Comment 5

5 years ago
I know this bug is listed as fixed in the release notes for Thunderbird12, but I am running 12.0 and still seeing emails get corrupted.  When messages are filtered into folders, occasionally two emails will get combined into one.  Do I need to upgrade to a later version of 12, or is this not really fixed in 12?
(Assignee)

Comment 6

5 years ago
(In reply to Tyler Schoenke from comment #5)
> I know this bug is listed as fixed in the release notes for Thunderbird12,
> but I am running 12.0 and still seeing emails get corrupted.  When messages
> are filtered into folders, occasionally two emails will get combined into
> one.  Do I need to upgrade to a later version of 12, or is this not really
> fixed in 12?

We can't reproduce any remaining issues, so we would need your help to try to figure out what's happening. Are these pop3 mail filters? Have you turned on filter logging and seen what's in the log when this happens? You're strictly talking about messages that have been filtered to a folder, and appear corrupted in that folder, right? That's not this bug, which is about what happens when you move messages that have already been moved by incoming filters.
You need to log in before you can comment on or make changes to this bug.