Existing IndexedDB files can completely break IndexedDB on upgrade from Firefox 56 to 57
Categories
(Core :: Storage: Quota Manager, defect, P2)
Tracking
()
People
(Reporter: Kwan, Assigned: tt)
References
(Blocks 3 open bugs)
Details
(Keywords: dataloss, regression)
Crash Data
Attachments
(14 files, 39 obsolete files)
(deleted),
application/zip
|
Details | |
(deleted),
patch
|
tt
:
review+
lizzard
:
approval-mozilla-beta+
|
Details | Diff | Splinter Review |
(deleted),
patch
|
tt
:
review+
lizzard
:
approval-mozilla-beta+
|
Details | Diff | Splinter Review |
(deleted),
patch
|
Details | Diff | Splinter Review | |
(deleted),
patch
|
Details | Diff | Splinter Review | |
(deleted),
text/x-phabricator-request
|
Details | |
(deleted),
text/x-phabricator-request
|
Details | |
(deleted),
text/x-phabricator-request
|
Details | |
(deleted),
text/x-phabricator-request
|
Details | |
(deleted),
text/x-phabricator-request
|
Details | |
(deleted),
text/x-phabricator-request
|
Details | |
(deleted),
text/x-phabricator-request
|
Details | |
(deleted),
text/x-phabricator-request
|
Details | |
(deleted),
text/x-phabricator-request
|
Details |
Reporter | ||
Comment 1•7 years ago
|
||
Comment 3•7 years ago
|
||
Comment 4•7 years ago
|
||
Reporter | ||
Comment 5•7 years ago
|
||
Comment 6•7 years ago
|
||
Reporter | ||
Comment 7•7 years ago
|
||
Comment 8•7 years ago
|
||
Comment 9•7 years ago
|
||
Assignee | ||
Comment 10•7 years ago
|
||
Assignee | ||
Updated•7 years ago
|
Updated•7 years ago
|
Updated•7 years ago
|
Assignee | ||
Comment 11•7 years ago
|
||
Assignee | ||
Comment 12•7 years ago
|
||
Comment 13•7 years ago
|
||
Assignee | ||
Comment 14•7 years ago
|
||
Comment 15•7 years ago
|
||
Comment 16•7 years ago
|
||
Assignee | ||
Comment 17•7 years ago
|
||
Comment 18•7 years ago
|
||
Assignee | ||
Comment 19•7 years ago
|
||
Assignee | ||
Comment 20•7 years ago
|
||
Assignee | ||
Comment 21•7 years ago
|
||
Assignee | ||
Comment 22•7 years ago
|
||
Assignee | ||
Comment 23•7 years ago
|
||
Assignee | ||
Comment 24•7 years ago
|
||
Assignee | ||
Comment 25•7 years ago
|
||
Updated•7 years ago
|
Assignee | ||
Comment 26•7 years ago
|
||
Assignee | ||
Comment 27•7 years ago
|
||
Assignee | ||
Updated•7 years ago
|
Updated•7 years ago
|
Comment 28•7 years ago
|
||
Updated•7 years ago
|
Updated•7 years ago
|
Comment 30•6 years ago
|
||
Assignee | ||
Comment 31•6 years ago
|
||
Comment 32•6 years ago
|
||
Updated•6 years ago
|
Assignee | ||
Comment 33•6 years ago
|
||
Assignee | ||
Comment 34•6 years ago
|
||
Comment 35•6 years ago
|
||
Updated•6 years ago
|
Updated•6 years ago
|
Assignee | ||
Comment 36•6 years ago
|
||
Comment 37•6 years ago
|
||
Assignee | ||
Updated•6 years ago
|
Assignee | ||
Comment 38•6 years ago
|
||
Assignee | ||
Updated•6 years ago
|
Assignee | ||
Updated•6 years ago
|
Assignee | ||
Comment 39•6 years ago
|
||
Assignee | ||
Comment 40•6 years ago
|
||
Assignee | ||
Comment 41•6 years ago
|
||
Assignee | ||
Comment 42•6 years ago
|
||
Assignee | ||
Comment 43•6 years ago
|
||
Assignee | ||
Comment 44•6 years ago
|
||
Comment 45•6 years ago
|
||
Comment 46•6 years ago
|
||
Comment 47•6 years ago
|
||
Comment 48•6 years ago
|
||
Assignee | ||
Comment 49•6 years ago
|
||
Assignee | ||
Comment 50•6 years ago
|
||
Assignee | ||
Comment 51•6 years ago
|
||
Assignee | ||
Comment 52•6 years ago
|
||
Assignee | ||
Comment 53•6 years ago
|
||
Assignee | ||
Comment 54•6 years ago
|
||
Assignee | ||
Comment 55•6 years ago
|
||
Assignee | ||
Comment 56•6 years ago
|
||
Assignee | ||
Comment 57•6 years ago
|
||
Assignee | ||
Comment 58•6 years ago
|
||
Assignee | ||
Comment 59•6 years ago
|
||
Assignee | ||
Comment 60•6 years ago
|
||
Assignee | ||
Comment 61•6 years ago
|
||
Assignee | ||
Comment 62•6 years ago
|
||
Assignee | ||
Comment 63•6 years ago
|
||
Assignee | ||
Comment 64•6 years ago
|
||
Assignee | ||
Comment 65•6 years ago
|
||
Assignee | ||
Comment 66•6 years ago
|
||
Comment 67•6 years ago
|
||
Assignee | ||
Comment 69•6 years ago
|
||
Assignee | ||
Comment 70•6 years ago
|
||
Assignee | ||
Comment 71•6 years ago
|
||
Assignee | ||
Comment 72•6 years ago
|
||
Comment 73•6 years ago
|
||
Assignee | ||
Comment 74•6 years ago
|
||
Assignee | ||
Comment 75•6 years ago
|
||
Assignee | ||
Updated•6 years ago
|
Comment 76•6 years ago
|
||
Comment 77•6 years ago
|
||
Comment 78•6 years ago
|
||
Assignee | ||
Comment 79•6 years ago
|
||
Assignee | ||
Comment 80•6 years ago
|
||
Assignee | ||
Comment 81•6 years ago
|
||
Assignee | ||
Comment 82•6 years ago
|
||
Assignee | ||
Comment 83•6 years ago
|
||
Assignee | ||
Comment 84•6 years ago
|
||
Comment 85•6 years ago
|
||
Comment 86•6 years ago
|
||
Comment 87•6 years ago
|
||
Comment 88•6 years ago
|
||
Comment 89•6 years ago
|
||
Updated•6 years ago
|
Comment 90•6 years ago
|
||
Comment 91•6 years ago
|
||
Assignee | ||
Comment 92•6 years ago
|
||
Addressed comments
Assignee | ||
Comment 93•6 years ago
|
||
Andrew, given the current number of failures for Ori_UnexpectedFile [1] is quite high, would you mind me for adding ignoring OS metadata files in origin directories to P1?
Note that updated P1 here is just applying your comment. I still keep P1 with this inter-diff on my local repo.
Assignee | ||
Comment 94•6 years ago
|
||
Assignee | ||
Comment 95•6 years ago
|
||
(In reply to Andrew Sutherland [:asuth] from comment #88)
Thanks for the reviews and detailed explanation!
I've r+'ed this on the updated patch, but to respond specifically to Jan's
concern, I believe the potential concern is that OriginProps::Init invokes
OriginParser::ParseOrigin at
https://searchfox.org/mozilla-central/rev/
c43240cef5829b8a2dec118faff8a5e1fec6ae1b/dom/quota/ActorsParent.cpp#7879 and
saves off the spec asmSpec
, returning NS_OK if ObsoleteOrigin is
returned, and leavingmSpec
void since ParseOrigin early returns without
ever initializing the passed inaSpec
.Audit-wise, the following code consults OriginProps::mSpec:
- StorageOperationBase::RunOnMainThread but only if mType is eContent.
mType is eObsolete in that case.- CreateOrUpgradeDirectoryMetadataHelper::PrepareOriginDirectory.
PrepareOriginDirectory is only called by
RepositoryOperationBase::ProcessRepository if mType != Obsolete (and errors
entirely if eInvalid at the time of this patch).- CreateOrUpgradeDirectoryMetadataHelper::ProcessOriginDirectory if
mPersistent. ProcessOriginDirectory is only called by
StorageOperationBase::ProcessOriginDirectories for mType != eObsolete (with
eInvalid never getting that far).So we're safe, but I would say that if we make further enhancements to the
code, we should consider cleaning things up to use mfbt/Variant.h or some
other mechanism so that such fields are not available when the return value
is eObsolete.
I see. Indeed, it's not okay to make caller take care of that. Now, I'm thinking either cleaning things up or just assigning values when it's valid. I'll figure out a way to handle that properly. Thanks!
Comment 96•6 years ago
|
||
Updated•6 years ago
|
Assignee | ||
Comment 97•6 years ago
|
||
Update the patch
Assignee | ||
Comment 98•6 years ago
|
||
Assignee | ||
Comment 99•6 years ago
|
||
Assignee | ||
Updated•6 years ago
|
Assignee | ||
Updated•6 years ago
|
Assignee | ||
Comment 100•6 years ago
|
||
Assignee | ||
Comment 101•6 years ago
|
||
Assignee | ||
Comment 102•6 years ago
|
||
Assignee | ||
Comment 103•6 years ago
|
||
Assignee | ||
Updated•6 years ago
|
Assignee | ||
Updated•6 years ago
|
Assignee | ||
Updated•6 years ago
|
Assignee | ||
Updated•6 years ago
|
Assignee | ||
Updated•6 years ago
|
Assignee | ||
Updated•6 years ago
|
Assignee | ||
Comment 104•6 years ago
|
||
Given we've had telemetry to track the number of failures for initialization and we want to reduce the times of upgrade as less as possible, I intend to push P1 and P2 first to check whether the errors of unexpected files in repositories and origins drop. If the number of failures decreases after a few days, then I will land the rest of the patches (upgrade).
Assignee | ||
Comment 105•6 years ago
|
||
Assignee | ||
Comment 106•6 years ago
|
||
(In reply to Tom Tung [:tt, :ttung] from comment #105)
try: https://treeherder.mozilla.org/#/jobs?repo=try&revision=09e49849ecd5cc82bff33a8c2f01e094da7a55d0
Right now it fails on running the test_corruptedDatabase.js, and it seems the cause is related to local storage and it will be fixed in the near future. I'll disable this test when landing the patches for it per discussion on IRC with Jan.
Assignee | ||
Comment 107•6 years ago
|
||
Plan landing P1 P2 tomorrow and will uplift these two patches to Beta after making sure they are stable. The rest of the patches won't be in the 66 and will land them next week (after checking the telemetry).
Comment 108•6 years ago
|
||
Assignee | ||
Comment 109•6 years ago
|
||
Since I intend to push the code for the minor upgrade on QuotaManager later (P3~P7), marking this bug leave-open in the case of being closed accidentally. Also, if P1, P2 are stable, I plan to uplift them to the Beta.
P1 & P2 should decrease the number of failures on Ori_UnexpectedFile and Rep_UnexpectedFile. Note that based on the telemetry data in 1/22~1/28 [1], we got 404k Ori_UnexpectedFile and 143.35k Rep_UnexpectedFile failures.
Comment 110•6 years ago
|
||
bugherder |
Assignee | ||
Comment 111•6 years ago
|
||
Hi Pascal,
I intend to uplift P1 and P2 to 66 after they are stable (I guess at least one ~ two weeks more). Do you happen to know when is the last deadline for the uplifting to 66? Thanks!
Comment 112•6 years ago
|
||
(In reply to Tom Tung [:tt, :ttung] from comment #111)
Hi Pascal,
I intend to uplift P1 and P2 to 66 after they are stable (I guess at least one ~ two weeks more). Do you happen to know when is the last deadline for the uplifting to 66? Thanks!
Hi Tom, I am moving the question to Liz as she is the 66 owner (I am on 67).
The earlier the better for something like this. How about aiming for beta 8?
Assignee | ||
Comment 114•6 years ago
|
||
(In reply to Liz Henry (:lizzard) (use needinfo) from comment #113)
The earlier the better for something like this. How about aiming for beta 8?
I check the schedule [1] and, If I don't misunderstand that, it's Feb 15. So, sure and I will send a request next Wednesday(Feb 13). Thanks!
Assignee | ||
Comment 115•6 years ago
|
||
Assignee | ||
Comment 116•6 years ago
|
||
Assignee | ||
Comment 117•6 years ago
|
||
Assignee | ||
Comment 118•6 years ago
|
||
Updated•6 years ago
|
Assignee | ||
Comment 119•6 years ago
|
||
Comment on attachment 9038794 [details] [diff] [review]
Bug 1423917 - P1 - Ignore dot files in QM and add .desktop, Desktop.ini, desktop.ini, Thumbs.db into the list of OSMetadata; r=asuth
Beta/Release Uplift Approval Request
Feature/Bug causing the regression
None
User impact if declined
The telemetry data for initialization failure shows that P1 & P2 does reduce the number of error for finding unexpected files on repository and origin folders on Nightly Channel. If it's declined, then Beta users having this problem need to wait until 67 to fix.
Is this code covered by automated tests?
No
Has the fix been verified in Nightly?
Yes
Needs manual test from QE?
No
If yes, steps to reproduce
List of other uplifts needed
None
Risk to taking this patch
Low
Why is the change risky/not risky? (and alternatives if risky)
This patch & P2 only add our files into our allow list and bypass those files on initialization
String changes made/needed
Assignee | ||
Comment 120•6 years ago
|
||
Comment on attachment 9038214 [details] [diff] [review]
Bug 1423917 - P2 - Have a test to verify a set of hidden files don't block QuotaManager's initialization and getting usauge; r=asuth
Beta/Release Uplift Approval Request
Feature/Bug causing the regression
None
User impact if declined
Unit test for P1
Is this code covered by automated tests?
No
Has the fix been verified in Nightly?
Yes
Needs manual test from QE?
No
If yes, steps to reproduce
List of other uplifts needed
None
Risk to taking this patch
Low
Why is the change risky/not risky? (and alternatives if risky)
String changes made/needed
Assignee | ||
Comment 121•6 years ago
|
||
(In reply to Tom Tung [:tt, :ttung] from comment #119)
Comment on attachment 9038794 [details] [diff] [review]
Bug 1423917 - P1 - Ignore dot files in QM and add .desktop, Desktop.ini, desktop.ini, Thumbs.db into the list of OSMetadata; r=asuth
Is this code covered by automated tests?
No
Sorry, but this should be "yes"
Are all parts of this landed in m-c?
How was this verified?
Assignee | ||
Comment 123•6 years ago
|
||
(In reply to Liz Henry (:lizzard) (use needinfo) from comment #122)
Are all parts of this landed in m-c?
How was this verified?
Yes, sorry for not stating that clearly. So, they are in m-c already and for 14 days without reporting any issues. Below are the rev.
(In reply to Raul Gurzau (:RaulGurzau) from comment #110)
https://hg.mozilla.org/mozilla-central/rev/c1e94f601466
https://hg.mozilla.org/mozilla-central/rev/184071b7ccab
Assignee | ||
Comment 124•6 years ago
|
||
(In reply to Tom Tung [:tt, :ttung] from comment #123)
(In reply to Liz Henry (:lizzard) (use needinfo) from comment #122)
Are all parts of this landed in m-c?
How was this verified?Yes, sorry for not stating that clearly. So, they are in m-c already and for 14 days without reporting any issues. Below are the rev.
(In reply to Raul Gurzau (:RaulGurzau) from comment #110)
https://hg.mozilla.org/mozilla-central/rev/c1e94f601466
https://hg.mozilla.org/mozilla-central/rev/184071b7ccab
To be more clear, only P1 & P2 and only these two need to be uplifted
Comment 127•6 years ago
|
||
There are conflicts while uplifting to beta:
grafting 523813:c1e94f601466 "Bug 1423917 - P1 - Ignore dot files in QM and add .desktop, Desktop.ini, desktop.ini, Thumbs.db into the list of OSMetadata; r=asuth"
merging dom/indexedDB/ActorsParent.cpp
warning: conflicts while merging dom/indexedDB/ActorsParent.cpp! (edit, then use 'hg resolve --mark')
:ttung , can you please provide a patch for beta?
Assignee | ||
Comment 128•6 years ago
|
||
Here is the patch. I didn't find a conflict while importing it to Beta locally, though.
Assignee | ||
Comment 129•6 years ago
|
||
Assignee | ||
Comment 130•6 years ago
|
||
attachment 9043808 [details] [diff] [review] and attachment 9043809 [details] [diff] [review] are the P1 & P2. I imported them to the newest beta without conflicts.
I haven't had an experience like this, so should I ask uplift request again? If not, please let me know if they still don't work. Thank you!
Comment 131•6 years ago
|
||
bugherder uplift |
Assignee | ||
Comment 132•6 years ago
|
||
Patches are uplifted to beta, so I guess I can remove the ni.
Assignee | ||
Comment 133•6 years ago
|
||
This patch makes OriginParser only treats "chrome" origin as a valid origin.
For the rest kinds of origins with chrome schema, the OriginParser would just
treat them as obsolete origins.
Assignee | ||
Comment 134•6 years ago
|
||
Depends on D21727
Assignee | ||
Comment 135•6 years ago
|
||
Depends on D21728
Assignee | ||
Comment 136•6 years ago
|
||
Depends on D21729
Assignee | ||
Comment 137•6 years ago
|
||
After this patch, invalid origin shouldn't block upgrade anymore. However, we
should be aware of that if an invild origin somehow can be recoverd to a valid
origin, then upgrade that origin is required.
Depends on D21730
Assignee | ||
Comment 138•6 years ago
|
||
Depends on D21731
Assignee | ||
Comment 139•6 years ago
|
||
Depends on D21732
Assignee | ||
Comment 140•6 years ago
|
||
Assignee | ||
Updated•6 years ago
|
Assignee | ||
Updated•6 years ago
|
Assignee | ||
Updated•6 years ago
|
Assignee | ||
Updated•6 years ago
|
Assignee | ||
Updated•6 years ago
|
Assignee | ||
Updated•6 years ago
|
Assignee | ||
Comment 141•6 years ago
|
||
Comment 142•6 years ago
|
||
Comment 143•6 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/a3af1bcb7348
https://hg.mozilla.org/mozilla-central/rev/497e09d55cc5
https://hg.mozilla.org/mozilla-central/rev/1a87608f65c3
https://hg.mozilla.org/mozilla-central/rev/330622caa8b7
https://hg.mozilla.org/mozilla-central/rev/5584de41d293
https://hg.mozilla.org/mozilla-central/rev/f285d37402e2
https://hg.mozilla.org/mozilla-central/rev/10b750eab816
Comment 144•6 years ago
|
||
There are 5 crashes in nightly 68 with buildid 20190322012300 and the moz_crash_reason is:
MOZ_RELEASE_ASSERT(!IsDeprecatedClient(aText))
Assignee | ||
Comment 145•6 years ago
|
||
(In reply to Calixte Denizet (:calixte) from comment #144)
There are 5 crashes in nightly 68 with buildid 20190322012300 and the moz_crash_reason is:
MOZ_RELEASE_ASSERT(!IsDeprecatedClient(aText))
It looks like it's because some users are still stuck in the version2_0 so that they crashed while doing the 2_0To2_1 upgrade. I will make a patch for that.
Comment 146•6 years ago
|
||
They can just use a profile template or something like that, so the upgrade from 2.0 to 2.1 happens every time they start the app.
Assignee | ||
Comment 147•6 years ago
|
||
(In reply to Jan Varga [:janv] from comment #146)
They can just use a profile template or something like that, so the upgrade from 2.0 to 2.1 happens every time they start the app.
I see. Thanks for explaining the reason which makes that happen!
Anyway, this crash happens because I didn't take care of users on the older storage version. It seems to me that we should just check the storage version right before the assertion for the deprecated client check.
Updated•6 years ago
|
Assignee | ||
Comment 148•6 years ago
|
||
The previous patches didn't take care of the case there might have an asmjs
folder in the older version. To fix that, this patch makes Client allow to have
asmjs folders in the older version by requesting the callee of TypeFromText()
for passing the current storage version. If the version is lower than the
deprecate version, then the assertion won't be enabled.
The test verfies the fix by adding the older profile an asmjs folder.
Comment 149•6 years ago
|
||
Comment 150•6 years ago
|
||
bugherder |
Assignee | ||
Comment 151•6 years ago
|
||
The reasons of this patch:
-
P9 didn't handle the deletion of deprecated client well. It shouldn't continue
if the client is failed to be removed. This patch correct this behavior. -
Meanwhile, it's not really good to just crash while finding a deprecated
client. At least, the client should be removed while finding it before crashing
the Firefox. -
Besides, if we eventaully only check the deprecated client during
the initialization. It makes the code simpler to make the deprecated check to
InitializeOrigin.
Therefore, this patch is a little bit against the P11, but I think it's a right
thing to do here.
Comment 152•6 years ago
|
||
Comment 153•6 years ago
|
||
An other crash on the same assertion (MOZ_RELEASE_ASSERT(!IsDeprecatedClient(aText))) after the last patch landed:
https://crash-stats.mozilla.com/report/index/76ab1c7a-46de-4e43-ab46-467ef0190325
Assignee | ||
Comment 154•6 years ago
|
||
(In reply to Calixte Denizet (:calixte) from comment #153)
An other crash on the same assertion (MOZ_RELEASE_ASSERT(!IsDeprecatedClient(aText))) after the last patch landed:
https://crash-stats.mozilla.com/report/index/76ab1c7a-46de-4e43-ab46-467ef0190325
Sorry, it was expected because I still want to check if all the issues are captured, but, hopefully, the number will drop to zero if the solution on P12 works.
Note that the problem should be fixed if it crashed with mozilla::dom::quota::QuotaManager::InitializeOrigin. Users are not expected to crash in the second try.
If the number of crashes for mozilla::dom::quota::QuotaManager::InitializeOrigin won't drop down in days, I will check if there are other issues on the patches.
Comment 155•6 years ago
|
||
bugherder |
Comment 156•6 years ago
|
||
No crashes for the signatures in this bug in the last couple of days.
Comment 157•6 years ago
|
||
Assignee | ||
Comment 158•6 years ago
|
||
All the patches have been pushed into m-c and, IIUC, all the reported issues on this bug has been resolved so I'm going to close this bug.
Updated•6 years ago
|
Updated•6 years ago
|
Description
•