Closed
Bug 1148504
Opened 9 years ago
Closed 9 years ago
Protect Firefox Account state with a critical section
Categories
(Android Background Services Graveyard :: Reading List Sync, defect)
Tracking
(firefox38 fixed, firefox39 fixed)
RESOLVED
FIXED
Firefox 39
People
(Reporter: nalexander, Assigned: nalexander)
References
Details
Attachments
(1 file)
We now have two (background) Firefox Account consumers, Sync and RL. Due to time pressure, we haven't implemented a nice API for them both to update the account state; instead, they both try to own the state, resulting in races. The effect is most noticeable when an account is created or re-connected: it's frequent that both consumers will try to fetch keys using the same keyFetchToken; one will win the race and proceed to start syncing; the other will fail to fetch keys and drive the account to Separated (in order to fetch keys). Result: a terrible user experience. As a step towards a better API, we need to protect the Account state with a critical section. Eventually, we transition Sync to requesting token server tokens from the FxAccountAuthenticator using Android's APIs, which makes this much cleaner (since there's then a single consumer to handle locking).
Assignee | ||
Updated•9 years ago
|
Assignee: nobody → nalexander
Status: NEW → ASSIGNED
Assignee | ||
Comment 1•9 years ago
|
||
rnewman: how do you feel about this? It's working well locally. I intended to include telemetry for how long we wait and how long we hold the lock, but I then observed (and explained in the second commit comment) that we should very rarely wait.
Attachment #8584688 -
Flags: review?(rnewman)
Assignee | ||
Updated•9 years ago
|
Summary: Protected Firefox Account state with a critical section → Protect Firefox Account state with a critical section
Assignee | ||
Comment 2•9 years ago
|
||
https://hg.mozilla.org/integration/fx-team/rev/c4639723e721
Comment 3•9 years ago
|
||
Backed out for bustage. https://hg.mozilla.org/integration/fx-team/rev/cb309087f978 https://treeherder.mozilla.org/logviewer.html#?job_id=2452077&repo=fx-team
Assignee | ||
Comment 5•9 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/2c562029850b
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
status-firefox39:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 39
Comment 6•9 years ago
|
||
https://hg.mozilla.org/releases/mozilla-beta/rev/32b6b2c4a69e
status-firefox38:
--- → fixed
Updated•9 years ago
|
Attachment #8584688 -
Flags: review?(rnewman) → review+
You need to log in
before you can comment on or make changes to this bug.
Description
•