Closed Bug 1415762 Opened 2 years ago Closed 2 years ago

Cancel VRListener task when CompositorVsyncScheduler is going to destroy

Categories

(Core :: WebVR, enhancement, P3)

enhancement

Tracking

()

RESOLVED FIXED
mozilla59
Tracking Status
firefox59 --- fixed

People

(Reporter: daoshengmu, Assigned: daoshengmu)

References

Details

Attachments

(1 file)

We should let VRListenr tasks refer composite tasks to cancel their tasks when the compositor vsync scheduler is going to destroy.
Assignee: nobody → dmu
Blocks: 1392215
Comment on attachment 8926692 [details]
Bug 1415762 - Cancel VRListener task when CompositorVsyncScheduler is going to destroy;

https://reviewboard.mozilla.org/r/197942/#review203442

::: gfx/vr/VRThread.h:30
(Diff revision 1)
>    }
>  
>    static VRListenerThreadHolder* GetSingleton();
>  
>    static bool IsActive() {
> -    return !!GetSingleton();
> +    return !!GetSingleton() && !!Loop();

Looks like this can be just GetSingleton() && Loop() now.
Attachment #8926692 - Flags: review?(dvander) → review+
(In reply to Daosheng Mu[:daoshengmu] from comment #3)
> Comment on attachment 8926692 [details]
> Bug 1415762 - Cancel VRListener task when CompositorVsyncScheduler is going
> to destroy;
> 
> Review request updated; see interdiff:
> https://reviewboard.mozilla.org/r/197942/diff/1-2/

Refer the Comment 2 to update the patch.
Pushed by dmu@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/f296220f4117
Cancel VRListener task when CompositorVsyncScheduler is going to destroy; r=dvander
https://hg.mozilla.org/mozilla-central/rev/f296220f4117
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla58
Sorry, there was a bit of a bug marking snafu here. It actually had to get backed out due to frequently crashing with mozilla::BlockingResourceBase::CheckAcquire(), RtlEnterCriticalSection and _pthread_mutex_lock signatures.
https://treeherder.mozilla.org/logviewer.html#?job_id=143621124&repo=autoland

https://hg.mozilla.org/mozilla-central/rev/d32ac3e582b6
Status: RESOLVED → REOPENED
Flags: needinfo?(dmu)
Resolution: FIXED → ---
Target Milestone: mozilla58 → ---
This bug would be a low priority because there is no test case or crash that need to depend on this patch. I have tried a few times it still happen intermittent pthread-lock issues. I will spend other time to figure out the real reason.
Flags: needinfo?(dmu)
Priority: -- → P3
I have updated my patch to only let CompositorVsyncScheduler::Destroy() to cancel the current VR task. That should not happen the pthread_mutex lock problem again.
Pushed by dmu@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/a540835514ed
Cancel VRListener task when CompositorVsyncScheduler is going to destroy; r=dvander
https://hg.mozilla.org/mozilla-central/rev/a540835514ed
Status: REOPENED → RESOLVED
Closed: 2 years ago2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla59
You need to log in before you can comment on or make changes to this bug.