Issue metadata
Sign in to add a comment
|
Chrome fails to start with --mash, when built with ozone/wayland |
||||||||||||||||||||
Issue description* GN args: $ more out/ozone/chrome_os/args.gn is_debug = false use_sysroot = false target_os = "chromeos" use_ozone = true ozone_platform_x11 = true ozone_platform_wayland = true * Error: $ out/ozone/chrome_os/chrome --mash --ozone-platform=wayland --no-sandbox --user-data-dir=~/tmp- --ignore-gpu-blacklist (...) EGLConfig gl::(anonymous namespace)::ChooseConfig(GLSurface::Format):262 format:0 ERROR:gl_surface_egl.cc(253)] No suitable EGL configs found. EGLConfig gl::(anonymous namespace)::ChooseConfig(GLSurface::Format):347 ERROR:gl_surface_egl.cc(1037)] eglCreatePbufferSurface failed with error EGL_BAD_CONFIG Received signal 11 SEGV_MAPERR 000000000300 * Backtrace: virtual EGLConfig gl::GLSurfaceEGL::GetConfig():485 this:0x2e6107adbfc0 #0 0x55feb719718e base::debug::StackTrace::StackTrace() #1 0x55feb7b53b51 gl::GLSurfaceEGL::GetConfig() #2 0x55feb7b55b22 gl::PbufferGLSurfaceEGL::Initialize() #3 0x55feb7b55901 gl::PbufferGLSurfaceEGL::Initialize() #4 0x55feb7b507f2 gl::InitializeGLSurface() #5 0x55feb5bb0ae1 ui::WaylandSurfaceFactory::CreateOffscreenGLSurface() #6 0x55feb7f7ca0a gl::init::CreateOffscreenGLSurface() #7 0x55feb7f7e8b9 gpu::GpuChannelManager::GetDefaultOffscreenSurface() #8 0x55feb7f88d1a gpu::GpuCommandBufferStub::Initialize() #9 0x55feb7f889af gpu::GpuCommandBufferStub::Create() #10 0x55feb7f87d61 gpu::GpuChannel::CreateCommandBuffer() #11 0x55feb7f82290 gpu::GpuChannel::OnCreateCommandBuffer() #12 0x55feb7f820c8 _ZN3IPC8MessageTI38GpuChannelMsg_CreateCommandBuffer_MetaSt5tupleIJ28GPUCreateCommandBufferConfigiN4base14FileDescriptorEEES2_IJbN3gpu12CapabilitiesEEEE8DispatchINS7_10GpuChannelESC_vMSC_FvRKS3_iS5_PbPS8_EEEbPKNS_7MessageEPT_PT0_PT1_T2_ #13 0x55feb7f81f1a gpu::GpuChannel::OnControlMessageReceived() #14 0x55feb7f87912 gpu::GpuChannel::HandleMessageHelper() #15 0x55feb7f87874 gpu::GpuChannel::HandleMessage() #16 0x55feb7201d00 base::debug::TaskAnnotator::RunTask() #17 0x55feb71ad835 base::MessageLoop::RunTask() #18 0x55feb71adb18 base::MessageLoop::DeferOrRunPendingTask() #19 0x55feb71adf0b base::MessageLoop::DoWork() #20 0x55feb71aedda base::MessagePumpDefault::Run() #21 0x55feb71c789e base::RunLoop::Run() #22 0x55feb71e2a57 base::Thread::ThreadMain() #23 0x55feb71df213 base::(anonymous namespace)::ThreadFunc() #24 0x7face450861a start_thread #25 0x7face0be45fd __clone * Regression: I have bisect'ed when the error started, and found: commit ee79ef399c3f4d2e3652981674eac9347e4b6a1a Author: kylechar <kylechar@chromium.org> Date: Fri Jul 29 06:46:49 2016 -0700 Convert Ozone wayland to directly create GLSurfaces. The Ozone wayland platform now directly creates an appropriate GLSurface instead of creating a SurfaceOzoneEGL. Remove the SurfaceOzoneEGL subclass and add a new GLSurface subclass. BUG= 611142 Review-Url: https://codereview.chromium.org/2187443003 For the record, m54 launches chromium mash/ozone/wayland fine, m55 does not.
,
Sep 26 2016
indeed. kylechar@: can you comment?
,
Sep 26 2016
Very strange. I had chrome --mash --ozone-platform=wayland --no-sandbox working with that patch under Weston 1.11 in a VM. CreateOffscreenGLSurface() would have hit the following code before the patch: https://chromium.googlesource.com/chromium/src/+/d6455ff601505aa6b111b087b3ee5af30a3cc385/ui/gl/init/gl_factory_ozone.cc#88 So there is a possibility it was using SufacelessEGL instead of PBufferGLSurfaceEGL on your system? Is that the case and does the current version work if you change GLOzoneEGLWayland::CreateOffscreenGLSurface() to create a SurfacelessEGL instead? https://cs.chromium.org/chromium/src/ui/ozone/platform/wayland/wayland_surface_factory.cc?q=GLOzoneEGLWayland::CreateOffscreenGLSurface
,
Sep 26 2016
> So there is a possibility it was using SufacelessEGL instead of PBufferGLSurfaceEGL on your system? Is that the case and does the current version work if you change GLOzoneEGLWayland::CreateOffscreenGLSurface() to create a SurfacelessEGL instead? Switching from PBufferGLSurfaceEGL to SufacelessEGL in GLOzoneEGLWayland::CreateOffscreenGLSurface() does make the start up *not* fail.
,
Sep 30 2016
Hmm, I could change GLOzoneEGLWayland::CreateOffscreenGLSurface to be the following and that should fix it:
if (gl::GLSurfaceEGL::IsEGLSurfacelessContextSupported() &&
size.width() == 0 && size.height() == 0) {
return gl::InitializeGLSurface(new gl::SurfacelessEGL(size));
} else {
return gl::InitializeGLSurface(new gl::PbufferGLSurfaceEGL(size));
}
Do we know if Ozone Wayland is expected to use SurfacelessEGL for offscreen surfaces?
,
Oct 3 2016
In reply to comment #5, I have uploaded a CL with your advice: https://codereview.chromium.org/2387063002/
,
Oct 3 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/903932cf3bcfa9a0eb58b3660c9bad83c4c7e3d3 commit 903932cf3bcfa9a0eb58b3660c9bad83c4c7e3d3 Author: tonikitoo <tonikitoo@igalia.com> Date: Mon Oct 03 18:52:31 2016 Use SurfacelessEGL for ozone/wayland, when supported Since [1], chrome --mash --ozone-platform=wayland fails to launch in some systems, where the call to PbufferGLSurfaceEGL::Initialize (ui/gl/gl_surface_egl.cc) fails at EGLSurface new_surface = eglCreatePbufferSurface(display, GetConfig(), &pbuffer_attribs[0]); ... because GetConfig does not return a valid EGLConfig instance. As per @kylechar's advice, this CL opt-in for a SufacelessEGL creation, if supported, rather than PbufferGLSurfaceEGL, similarly to how it was prior to [1]. [1] https://codereview.chromium.org/2187443003 BUG= 650284 , 611142 Review-Url: https://codereview.chromium.org/2387063002 Cr-Commit-Position: refs/heads/master@{#422475} [modify] https://crrev.com/903932cf3bcfa9a0eb58b3660c9bad83c4c7e3d3/ui/ozone/platform/wayland/wayland_surface_factory.cc
,
Oct 4 2016
Thanks tonikitoo.
,
Oct 5 2016
With https://codereview.chromium.org/2387063002 and https://codereview.chromium.org/2389053003 chrome ozone/wayland/chromeos/mash works "off device". |
|||||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||||
Comment 1 by toniki...@chromium.org
, Sep 26 2016