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

Issue 653976 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Oct 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

Mus+Ash oxygen build fails some cc unit tests

Project Member Reported by fsam...@chromium.org, Oct 7 2016

Issue description

    SurfacesPixelTest.DrawAggregatedFrameWithSurfaceTransforms (../../cc/surfaces/surfaces_pixeltest.cc:194)
    SurfacesPixelTest.DrawSimpleAggregatedFrame (../../cc/surfaces/surfaces_pixeltest.cc:105)
    SurfacesPixelTest.DrawSimpleFrame (../../cc/surfaces/surfaces_pixeltest.cc:60)

Stack trace:

[73722:73723:1007/141022:2693230173799:FATAL:x11_surface_factory.cc(171)] Check failed: thread_checker_.CalledOnValidThread().                                     
#0 0x7f2617f94afe base::debug::StackTrace::StackTrace()                                                                                                            
#1 0x7f2617ffb4ec logging::LogMessage::~LogMessage()                                                                                                               
#2 0x7f26178d0c3c ui::X11SurfaceFactory::GetGLOzone()                                                                                                              
#3 0x7f261aef3d0f gl::init::HasGLOzone()                                                                                                                           
#4 0x7f261aef3c50 gl::init::HasGLOzone()                                                                                                                           
#5 0x7f261aef38fe gl::init::CreateOffscreenGLSurface()                                                                                                             
#6 0x7f261a1ae42f gpu::InProcessCommandBuffer::InitializeOnGpuThread()                                                                                             

 
Owner: kylec...@chromium.org
Status: Assigned (was: Untriaged)
Components: Internals>Graphics
Labels: Proj-Ozone
Doesn't sound like it's mus/mustash related?
Not specifically I guess but it's a cc_unittests crash when I have an oxygen build :P
I had added the DCHECK to make running with Ozone X11 off device have similar thread constraints as Ozone GBM on device has. Apparently this breaks tests under Ozone X11. No trybots run tests as Ozone X11 but we'd like that to happen some day...

So, I'll take a closer look at what we can do. I can just revert the change that caused this. It loses some protection against breaking on device though. I'll try and find a better approach. 
The root of the problem is that GL initialization code is being called from cc_test_suite.cc in the main thread here.

https://cs.chromium.org/chromium/src/cc/test/cc_test_suite.cc?q=cc_test_suite.cc&sq=package:chromium&dr&l=21

As part of the test InProcessCommandBuffer tries to create an offscreen GL surface from the GPU thread. It's not the thread the OzonePlatform::InitializeForGPU() was called from so it's an error.
mus_ws_unittests is also failing btw.
There will be a bunch of tests that fail for similar reasons. Any test suite that calls gl::GLSurfaceTestSupport::InitializeOneOff() will likely fail.

https://cs.chromium.org/search/?q=gl::GLSurfaceTestSupport::InitializeOneOff&sq=package:chromium&type=cs

However, mus_ws_unittests actually has a totally different cause. In it we call OzonePlatform::InitializeForGPU() from the GPU thread. This is working as expected and the first test passes without problems.

However, that GPU thread is destroyed when the test ends. The next test creates a new GPU thread and OzonePlatform has already been initialized. When we try to use X11SurfaceFactory it's from the wrong GPU thread on the second test and it crashes.
Labels: Proj-Mustash-Mus-GPU
This sort of issue is part of why I don't like embedding ozone gpu init in the GL init.

Project Member

Comment 11 by bugdroid1@chromium.org, Oct 11 2016

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

commit e957ac9d29f16e67c5de264efe6f20c536a0ce51
Author: kylechar <kylechar@chromium.org>
Date: Tue Oct 11 23:33:44 2016

Revert of Add ThreadChecker for Ozone X11 GPU. (patchset #1 id:1 of https://codereview.chromium.org/2366643002/ )

Reason for revert:
Breaks multiple unit tests under Ozone X11.

Original issue's description:
> Add ThreadChecker for Ozone X11 GPU.
>
> Ensure Ozone X11 tests the same thread constraints we have in Ozone GBM.
>
> BUG=none
>
> Committed: https://crrev.com/0d77de2f5334b6d560487c5fd696178a3bfc3551
> Cr-Commit-Position: refs/heads/master@{#421817}

TBR=sadrul@chromium.org
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG= 653976 

Review-Url: https://codereview.chromium.org/2409263002
Cr-Commit-Position: refs/heads/master@{#424594}

[modify] https://crrev.com/e957ac9d29f16e67c5de264efe6f20c536a0ce51/ui/ozone/platform/x11/x11_surface_factory.cc
[modify] https://crrev.com/e957ac9d29f16e67c5de264efe6f20c536a0ce51/ui/ozone/platform/x11/x11_surface_factory.h

Status: Fixed (was: Assigned)
Components: -Internals>Graphics Internals>GPU
Moving old issues out of Internal>Graphics to delete this obsolete component ( crbug.com/685425  for details)

Sign in to add a comment