Closed Bug 1475270 Opened 6 years ago Closed 6 years ago

Avoid deadlock when pausing the compositor while gfxVRExternal is waiting for a SubmitFrame result

Categories

(Core :: WebVR, enhancement)

Unspecified
Android
enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla63
Tracking Status
firefox63 --- fixed

People

(Reporter: mortimergoro, Assigned: mortimergoro)

Details

Attachments

(2 files)

Firefox Reality pauses the compositor when gfxVRExternal presentation begins.

There is a race condition which causes a deadlock. It happens when pausing the compositor while gfxVRExternal is waiting for a SubmitFrame result.
Summary: Avoid deadlock when pauses the compositor while gfxVRExternal is waiting for a SubmitFrame result → Avoid deadlock when pausing the compositor while gfxVRExternal is waiting for a SubmitFrame result
Submited patch that fixes the deadlock race condition
Attachment #8991651 - Flags: review?(kgilbert)
Assignee: nobody → imanol
Comment on attachment 8991651 [details] [diff] [review]
Fixes the deadlock race condition

Review of attachment 8991651 [details] [diff] [review]:
-----------------------------------------------------------------

Thanks for tracking this down!  We need just a couple small modifications to land this:

Adding this flag is a good idea; however, it would be best to minimize the amount of platform specific members and code.  WE could rename to something describing its effect, in a way useful for all platforms.
I would suggest renaming to "mSuppressFrames" and removing the #ifdef around the early exit added to gfxVRExternal.cpp.
Also, any new members added to VRDisplayState need to be included in the IPC serialization code in VRMessageUtils.h.
Attachment #8991651 - Flags: review?(kgilbert) → review-
Latest patch with the modifications that Kip recommended
Attachment #8991725 - Flags: review?(kgilbert)
Comment on attachment 8991725 [details] [diff] [review]
supress_frames_api.diff

Looks good thanks!
Attachment #8991725 - Flags: review?(kgilbert) → review+
Attachment #8991725 - Flags: checkin?(kgilbert)
Attachment #8991725 - Flags: checkin?(kgilbert) → checkin+
Pushed by kgilbert@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/452da58e5a47
Avoid deadlock when pausing the compositor while gfxVRExternal is waiting for a SubmitFrame result; r=kip
https://hg.mozilla.org/mozilla-central/rev/452da58e5a47
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla63
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: