VR Browser navigation tests failing due to DCHECK |
||||||||
Issue descriptionSince this group of CLs (https://build.chromium.org/p/chromium.fyi/builders/Android%20VR%20Tests/builds/8769) went in, the VrShellNavigationTest tests have a fairly high chance (~30%) of failing due to this DCHECK https://cs.chromium.org/chromium/src/chrome/browser/android/thumbnail/thumbnail_cache.cc?q=thumbnail_meta_data&dr=C&l=173. This is easily reproducible by running the end-to-end tests locally with "--test-filter VrShellNavigationTest#*" a few times. Whether the change to VR is directly causing this or just exposed an existing bug isn't clear at the moment. This looks similar to Issue 592961, but happens much more frequently.
,
Jul 10 2017
Assigning to powei@ since they wrote they originally wrote the code with the failing DCHECK several years ago. Feel free to re-assign to a more appropriate person. According to mthiesse@, this appears to be caused by a race condition in the thumbnail cache. It updates the metadata, asynchronously reads the thumbnail, then expects the metadata to still be there when it's finished. This might be a pretty safe assumption normally, but with VR, we do some wonky things like disable the compositor while paused.
,
Jul 10 2017
Re-assigning to dtrainor@ since powei@ appears to have stopped working on Chromium a couple of years ago and David was one of the reviewers of the CL. Again, feel free to re-assign to a more appropriate person.
,
Jul 10 2017
Assigning to xingliu@ to take a look if he has cycles. Xing if you don't let me know.
,
Jul 13 2017
These tests are under @Restriction(RESTRICTION_TYPE_VIEWER_DAYDREAM), do we need particular kind of device to run these tests?
,
Jul 13 2017
RESTRICTION_TYPE_VIEWER_DAYDREAM refers to having the Daydream View headset paired with the device (as opposed to Cardboard), although it also implies that the test is run on a Daydream-ready device (Pixel and Pixel XL for testing purposes). If you don't have access to one of those, there are several Pixel XL devices available on swarming that you can run tests on - I can send you instructions on how to do that if necessary. Whether you're testing locally or on swarming, though, the VR tests require passing a few additional arguments to the test runner in order to run properly - I'll ping you with details shortly.
,
Jul 13 2017
out/Debug/bin/run_chrome_public_test_vr_apk --test-filter *VrShellNavigationTest#* --shared-prefs-file chrome/android/shared_preference_files/test/vr_ddview_skipdon_setupcomplete.json --repeat 5 Hit one DCHECK in thumbnail_cache. Device: Pixel XL, Android O, Google VR Service app version: 1.7.16000338
,
Jul 14 2017
The logic flow is basically this: 1. The tests pause the activity(ChromeActivity.onPauseWithNative), and ask to cache the tab as thumbnail, which is async and bitmap will arrive later. 2. Then the renderer is still navigating and WebContentObserver propagates didStartNavigation(eventually call TabModelSelectorImpl.onPageLoadStarted), which changes the url of the tab and erase the thumbnail metadata. 3. Then the bitmap of thumbnail arrive, but metadata has been erased. Hit DCHECK. Does any recent VR CL pause Chrome when during launch? Probably we can just dump away the thumbnail in this case.
,
Jul 14 2017
mthiesse@ would probably be a much better person to ask, but AFAIK there hasn't been a recent VR change that causes Chrome to pause during launch. In fact, AFAIK, we've recently moved away from pausing while in VR.
,
Jul 14 2017
We do pause when entering VR, but this should happen after the website is already loaded and asks to enter VR. We pause to show the Device ON flow, then return to Chrome. One possible cause is that we pause the compositor while WebVR is active, so you might not get thumbnails during this time? Not sure.
,
Jul 14 2017
,
Jul 17 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/037c2473223cfc407d40dc54b4fb45eccbff453e commit 037c2473223cfc407d40dc54b4fb45eccbff453e Author: Xing Liu <xingliu@chromium.org> Date: Mon Jul 17 22:23:36 2017 Dump the bitmap of thumbnail if no thumbnail meta data associated. When we cache the tab as thumbnail. It copies the bitmap from renderer asynchronously and the bitmap will be put to thumbnail cache later. But navigation can still happen, if the tab navigates to another URL, the thumbnail metadata in thumbnail_cache.cc will be removed, if bitmap arrives after this, we can dump the bitmap instead of assuming the metadata is still there. In VR related tests, we cache the thumbnail when ChromeActivity is paused, and then the WebContent navigates to another URL, which erase the thumbnail metadata, then the bitmap arrives. Bug: 738490 Change-Id: I980d90020170f609c7aa4a17a1e42a18ab553a4a Reviewed-on: https://chromium-review.googlesource.com/570782 Commit-Queue: Xing Liu <xingliu@chromium.org> Reviewed-by: David Trainor <dtrainor@chromium.org> Cr-Commit-Position: refs/heads/master@{#487276} [modify] https://crrev.com/037c2473223cfc407d40dc54b4fb45eccbff453e/chrome/browser/android/thumbnail/thumbnail_cache.cc
,
Jul 17 2017
,
Mar 1 2018
,
Aug 29
|
||||||||
►
Sign in to add a comment |
||||||||
Comment 1 by bsheedy@chromium.org
, Jun 30 2017