Attempt to fix folder corruption bug 1890230 using backout of related changes on comm-esr128 since TB 122.
Categories
(Thunderbird :: General, task)
Tracking
(Not tracked)
People
(Reporter: KaiE, Unassigned)
References
Details
(Whiteboard: [Version 128 only])
Attachments
(40 files, 2 obsolete files)
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review |
This is an attempt to fix folder corruption bug 1890230 using backout of related changes since TB 122.
It's not yet clear if this approach will be taken, and whether it is safe to do.
The intention is to investigate/test this approach in parallel to the efforts in bug 1890230.
Reporter | ||
Comment 1•1 month ago
|
||
Reporter | ||
Comment 2•1 month ago
|
||
Reporter | ||
Comment 3•1 month ago
|
||
Reporter | ||
Comment 4•1 month ago
|
||
Reporter | ||
Comment 5•1 month ago
|
||
Reporter | ||
Comment 6•1 month ago
|
||
Reporter | ||
Comment 7•1 month ago
|
||
Reporter | ||
Comment 8•1 month ago
|
||
Reporter | ||
Comment 9•1 month ago
|
||
Reporter | ||
Comment 10•1 month ago
|
||
Reporter | ||
Comment 11•1 month ago
|
||
Reporter | ||
Comment 12•1 month ago
|
||
Reporter | ||
Comment 13•1 month ago
|
||
Reporter | ||
Comment 14•1 month ago
|
||
Reporter | ||
Comment 15•1 month ago
|
||
Reporter | ||
Comment 16•1 month ago
|
||
Reporter | ||
Comment 17•1 month ago
|
||
Reporter | ||
Comment 18•1 month ago
|
||
Reporter | ||
Comment 19•1 month ago
|
||
Reporter | ||
Comment 20•1 month ago
|
||
Reporter | ||
Comment 21•1 month ago
|
||
Reporter | ||
Comment 22•1 month ago
|
||
Reporter | ||
Comment 23•1 month ago
|
||
Reporter | ||
Comment 24•1 month ago
|
||
Reporter | ||
Comment 25•1 month ago
|
||
Reporter | ||
Comment 26•1 month ago
|
||
Reporter | ||
Comment 27•1 month ago
|
||
Reporter | ||
Comment 28•1 month ago
|
||
Reporter | ||
Comment 29•1 month ago
|
||
Reporter | ||
Comment 30•1 month ago
|
||
Reporter | ||
Comment 31•1 month ago
|
||
Reporter | ||
Comment 32•1 month ago
|
||
Reporter | ||
Comment 33•1 month ago
|
||
Reporter | ||
Comment 34•1 month ago
|
||
Reporter | ||
Comment 35•1 month ago
|
||
All attached patches are on top of comm-esr128.
Reporter | ||
Updated•1 month ago
|
Reporter | ||
Comment 36•1 month ago
|
||
Attached are 33 backed out commits.
For the record, I'm counting 2211 commits on the comm-esr128 branch since bug 1719121 commit 222268ebb87b.
Updated•1 month ago
|
Updated•1 month ago
|
Reporter | ||
Comment 37•1 month ago
|
||
Removed 2 unnecessary backouts.
Reporter | ||
Comment 38•1 month ago
•
|
||
[Edited: This build is old. Please scroll down for a newer build.]
Below are links to experimental builds of 128.3.x, which revert the changes that were made to Thunderbird's Folder storage during the development of TB 128. (In particular, since bug 1719121).
If you are affected by bug 1890230, and are willing to test an alternative fix, you may try these builds. They will work with your regular profile, the one you're already using with Version 128.
Please be aware that this has some risk on its own. It's possible that there is an interdependency between other changes that were made to 128.x, which is broken by the changes in this experiment. So if you consider to try this, it might be good if you backup your Profile directory beforehand.
If you do test it, please give us feedback here:
- Does this version prevent new corruption issues from happening?
- Do you see any other functional side effects when using this build?
Thank you very much in advanced for testing and reporting back.
I suggest that you download, extract it to a separate place, and manually run it from the extracted directory.
This approach won't overwrite your installed version. However, it will require that every time you want to use this experimental version again, you must again run it manually from the extracted directory.
Download links:
Windows 64 bit:
https://firefox-ci-tc.services.mozilla.com/api/queue/v1/task/RN--citoStC9Y4gJLUf1_g/runs/0/artifacts/public/build/target.zip
Windows 32 bit:
https://firefox-ci-tc.services.mozilla.com/api/queue/v1/task/ATzePuc_RqqDSGLFhi_kGA/runs/0/artifacts/public/build/target.zip
(For technical users, here is the overall link to all details of this build:
https://treeherder.mozilla.org/jobs?repo=try-comm-central&revision=0a410752e0b6649baf261b71bd80a7c2d505a498 )
Reporter | ||
Comment 39•29 days ago
|
||
Reporter | ||
Comment 40•29 days ago
|
||
Reporter | ||
Comment 41•29 days ago
|
||
Reporter | ||
Comment 42•29 days ago
|
||
Reporter | ||
Comment 43•29 days ago
|
||
Reporter | ||
Comment 44•29 days ago
|
||
Reporter | ||
Comment 45•29 days ago
|
||
Reporter | ||
Comment 46•29 days ago
|
||
Reporter | ||
Comment 47•29 days ago
|
||
Using a 32 bit build, we should test that working with 5 GB mailboxes works correctly.
Reporter | ||
Comment 48•29 days ago
|
||
Here is an updated try build:
https://treeherder.mozilla.org/jobs?repo=try-comm-central&revision=146cbe883f0b90ab48221a1dc30d11b09cc75855
It's based on 128.3.3 - with the fixes from that version, but also backing out the additional changes related to storage.
(In reply to Kai Engert (:KaiE:) from comment #47)
Using a 32 bit build, we should test that working with 5 GB mailboxes works correctly.
I confirmed that's working with this build.
Windows 64 bit:
https://firefox-ci-tc.services.mozilla.com/api/queue/v1/task/ZBR3S4dHRBKzHSIflrS9lw/runs/0/artifacts/public/build/target.zip
Windows 32 bit:
https://firefox-ci-tc.services.mozilla.com/api/queue/v1/task/EVqTKbRpSH-YzFiY3aUaNQ/runs/0/artifacts/public/build/target.zip
Reporter | ||
Comment 49•28 days ago
|
||
Based on new information, the backout strategy no longer seems viable to me (without extra work).
The old code, which this backout would restore, expects that we have meta information available that accurately records the sizes of messages, as it uses those sizes to determine how much data to read from the mbox files.
The latest storage code (as used in released 128.x) no longer assures that the meta information has the same accurate sizes as in the past, it stores different sizes.
As a result, when using mbox files that were created using 128.x, with a backout build from here, the code operates on truncated messages.
I can reproduce this. When receiving a message with 128.x, then switching to the backout build and using "save message", the resulting file is truncated.
Comment 50•28 days ago
|
||
Is this really true? That would mean an mbox file processed by 128 can't be used in 115 or earlier any more? Has that incompatibility been published?
Reporter | ||
Comment 51•28 days ago
|
||
Let's ask Ben, maybe I misunderstood something.
Reporter | ||
Comment 52•28 days ago
|
||
(But in general, we don't support downgrading to an earlier major release.)
Comment 53•28 days ago
|
||
Well, while that's true, there are many situations where people need to use the -allow-downgrade switch. Usually a new version makes some changes to the profile, we've seen cases where the security databases don't survive a downgrade, there have been irreversible address book upgrades (where in case of downgrade you had to manually restore backed up address book files), but that gigabytes of "standard" mbox data become invalid or at least need to have their indexes rebuilt, appears to be a new situation. As far as I know mbox/msf data so far has been downward compatible for the last 10 years, certainly back down to TB 38 or so.
Comment 54•24 days ago
|
||
(In reply to Kai Engert (:KaiE:) from comment #51)
Let's ask Ben, maybe I misunderstood something.
No, you're basically right.
In the old code, .messageSize
was overloaded with three different meanings:
- for IMAP, it was the size of the message on the server
- for local folders it was the size of the message as encoded in the mbox file (for IMAP, this value was instead stored in .offlineMessageSize)
- it is the size of the non-mbox-encoded raw RFCx22 message (eg the size of the message as displayed in the gui)
1 and 3 are mostly the same meanings, except that local copies of messages usually have some extra headers added (X-Mozilla-Status/Status2/Keys), and so tend to be larger.
2 was the meaning that the code relied upon.
2 and 3 are subtlety different because mbox encoding adds the "From " separator line and also adds extra '>' characters in the message body to escape lines beginning with "From ".
This meant that every place that dealt with local copies of messages needed to implement it's own mbox encoding/decoding, and this was very inconsistent. It also made a lot of maildir (and potentially other storage backends) nigh-on impossible to implement properly.
So the aim of the new code was to decouple the mbox details from the rest of the codebase and keep all the mbox-specific encoding/decoding in one place (the mbox message store). So, given that the encoded length was definitely an mbox-specific detail, code outside the mbox shouldn't have to deal with it.
So I went with meaning 3 for .messageSize
the raw RFCx22 size, which has the same value regardless of the storage backend.
I didn't anticipate that it would be an issue. All the storage backends (including mbox) must be capable of knowing when the end of a message has been encountered without having an explicit size passed in from outside, so meaning 3 seemed like the "correct" (and storage-agnostic) use of .messageSize
.
The upshot being that .messageSize
values written out by the newer code are likely to be a little less than the mbox-encoded-length of the message.
Description
•