Closed
Bug 743635
Opened 12 years ago
Closed 12 years ago
B2G SMS database initialization accesses Directory Provider off the main thread
Categories
(Core :: DOM: Device Interfaces, defect)
Tracking
()
RESOLVED
FIXED
mozilla14
People
(Reporter: philikon, Assigned: philikon)
References
Details
Attachments
(1 file, 1 obsolete file)
1.65 KB,
patch
|
Details | Diff | Splinter Review |
On Gonk ICS we're seeing an interesting race condition in the emulator: the B2G SMS database service is initialized at startup and immediately initializes an IndexedDB instance. IndexedDB happens to query the Directory Service for ProfD *off the main thread*. This usually works out fine so long as the Directory Service's cache has been primed (e.g. something has already queried for ProfD). In this case, however, we're seeing that the IndexedDB thread is racing the main thread and fails to look up ProfD.
Assignee | ||
Comment 1•12 years ago
|
||
Assignee: nobody → philipp
Attachment #613261 -
Flags: review?(mwu)
Comment 2•12 years ago
|
||
E/GeckoConsole( 108): Attempt to use JS function on a different thread calling nsIDirectoryServiceProvider.getFile. JS objects may not be shared across threads
Updated•12 years ago
|
Attachment #613261 -
Flags: review?(mwu) → review+
Assignee | ||
Comment 3•12 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/c1ede9f0319e
Comment 4•12 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/c1ede9f0319e
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla14
Comment 5•12 years ago
|
||
Backout merged: https://hg.mozilla.org/mozilla-central/rev/a235528adace
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Assignee | ||
Comment 6•12 years ago
|
||
Now with the proper Services.jsm import. The missing import was preventing the SmsDatabaseService from initializing the database, so it kind of fixed the freezing problem, but not in a very useful way. mwu, would you mind testing this new patch with the missing import added, to see if it still fixes the problem?
Attachment #613261 -
Attachment is obsolete: true
Attachment #613832 -
Flags: feedback?(mwu)
Assignee | ||
Comment 7•12 years ago
|
||
Turns out, the provided patch doesn't fix the freeze, but it *does* fix the off-thread error. So I'm morphing this bug to just deal with that and filed the cloned bug 744300 to deal with the freeze.
Summary: B2G SMS database initialization freezes I/O thread → B2G SMS database initialization accesses Directory Provider off the main thread
Assignee | ||
Comment 8•12 years ago
|
||
Comment on attachment 613832 [details] [diff] [review] v2 (Canceling feedback request, got feedback from mwu over IRC. Will commit this patch as it already has r+.)
Attachment #613832 -
Flags: feedback?(mwu)
Assignee | ||
Comment 9•12 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/47577c0fd029
Comment 10•12 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/47577c0fd029
Status: REOPENED → RESOLVED
Closed: 12 years ago → 12 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•