Sync might end up in a deadlock

RESOLVED FIXED in Firefox 60

Status

()

P1
normal
RESOLVED FIXED
10 months ago
10 months ago

People

(Reporter: eoger, Assigned: eoger)

Tracking

unspecified
Firefox 60
Points:
---

Firefox Tracking Flags

(firefox60 fixed)

Details

Attachments

(1 attachment)

(Assignee)

Description

10 months ago
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.
Comment hidden (mozreview-request)
(Assignee)

Updated

10 months ago
Blocks: 633062
Comment hidden (mozreview-request)

Comment 3

10 months ago
mozreview-review
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+

Updated

10 months ago
See Also: → bug 1436573

Comment 4

10 months ago
Pushed by eoger@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/7cbfec3bb94e
Revert back to a sync observer in Service. r=markh

Comment 5

10 months ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/7cbfec3bb94e
Status: ASSIGNED → RESOLVED
Last Resolved: 10 months ago
status-firefox60: --- → fixed
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.