WebVR framerate drops to < 1 FPS after several minutes, requires full restart
Categories
(Core :: WebVR, defect)
Tracking
()
People
(Reporter: gfodor, Assigned: daoshengmu)
References
Details
Attachments
(3 files, 1 obsolete file)
139.73 KB,
image/jpeg
|
Details | |
123.08 KB,
image/jpeg
|
Details | |
47 bytes,
text/x-phabricator-request
|
lizzard
:
approval-mozilla-beta+
|
Details | Review |
Comment 1•6 years ago
|
||
Assignee | ||
Comment 2•6 years ago
|
||
Assignee | ||
Comment 3•6 years ago
|
||
Comment 4•6 years ago
|
||
Assignee | ||
Comment 5•6 years ago
|
||
Comment 6•6 years ago
|
||
Assignee | ||
Comment 7•6 years ago
|
||
Assignee | ||
Updated•6 years ago
|
Assignee | ||
Comment 8•6 years ago
|
||
To reproduce this. Go to https://webvr.info/samples/04-simple-mirroring.html in above FF 64 and enter the immersive mode. It usually needs to wait for about 20 minutes. Then we can see the FPS drop to be less than 20.
If we turn off ANGLE with webgl.disable-angle;true, it will not happen. Per this attachment, we can see this regression is from WebGLContext::GetVRFrame(). @jgilbert, do you have idea about the recent ANGLE update?
Assignee | ||
Comment 9•6 years ago
|
||
It can be reproduced after turning off ANGLE with webgl.disable-angle;true although I have to wait around 30 minutes. So, I don't think it is related to ANGLE.
Assignee | ||
Comment 10•6 years ago
|
||
After using MozRegression, I notice it is happened among the versions from 2018-10-10~2018-10-13. One patch that may cause this regression is Bug 1473399.
Comment 11•6 years ago
|
||
we are also seeing this problem with a WebVR app. everything grinds to a total halt after a certain time period (this varies). Firefox 62 has full performance. Firefox 63 demonstrated choppier, lower-FPS behaviour. Firefox 64 runs for a while, then dies and requires a restart.
Updated•6 years ago
|
Assignee | ||
Comment 13•6 years ago
•
|
||
We can reproduce this on Windows 64-bit optimization release build. It doesn't matter if we disable ANGLE, or enable VR process and dom.vr.external. I think it is caused by the deadlock issue between VRService thread and VR_SubmitFrame thread when both of them wanna access mAPIShmem. It is because VR_SubmitFrame is writing to mExternalShmem->browserState at [1], and VRService thread is reading mAPIShmem at [2] simultaneously. So, the browserGenerationA will not be equal to browserGenerationB when happening this deadlock, then it blocks this loop[3].
[1] https://searchfox.org/mozilla-central/rev/c035ee7d3a5cd6913e7143e1bce549ffb4a566ff/gfx/vr/gfxVRExternal.cpp#848
[2] https://searchfox.org/mozilla-central/rev/c035ee7d3a5cd6913e7143e1bce549ffb4a566ff/gfx/vr/service/VRService.cpp#464
[3] https://searchfox.org/mozilla-central/rev/c035ee7d3a5cd6913e7143e1bce549ffb4a566ff/gfx/vr/gfxVRExternal.cpp#275
Assignee | ||
Comment 14•6 years ago
|
||
MozReview-Commit-ID: 7uXdypiXTUH
Assignee | ||
Comment 15•6 years ago
|
||
I have verified this patch works with SteamVR (mac-beta) on Mac OS as well after waiting more than 30 mins.
Assignee | ||
Comment 16•6 years ago
|
||
Assigned it to me because I am giving a patch to fix it.
:ccomorasu, if you are interested in helping QA, I can tell you how to verify it after it lands to m-c.
Thanks.
Comment 17•6 years ago
|
||
Hello Daosheng Mu!
That would be awesome, thank you in advance!
Comment 18•6 years ago
|
||
Hi, how would I go about testing this fix once it is available in a branch or in an experimental build? Would love to verify that our WebVR app no longer dies with Firefox63 and newer.
Comment 19•6 years ago
|
||
Assignee | ||
Comment 20•6 years ago
|
||
(In reply to Esa Ruoho from comment #18)
Hi, how would I go about testing this fix once it is available in a branch or in an experimental build? Would love to verify that our WebVR app no longer dies with Firefox63 and newer.
The Nightly build will come by 24 hours. Or instead, you can try this experimental build (https://queue.taskcluster.net/v1/task/Cg_EIVSwTZebqapj9kWLRA/runs/0/artifacts/public/build/install/sea/target.installer.exe).
Thanks.
Comment 21•6 years ago
|
||
bugherder |
Assignee | ||
Comment 22•6 years ago
|
||
(In reply to Cristina Coroiu [:ccoroiu] from comment #21)
:ccoroiu, please help backout my patch, I verify my patch is not a right fix in the current Nightly.
Thanks for help :)
Comment 23•6 years ago
|
||
Backed out changeset e0034670b26a (bug 1514417) - “Verified it still drop frames from Nightly build”
Backout: https://hg.mozilla.org/integration/autoland/rev/6b9d943ecc2affe25094a0046dbc498ff2d1b96c
Updated•6 years ago
|
Assignee | ||
Comment 24•6 years ago
|
||
MozReview-Commit-ID: FhLBI8l9SJm
Assignee | ||
Comment 25•6 years ago
|
||
After using Windows named mutex way to protect our shmem don't be deadlock when VRSubmit_Frame and VRService threads are trying to access it in multi-threaded or processes mode, this issue will not happen to me anymore. I have verified it on several Windows machines.
One more thing we need to know is this fix only fixes this issue on Windows. For other platforms, like Mac OS and Linux, we should use pthread that we did on Android. But, in order to resolve this issue ASAP and considering most users are from Windows. IMHO, we can handle other platforms' issue at the following bug.
Assignee | ||
Comment 26•6 years ago
|
||
Comment 27•6 years ago
|
||
Comment 28•6 years ago
|
||
bugherder |
Assignee | ||
Comment 29•6 years ago
|
||
The way for doing the QA verification:
Test 1:
- Using the latest version of Nightly.
- Make sure
dom.vr.process.enabled
anddom.vr.external
are true at about:config. - Go to https://webvr.info/samples/04-simple-mirroring.html and click
Enter VR
. - Confirm you see the FPS is 90, then waiting for about 30 mins. If there is no FPS drops to be less than 30. That means we resolve this problem.
Test 2:
- Same as the test 1, but make
dom.vr.process.enabled
anddom.vr.external
to be false. - Go to https://webvr.info/samples/04-simple-mirroring.html and click
Enter VR
. - Confirm you see the FPS is 90, then waiting for about 30 mins. If there is no FPS drops to be less than 30. That means we resolve this problem.
Assignee | ||
Comment 30•6 years ago
•
|
||
(In reply to Daosheng Mu[:daoshengmu] from comment #29)
The way for doing the QA verification:
Test 1:
- Using the latest version of Nightly.
- Make sure
dom.vr.process.enabled
anddom.vr.external
are true at about:config.- Go to https://webvr.info/samples/04-simple-mirroring.html and click
Enter VR
.- Confirm you see the FPS is 90, then waiting for about 30 mins. If there is no FPS drops to be less than 30. That means we resolve this problem.
Test 2:
- Same as the test 1, but make
dom.vr.process.enabled
anddom.vr.external
to be false.- Go to https://webvr.info/samples/04-simple-mirroring.html and click
Enter VR
.- Confirm you see the FPS is 90, then waiting for about 30 mins. If there is no FPS drops to be less than 30. That means we resolve this problem.
Sorry for I have a wrong ni?. I was trying to reach :ccomorasu.
Comment 31•6 years ago
|
||
I reproduced this issue using Fx 67.0a1 (2018-12-14), on Windows 10 x64 with Oculus Rift.
I can confirm this issue is fixed, I verified using both STR from comment 30 on the previously mentioned environment.
Cheers!
Updated•6 years ago
|
Assignee | ||
Comment 32•6 years ago
|
||
Comment on attachment 9039693 [details]
Bug 1514417 - Using named mutex for VR threads to access Shmem on Windows.
Beta/Release Uplift Approval Request
Feature/Bug causing the regression
User impact if declined
Firefox will continue to drop FPS to be less than 20 after several minutes when running WebVR content.
Is this code covered by automated tests?
Yes
Has the fix been verified in Nightly?
Yes
Needs manual test from QE?
No
If yes, steps to reproduce
List of other uplifts needed
Risk to taking this patch
Low
Why is the change risky/not risky? (and alternatives if risky)
This is a regression from Firefox 64, and it has affected lots of WebVR users. We hope we can pick up this patch and the patch from Bug 1523926 to fix the thread deadlock issue in FF 66 and 65 if it is acceptable. I have gotten the QA verification from :ccomorasu, and it also has been tested by WebVR automated tests like WPT, Mochitest, and Reftest. Therefore, I think the risk would be low.
String changes made/needed
Comment 33•6 years ago
|
||
Comment on attachment 9039693 [details]
Bug 1514417 - Using named mutex for VR threads to access Shmem on Windows.
Fix for major WebVR regresison, verified in nightly.
Let's take this for beta 6.
Comment 34•6 years ago
|
||
bugherder uplift |
Updated•6 years ago
|
Updated•6 years ago
|
Comment 35•6 years ago
|
||
This issue is fixed on Fx 66.0b6. I verified using Oculus Rift on Windows 10 x64.
Updated•6 years ago
|
Updated•3 years ago
|
Description
•