Closed Bug 1436637 Opened 6 years ago Closed 6 years ago

Sync might end up in a deadlock

Categories

(Firefox :: Sync, enhancement, P1)

enhancement

Tracking

()

RESOLVED FIXED
Firefox 60
Tracking Status
firefox60 --- fixed

People

(Reporter: eoger, Assigned: eoger)

References

Details

Attachments

(1 file)

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: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 60
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: