Crash in InvalidArrayIndex_CRASH | mozilla::dom::indexedDB::(anonymous namespace)::ConnectionPool::NoteIdleDatabase
Categories
(Core :: Storage: IndexedDB, defect, P2)
Tracking
()
Tracking | Status | |
---|---|---|
firefox-esr60 | --- | unaffected |
firefox62 | --- | unaffected |
firefox63 | --- | wontfix |
firefox64 | --- | wontfix |
firefox65 | --- | wontfix |
firefox66 | --- | wontfix |
firefox67 | --- | fixed |
firefox68 | --- | fixed |
People
(Reporter: gsvelto, Assigned: tt)
References
Details
(Keywords: crash, regression)
Crash Data
Attachments
(1 file)
47 bytes,
text/x-phabricator-request
|
pascalc
:
approval-mozilla-beta+
|
Details | Review |
Updated•6 years ago
|
Comment 1•6 years ago
|
||
Updated•6 years ago
|
Comment 2•6 years ago
|
||
Updated•6 years ago
|
Updated•6 years ago
|
Updated•6 years ago
|
Updated•6 years ago
|
Reporter | ||
Comment 5•6 years ago
|
||
Reporter | ||
Comment 6•6 years ago
|
||
I've talked with the user that left comment 4 and he can easily reproduce the bug. If we could provide him with a build with the proper debugging facilities we might get to the bottom of this, Jan is there someone from the IndexedDB team who could help with this?
Reporter | ||
Comment 7•6 years ago
|
||
Added one more signature and sorted them so that it's clearer.
Reporter | ||
Comment 8•6 years ago
|
||
... and it looks like there might be even more signatures:
https://crash-stats.mozilla.com/search/?signature=~NoteIdleDatabase#facet-signature
I don't have time to sift through all of them now but I will ASAP.
Reporter | ||
Updated•6 years ago
|
Reporter | ||
Comment 9•6 years ago
|
||
Added an ESR signature.
Assignee | ||
Comment 10•6 years ago
|
||
It crashes at [1].
From my initial impression, it seems there is a race for accessing the mIdleDatabases
.
For instance, we insert a databaseInfo into it also on a connection thread (which can be different threads) [1-2]. At the same time, we remove an entry on the background thread [3].
Note that [2] and [3] have the same thread assertion (AssertIsOnOwningThread()
for ConnectionPool
), but the caller [4] of [3] is on the Background thread and the caller of [2] is on owning thread.
[1] https://crash-stats.mozilla.com/report/index/cd71d41e-7282-4874-a323-747800190422
[2] https://searchfox.org/mozilla-central/rev/ec489aa170b6486891cf3625717d6fa12bcd11c1/dom/indexedDB/ActorsParent.cpp#11380
[3] https://searchfox.org/mozilla-central/rev/ec489aa170b6486891cf3625717d6fa12bcd11c1/dom/indexedDB/ActorsParent.cpp#11558
[4] https://searchfox.org/mozilla-central/rev/ec489aa170b6486891cf3625717d6fa12bcd11c1/dom/indexedDB/ActorsParent.cpp#12692
Assignee | ||
Comment 11•6 years ago
|
||
Assignee | ||
Comment 12•6 years ago
|
||
(In reply to Tom Tung [:tt, :ttung] from comment #10)
It crashes at [1].
From my initial impression, it seems there is a race for accessing the
mIdleDatabases
.
For instance, we insert a databaseInfo into it also on a connection thread (which can be different threads) [1-2]. At the same time, we remove an entry on the background thread [3].Note that [2] and [3] have the same thread assertion (
AssertIsOnOwningThread()
forConnectionPool
), but the caller [4] of [3] is on the Background thread and the caller of [2] is on owning thread.[1] https://crash-stats.mozilla.com/report/index/cd71d41e-7282-4874-a323-747800190422
[2] https://searchfox.org/mozilla-central/rev/ec489aa170b6486891cf3625717d6fa12bcd11c1/dom/indexedDB/ActorsParent.cpp#11380
[3] https://searchfox.org/mozilla-central/rev/ec489aa170b6486891cf3625717d6fa12bcd11c1/dom/indexedDB/ActorsParent.cpp#11558
[4] https://searchfox.org/mozilla-central/rev/ec489aa170b6486891cf3625717d6fa12bcd11c1/dom/indexedDB/ActorsParent.cpp#12692
On IRC discussion, Jan catches this issue. It's because the code doesn't make idleConnectionRunnable dispatch itself to the background thread when a connection of the databaseInfo is null. So that it's possible that we can read this variable on a connection thread (which shouldn't be) while there is a write on the Background thread.
Updated•6 years ago
|
Comment 13•6 years ago
|
||
Comment 14•6 years ago
|
||
bugherder |
Updated•6 years ago
|
Comment 15•6 years ago
|
||
should we consider uplifting the patch to 67 beta still at this point?
the [@ mozilla::dom::indexedDB::anonymous namespace'::ConnectionPool::NoteIdleDatabase(struct mozilla::dom::indexedDB::
anonymous namespace'::ConnectionPool::DatabaseInfo*)] crash signature would account for 0.5% of browser crashes on 67.0b13 currently...
Assignee | ||
Comment 16•6 years ago
|
||
Comment on attachment 9060169 [details]
Bug 1481164 - Dispatch to the Background thread even when the Connection is a nullptr in IdleConnectionRunnable::Run();
Beta/Release Uplift Approval Request
- User impact if declined: The patch fixes the place where breaks threading assumption for the case of the idle database if the connection is a nullptr. Thus, that might cause a race or another crash if declined.
- 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 corrects the behavior and shouldn't be risky.
- String changes made/needed:
Comment 17•6 years ago
|
||
Comment on attachment 9060169 [details]
Bug 1481164 - Dispatch to the Background thread even when the Connection is a nullptr in IdleConnectionRunnable::Run();
Fix for a medium volume crasher on beta, patch evaluated as low risk, uplift approved for 67 beta 15, thanks.
Comment 18•6 years ago
|
||
bugherder uplift |
Assignee | ||
Updated•6 years ago
|
Description
•