New issue
Advanced search Search tips

Issue 854347 link

Starred by 2 users

Issue metadata

Status: Assigned
Owner:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 1
Type: Bug
Proj-XR



Sign in to add a comment

DCHECK causing flaky VR entry

Project Member Reported by bsheedy@chromium.org, Jun 19 2018

Issue description

I'm occasionally getting some browser crashes during tests locally due to a failing DCHECK. This doesn't appear to be happening on the bots, at least not frequently, so it may be a race condition that only happens on faster devices.

The failing DCHECK is !gpu_trace_ || gpu_trace_->fence()->HasCompleted() in vr_shell_gl.cc (https://cs.chromium.org/chromium/src/chrome/browser/android/vr/vr_shell_gl.cc?q=vr_shell_gl.cc&sq=package:chromium&dr&l=1890). Assigning to klausw@ since this appears GPU-related and the person who originally added the check (bshe) has left the team.

So far, I've only seen this in VrShellNativeUiTest#testUrlOnNativeUi and VrShellTransitionTest#testEnterVrInOverviewMode with Daydream View paired, although I imagine it could happen in any VR browser test.

There doesn't seem to be a specific time when this happens - one time occurred shortly after VR entry (GVR seems to have gone through all its setup properly), and another time seems to have occurred before any VR setup was done at all.
 
Attached are logcats for the two times I've seen this locally.
logcat_org.chromium.chrome.browser.vr_shell.VrShellNativeUiTest.testUrlOnNativeUi_20180619T205252-UTC_HT7AK1A01905
130 KB Download
logcat_org.chromium.chrome.browser.vr_shell.VrShellTransitionTest.testEnterVrInOverviewMode_20180619T204922-UTC_HT7AK1A01905
101 KB Download
Symbolized stack trace.
gpu_trace_dcheck_failure.txt
15.7 KB View Download

Comment 3 by klausw@chromium.org, Jun 19 2018

Status: Started (was: Assigned)
This looks like a race condition, speculative fix in https://chromium-review.googlesource.com/c/chromium/src/+/1107013

Project Member

Comment 4 by bugdroid1@chromium.org, Jun 20 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/f841373183512995ec359f189e6e7300ab87b7b8

commit f841373183512995ec359f189e6e7300ab87b7b8
Author: Klaus Weidner <klausw@chromium.org>
Date: Wed Jun 20 01:59:24 2018

Fix DCHECK for VR Browsing's gpu trace fence

This fence is used to measure render time in VR Browsing mode. Replacing the
gpu_fence_ member after GVR Submit has a race condition - GVR internally
creates a fence when submitting and blocks the next Submit until the previous
submitted frame's fence is complete, but the separate render time fence was
created after submitting, so we may end up with a situation where this second
fence hasn't registered as complete yet.

Update the order to create the new fence first in a locally scoped variable
before GVR submit, then overwrite the previous fence only after GVR submit
completes.

BUG=854347

Change-Id: I8359f67859016039b2ddf5d54d5f391c5e212918
Reviewed-on: https://chromium-review.googlesource.com/1107013
Reviewed-by: Bill Orr <billorr@chromium.org>
Commit-Queue: Klaus Weidner <klausw@chromium.org>
Cr-Commit-Position: refs/heads/master@{#568694}
[modify] https://crrev.com/f841373183512995ec359f189e6e7300ab87b7b8/chrome/browser/android/vr/vr_shell_gl.cc

Comment 5 by klausw@chromium.org, Jun 20 2018

Status: Fixed (was: Started)
Marking fixed based on bsheedy@'s tests not showing a recurrence so far, please reopen if it shows again.
Status: Assigned (was: Fixed)
Just encountered this again on ToT.
Looks like the same stack trace.
gpu_trace_dcheck_failure_round2.txt
15.7 KB View Download
Linked image attached below for those that don't have access to the swarming results server.
98780fe55a3fffd273c87ffe8a4e5b79a399306d.png
889 KB View Download
The "Aw Snap" looks like a Renderer crash, while the original DCHECK failure was in the Browser process in vr_shell_gl. Can you file that separately if you have more info on it? I'm looking into a workaround for the DCHECK.
Trying to get a stack trace, will file a bug once I get one.
Components: Internals>XR
Removing Internals>VR component and assigning to Internals>XR
Components: -Internals>VR
Labels: -VR-Caught-By-Test XR-Caught-By-Test

Sign in to add a comment