Sync might end up in a deadlock

RESOLVED FIXED in Firefox 60

Status

()

enhancement
P1
normal
RESOLVED FIXED
Last year
Last year

People

(Reporter: eoger, Assigned: eoger)

Tracking

unspecified
Firefox 60
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox60 fixed)

Details

Attachments

(1 attachment)

In Service#observe(), we are awaiting on sync() to finish [0].
In Service#sync(), we are awaiting on observe() to finish [1].
You can see the problem: if we receive two push notifications at the same time that notify of "sync:collection_changed", we might end up in a deadlock and sync will not work until Firefox is restarted.


[0] https://searchfox.org/mozilla-central/rev/84cea84b12145d752e50ddca6be5462c38510e35/services/sync/modules/service.js#432
[1] https://searchfox.org/mozilla-central/rev/84cea84b12145d752e50ddca6be5462c38510e35/services/sync/modules/service.js#1102

Patch to follow.
Blocks: 633062
Comment on attachment 8949273 [details]
Bug 1436637 - Revert back to a sync observer in Service.

https://reviewboard.mozilla.org/r/218636/#review224438

Awesome, thanks!
Attachment #8949273 - Flags: review?(markh) → review+
See Also: → 1436573
Pushed by eoger@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/7cbfec3bb94e
Revert back to a sync observer in Service. r=markh
https://hg.mozilla.org/mozilla-central/rev/7cbfec3bb94e
Status: ASSIGNED → RESOLVED
Closed: Last year
Resolution: --- → FIXED
Target Milestone: --- → Firefox 60
Duplicate of this bug: 1436573
You need to log in before you can comment on or make changes to this bug.