Crash in VRSystemManagerExternal::PullState when VR process is killed.
Categories
(Core :: WebVR, defect)
Tracking
()
Tracking | Status | |
---|---|---|
firefox68 | --- | fixed |
People
(Reporter: daoshengmu, Assigned: daoshengmu)
References
Details
Attachments
(1 file)
Reproduce steps:
- Open FF and visit https://webvr.info/samples/04-simple-mirroring.html
- Wear on a VR headset and click enter to enter the immersive mode.
- Kill VR process in Process Explorer.
Then, it will break at VRSystemManagerExternal::PullState in GPU process. The reason I think it is race condition with "VR_SubmitFrame" thread. Even though the VR process has been shutdown, the VR_SubmitFrame is still working on its task. We should use CancelableRunnable task as https://dxr.mozilla.org/mozilla-central/rev/c2593a3058afdfeaac5c990e18794ee8257afe99/gfx/layers/ipc/CompositorVsyncScheduler.cpp#125. When VR process is killed, we need to cancel the current CancelableRunnable task.
Updated•5 years ago
|
Assignee | ||
Comment 1•5 years ago
•
|
||
The reason of this crash is because VRDisplay is set to nullptr and release its shmem, but mSubmitThread is still running. then we invalidate access the shmem.
Assignee | ||
Comment 2•5 years ago
|
||
Assignee | ||
Comment 3•5 years ago
•
|
||
We were accessing VRSystemManagerExternal in VRDisplayExternal, that makes us difficult to manage the program flow especially when VRSystemManagerExternal::Shutdown()
. Once calling VRSystemManagerExternal::Shutdown()
, We will destroy VRDisplayExternal and close Shmem, but they are still possible to be accessed by other threads if they still hold the VRDisplayExternal's refPtr.
[1] https://dxr.mozilla.org/mozilla-central/rev/7f816aa10a2053973c4e6977c5d6f6bf15f38820/gfx/vr/gfxVRExternal.cpp#420
[2] https://dxr.mozilla.org/mozilla-central/rev/7f816aa10a2053973c4e6977c5d6f6bf15f38820/gfx/vr/gfxVRExternal.cpp#406
Assignee | ||
Comment 4•5 years ago
|
||
Pushed by apavel@mozilla.com: https://hg.mozilla.org/mozilla-central/rev/56c9aef4b07f Avoid access VR shmem when VR process is crashed accidentally. r=kip
Comment 6•5 years ago
|
||
bugherder |
Comment 7•5 years ago
|
||
bugherder |
Updated•5 years ago
|
Comment 8•5 years ago
|
||
Due to hardware issues we could not verify this bug.
Assignee | ||
Updated•5 years ago
|
Description
•