New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 736384 link

Starred by 5 users

Issue metadata

Status: Fixed
Owner:
Closed: Apr 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 2
Type: Bug



Sign in to add a comment

OzonePlatform::Shutdown() causes tests to fail and be retried

Project Member Reported by kylec...@chromium.org, Jun 23 2017

Issue description

I've noticed that in many test targets there are a bunch of tests that fail on the first run but pass when rerun. I looked into and there is an issue with OzonePlatform::Shutdown().

It's a common pattern for the TestSuite to call GLSurfaceTestSupport::InitializeOneOff() during suite initialization. This calls OzonePlatform::InitializeForGPU(). However individual tests will create and destroy aura::Env which will call OzonePlatform::InitializeForUI() and then OzonePlatform::Shutdown().

Basically the following happens:
1. TestSuite initialization calls OzonePlatform::InitializeForGPU().
2. Test case #1 setup calls OzonePlatform::InitializeForUI().
3. Test case #1 teardown calls OzonePlatform::Shutdown() which deletes the OzonePlatform instance.
4. Test case #2 setup calls OzonePlatform::InitializeForUI().
5. Test case #2 calls OzonePlatform::GetSurfaceFactory(). A new OzonePlatform instance was created in step 4 but the GPU specific parts we not initialized. OzonePlatform::GetSurfaceFactory() returns nullptr. The test fails or crashes.
6. Test case #2 gets rerun individually in a new process. This passes because TestSuite initialization is run again.
 
This can be observed in ui_chromeos_unittests.
is this a dup of  http://crbug.com/728166 
No, I think that is a different issue. This crash isn't at shutdown, it's after things get shutdown and then partially restarted again.
Cc: jonr...@chromium.org
Labels: Proj-Mustash
Owner: rjkroege@chromium.org

Comment 6 by aluo@chromium.org, Nov 22 2017

is crbug/785405 caused by this?
Labels: -Pri-3 Pri-1
It definitely looks like it. rjkroege@ do you have time to fix or should I look into this?
Cc: vadimt@chromium.org newcomer@chromium.org
 Issue 785405  has been merged into this issue.
The problem was introduced in this CL: https://codereview.chromium.org/2795503002

Comment 10 by aluo@chromium.org, Nov 27 2017

Labels: chromium-flakiness
Labels: -Pri-1 Pri-2
Owner: kylec...@chromium.org
kylechar@ does this still happen?
 Issue 728166  has been merged into this issue.
Owner: rjkroege@chromium.org
Status: Fixed (was: Available)
The two targets that have comments saying they're failing were ui_chromeos_unittests and app_list_presenter_unittests. ui_chromeos_unittests was fixed by someone else in  crbug.com/807148 . app_list_presenter_unittests are all disabled now (not sure they weren't deleted). I'm not sure if there are others, but the two mentioned are fixed.

Sign in to add a comment