intel / ozone-wayland

Wayland implementation for Chromium Ozone classes
BSD 3-Clause "New" or "Revised" License
218 stars 82 forks source link

Chromium crashes while trying to use it #155

Closed joone closed 10 years ago

joone commented 10 years ago

Chrome starts well, but it cashes while trying to use the browser. Sometimes, weston crashes together.

..
..
[16740:16740:1204/160953:ERROR:desktop_root_window_host_wayland.cc(701)] Not implemented reached in virtual void ozonewayland::DesktopRootWindowHostWayland::SetCursor(gfx::NativeCursor)
[16740:16740:1204/160954:ERROR:desktop_root_window_host_wayland.cc(581)] Not implemented reached in virtual void ozonewayland::DesktopRootWindowHostWayland::OnNativeWidgetFocus()
[16:09:56.297] libwayland: disconnect from client 0x1ea0b40
[16766:16766:1204/160956:ERROR:gles2_cmd_decoder.cc(8918)] Context lost because SwapBuffers failed.
[16766:16766:1204/160956:ERROR:gpu_scheduler.cc(92)] [0x311f9581a920] GPU PARSE ERROR: 5
[16740:16740:1204/160956:FATAL:compositor.cc(532)] Check failed: posted_swaps_->AreSwapsPosted(). 
 [0x7f59188c03c0] base::debug::StackTrace::StackTrace()
 [0x7f591890031b] logging::LogMessage::~LogMessage()
 [0x7f5919737564] ui::Compositor::DidCompleteSwapBuffers()
 [0x7f591d9b615d] cc::SingleThreadProxy::OnSwapBuffersCompleteOnImplThread()
 [0x7f591d98c5a9] cc::LayerTreeHostImpl::OnSwapBuffersComplete()
 [0x7f591d914633] cc::OutputSurface::OnSwapBuffersComplete()
 [0x7f591d917643] base::internal::RunnableAdapter<>::Run()
 [0x7f591d91754d] base::internal::InvokeHelper<>::MakeItSo()
 [0x7f591d9173e7] base::internal::Invoker<>::Run()
 [0x7f5917bce842] base::Callback<>::Run()
 [0x7f591d8423b9] content::ContextProviderCommandBuffer::OnSwapBuffersComplete()
 [0x7f591d8434fe] content::ContextProviderCommandBuffer::SwapBuffersCompleteCallbackProxy::onSwapBuffersComplete()
 [0x7f591d8690a9] content::WebGraphicsContext3DCommandBufferImpl::OnSwapBuffersComplete()
 [0x7f591d86d291] base::internal::RunnableAdapter<>::Run()
 [0x7f591d86cdb4] base::internal::InvokeHelper<>::MakeItSo()
 [0x7f591d86c66f] base::internal::Invoker<>::Run()
 [0x7f5917bce842] base::Callback<>::Run()
 [0x7f591d837512] content::CommandBufferProxyImpl::OnEchoAck()
 [0x7f591d83a4ca] IPC::Message::Dispatch<>()
 [0x7f591d837009] content::CommandBufferProxyImpl::OnMessageReceived()
 [0x7f591d85a45d] base::internal::RunnableAdapter<>::Run()
 [0x7f591d859203] base::internal::InvokeHelper<>::MakeItSo()
 [0x7f591d8581f4] base::internal::Invoker<>::Run()
 [0x7f5917bce842] base::Callback<>::Run()
 [0x7f591890b580] base::MessageLoop::RunTask()
 [0x7f591890b6be] base::MessageLoop::DeferOrRunPendingTask()
 [0x7f591890bbff] base::MessageLoop::DoWork()
 [0x7f59188ad9d8] base::MessagePumpLibevent::Run()
 [0x7f591890b07c] base::MessageLoop::RunInternal()
 [0x7f591890af20] base::MessageLoop::RunHandler()
 [0x7f591893ea18] base::RunLoop::Run()
 [0x7f591816948a] ChromeBrowserMainParts::MainMessageLoopRun()
 [0x7f591c13a184] content::BrowserMainLoop::RunMainMessageLoopParts()
 [0x7f591c140e7a] content::BrowserMainRunnerImpl::Run()
 [0x7f591c13622b] content::BrowserMain()
 [0x7f59188a017c] content::RunNamedProcessTypeMain()
 [0x7f59188a1295] content::ContentMainRunnerImpl::Run()
 [0x7f591889f50b] content::ContentMain()
 [0x7f5917a6b105] ChromeMain
 [0x7f5917a6b0d0] main
 [0x7f591309d76d] __libc_start_main
 [0x7f5917a6afa9] <unknown>

Aborted (core dumped)
joone@joone-webkit:~/WaylandBuild/rel/bin$ [1204/160957:ERROR:nacl_helper_linux.cc(236)] NaCl helper process running without a sandbox!
Most likely you need to configure your SUID sandbox correctly
joone commented 10 years ago

Now, Chromium works fine on my desktop (Ubunt12.04) by fixing two problems: 1) Replacing proprietary AMD Radeon driver with open source driver. 2) Update depot_tools (it fixed a link problem)

However, it is still unstable on my laptop(Ivy-bridge, Ubuntu12.10).

joone commented 10 years ago
[09:23:46.179] libwayland: disconnect from client 0x278c290
[19366:19366:0117/092346:ERROR:gles2_cmd_decoder.cc(9078)] Context lost because SwapBuffers failed.
[19366:19366:0117/092346:ERROR:gpu_scheduler.cc(94)] [0x27d0b91b0a20] GPU PARSE ERROR: 5
[19342:19342:0117/092346:FATAL:compositor.cc(538)] Check failed: posted_swaps_->AreSwapsPosted(). 
 [0x7fb0788d16f8] base::debug::StackTrace::StackTrace()
 [0x7fb07892af83] logging::LogMessage::~LogMessage()
 [0x7fb079bd150e] ui::Compositor::DidCompleteSwapBuffers()
 [0x7fb079d27147] cc::SingleThreadProxy::OnSwapBuffersCompleteOnImplThread()
 [0x7fb079cf4a93] cc::LayerTreeHostImpl::OnSwapBuffersComplete()
 [0x7fb079dadb95] cc::OutputSurface::OnSwapBuffersComplete()
 [0x7fb079db0c71] base::internal::RunnableAdapter<>::Run()
 [0x7fb079db0b6d] base::internal::InvokeHelper<>::MakeItSo()
 [0x7fb079db09fe] base::internal::Invoker<>::Run()
 [0x7fb0777d26e8] base::Callback<>::Run()
 [0x7fb07eec18e7] gpu::gles2::GLES2Implementation::OnSwapBuffersComplete()
 [0x7fb07eefec8f] base::internal::RunnableAdapter<>::Run()
 [0x7fb07eefd240] base::internal::InvokeHelper<>::MakeItSo()
 [0x7fb07eefaa6d] base::internal::Invoker<>::Run()
 [0x7fb0777d26e8] base::Callback<>::Run()
 [0x7fb07e83b9f6] content::CommandBufferProxyImpl::OnEchoAck()
 [0x7fb07e83eef6] IPC::Message::Dispatch<>()
 [0x7fb07e83b4ed] content::CommandBufferProxyImpl::OnMessageReceived()
 [0x7fb07e868391] base::internal::RunnableAdapter<>::Run()
 [0x7fb07e866ae9] base::internal::InvokeHelper<>::MakeItSo()
 [0x7fb07e864fee] base::internal::Invoker<>::Run()
 [0x7fb0777d26e8] base::Callback<>::Run()
 [0x7fb07893b36c] base::MessageLoop::RunTask()
 [0x7fb07893b4aa] base::MessageLoop::DeferOrRunPendingTask()
 [0x7fb07893b9ed] base::MessageLoop::DoWork()
 [0x7fb0788b51c0] base::MessagePumpLibevent::Run()
 [0x7fb07893ae5c] base::MessageLoop::RunHandler()
 [0x7fb0789875bc] base::RunLoop::Run()
 [0x7fb077f4ca80] ChromeBrowserMainParts::MainMessageLoopRun()
 [0x7fb07ca78ace] content::BrowserMainLoop::RunMainMessageLoopParts()
 [0x7fb07ca7f932] content::BrowserMainRunnerImpl::Run()
 [0x7fb07ca7493c] content::BrowserMain()
 [0x7fb0788a6ec5] content::RunNamedProcessTypeMain()
 [0x7fb0788a7fe7] content::ContentMainRunnerImpl::Run()
 [0x7fb0788a61b7] content::ContentMain()
 [0x7fb0775e47e5] ChromeMain
 [0x7fb0775e47b0] main
 [0x7fb072c0b76d] __libc_start_main
 [0x7fb0775e4689] <unknown>

Aborted (core dumped)
kalyankondapally commented 10 years ago

Did you try explicitly setting the native egl platform to be used as Wayland? (I am assuming you are using Mesa on your laptop)

export EGL_PLATFORM=wayland If this is not set, Mesa uses the first platform listed in --with-egl-platforms(while compiling mesa) as the native platform. Now, we ensure this variable is set before dlopen the GL/EGL bindings. Can you try again with latest oz-wl sources and see if the problem persists ?

Also, try enabling EGL debug log to check the EGL search path i.e to find GLES and EGL library which we will dlopen and try to load the function pointers.

You can do this by setting, export EGL_LOG_LEVEL=debug and to check for any Mesa specific logs you could export MESA_DEBUG=1.

On my system, I found out that I was using X11 as the native platform when trying to resolve symbols, even though we should be using Wayland (because of reason stated above). I exported EGL_PLATFORM=wayland, to make sure we use wayland explicitly.

xiangzhai commented 10 years ago

Hi @joone

I meet the same issue like you https://github.com/01org/ozone-wayland/issues/227#issuecomment-39282206

BUT I figured it out :) even if chromium worked not well right now :)

What a shame, I forgot to sudo pkill KDM (STILL running X11 in tty1) when using weston-launch in tty2 at the same time, so when running ./chrome --no-sandbox in tty2, in fact, the chromium was running under KDE (tty1), because I opened the chromium for X11 in tty1 to view github, mailing list, twitter, sort of websites...

So just sudo pkill your DM (GDM, KDM sort of...) at first, then switch to ttyN, play with weston-launch, there is weston-terminal, google-chrome (for X11 just ignore it), isoft relative app at the top of DE, shown as below: 658b3ba1jw1ef0z35go1uj218g0xcjup

Please run ./chrome --no-sandbox to play with it, have fun :)

Regards, Leslie Zhai

tiagovignatti commented 10 years ago

@joone are you still seeing this bug?

joone commented 10 years ago

@tiagovignatti I didn't test the latest build on my desktop.

xiangzhai commented 10 years ago

Hi @joone @tiagovignatti

There is already Chromium 35 based on Aura support X11/Wayland, and Aura is more than UI library, it is the Window Manager and Desktop Environment or even more than that :)

tiagovignatti commented 10 years ago

@xiangzhai yes, we are aware of it :) we are following all this development very closely. Thank you for pointing out anyways!

@joone alright. Would be nice if you could give a try at this again and eventually mention something about it in here.

joone commented 10 years ago

@tiagovignatti I upgraded my Ubuntu 12.10 to 13.10 and then I don't see any crashes in basic browsing. I think that Mesa might have had a problem with old Linux Kernel.

tiagovignatti commented 10 years ago

great. I'm closing then.

xiangzhai commented 10 years ago

@joone my friend @TheNextProject exp such | diff abnormal behavior about Chromium 35 newly based on Aura, is it still owing to Mesa, isn't it?

kalyankondapally commented 10 years ago

@xiangzhai If you project is using oz-wl and is seeing issues, can you share with us the call trace ?

xiangzhai commented 10 years ago

@kalyankondapally recently I git clone the Google upstream Chromium repos thanks to GFW blocking, so I have not yet read chromium/ui/ozone relative source code :)