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

Issue 592756 link

Starred by 2 users

Issue metadata

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



Sign in to add a comment

Duplicate ozone init with mash_shell + chrome

Project Member Reported by kylec...@chromium.org, Mar 7 2016

Issue description

If you are running mash_shell on Ozone and chrome runs, chrome initializes OzonePlatform. This is after OzonePlatform is already initialized by mus.

#0 0x7f510edf645e base::debug::StackTrace::StackTrace()
#1 0x7f510a8e8c35 ui::OzonePlatform::InitializeForUI()
#2 0x7f510ae01c19 aura::Env::CreateInstance()
#3 0x7f510cc4ffc7 content::BrowserMainLoop::InitializeToolkit()
#4 0x7f510cc506c0 content::BrowserMainRunnerImpl::Initialize()
#5 0x7f510cc49b60 content::BrowserMain()
#6 0x7f510d3b50e2 content::ContentMainRunnerImpl::Run()
#7 0x7f510d3b3ec0 content::ContentMain()
#8 0x7f510f4e7843 ChromeMain
#9 0x7f5107605ec5 __libc_start_main
#10 0x7f510f4e76cf <unknown>

https://code.google.com/p/chromium/codesearch#chromium/src/ui/aura/env.cc&q=env.cc&sq=package:chromium&type=cs&l=92

If that call to OzonePlatform::InitializeForUI() isn't made by chrome then chrome crashes in other places.

[52282:52282:0307/163304:FATAL:ozone_platform.cc(61)] Check failed: instance_. OzonePlatform is not initialized
#0 0x7f399498b45e base::debug::StackTrace::StackTrace()
#1 0x7f39949a3fea logging::LogMessage::~LogMessage()
#2 0x7f399047dde7 ui::OzonePlatform::GetInstance()
#3 0x7f39927e043f content::BrowserMainLoop::PostMainMessageLoopStart()
#4 0x7f39927e56e8 content::BrowserMainRunnerImpl::Initialize()
#5 0x7f39927deb60 content::BrowserMain()
#6 0x7f3992f4a0e2 content::ContentMainRunnerImpl::Run()
#7 0x7f3992f48ec0 content::ContentMain()
#8 0x7f399507c843 ChromeMain
#9 0x7f398d19aec5 __libc_start_main
#10 0x7f399507c6cf <unknown>

https://code.google.com/p/chromium/codesearch#chromium/src/content/browser/browser_main_loop.cc&sq=package:chromium&type=cs&l=672

[88954:88954:0307/164520:FATAL:device_data_manager.cc(71)] Check failed: instance_. DeviceDataManager was not created.
#0 0x7fb05f7128be base::debug::StackTrace::StackTrace()
#1 0x7fb05f7681fc logging::LogMessage::~LogMessage()
#2 0x7fb0537821ef ui::DeviceDataManager::GetInstance()
#3 0x7fb05d830ad9 ui::(anonymous namespace)::IsTouchDevicePresent()
#4 0x7fb05d830a8d ui::GetTouchScreensAvailability()
#5 0x7fb05d80c399 ui::AreTouchEventsEnabled()
#6 0x7fb059be17b2 content::RenderViewHostImpl::ComputeWebkitPrefs()
#7 0x7fb059be5ff4 content::RenderViewHostImpl::OnWebkitPreferencesChanged()
#8 0x7fb059be5ec8 content::RenderViewHostImpl::GetWebkitPreferences()
#9 0x7fb059be09d9 content::RenderViewHostImpl::CreateRenderView()
#10 0x7fb059e7792e content::WebContentsImpl::CreateRenderViewForRenderManager()
#11 0x7fb059785f07 content::RenderFrameHostManager::InitRenderView()
#12 0x7fb05978cc26 content::RenderFrameHostManager::CreateRenderFrame()
#13 0x7fb05978c30b content::RenderFrameHostManager::CreatePendingRenderFrameHost()
#14 0x7fb0597853db content::RenderFrameHostManager::UpdateStateForNavigate()
#15 0x7fb0597847a9 content::RenderFrameHostManager::Navigate()
#16 0x7fb05975bc37 content::NavigatorImpl::NavigateToEntry()
#17 0x7fb05975cbab content::NavigatorImpl::NavigateToPendingEntry()
#18 0x7fb05973b96b content::NavigationControllerImpl::NavigateToPendingEntryInternal()
#19 0x7fb059734c9a content::NavigationControllerImpl::NavigateToPendingEntry()
#20 0x7fb0597351b9 content::NavigationControllerImpl::LoadEntry()
#21 0x7fb059736ff6 content::NavigationControllerImpl::LoadURLWithParams()
#22 0x7fb062f53873 (anonymous namespace)::LoadURLInContents()
#23 0x7fb062f528c8 chrome::Navigate()
#24 0x7fb062fc7679 StartupBrowserCreatorImpl::OpenTabsInBrowser()
#25 0x7fb062fc6755 StartupBrowserCreatorImpl::ProcessSpecifiedURLs()
#26 0x7fb062fc6285 StartupBrowserCreatorImpl::ProcessStartupURLs()
#27 0x7fb062fc56d3 StartupBrowserCreatorImpl::ProcessLaunchURLs()
#28 0x7fb062fc4f10 StartupBrowserCreatorImpl::Launch()
#29 0x7fb062fc049f StartupBrowserCreator::LaunchBrowser()
#30 0x7fb062fbfc49 StartupBrowserCreator::ProcessCmdLineImpl()
#31 0x7fb062fbef40 StartupBrowserCreator::Start()
#32 0x7fb0604a4876 ChromeBrowserMainParts::PreMainMessageLoopRunImpl()
#33 0x7fb0604a3727 ChromeBrowserMainParts::PreMainMessageLoopRun()
#34 0x7fb063a4345d chromeos::ChromeBrowserMainPartsChromeos::PreMainMessageLoopRun()
#35 0x7fb0594fee8f content::BrowserMainLoop::PreMainMessageLoopRun()
#36 0x7fb058b930e9 _ZN4base8internal15RunnableAdapterIMN7content17GpuWatchdogThreadEFvvEE3RunIJEEEvPS3_DpOT_
#37 0x7fb059506639 _ZN4base8internal12InvokeHelperILb0EiNS0_15RunnableAdapterIMN7content15BrowserMainLoopEFivEEEE8MakeItSoIJPS4_EEEiS7_DpOT_
#38 0x7fb0595065fd _ZN4base8internal7InvokerINS_13IndexSequenceIJLm0EEEENS0_9BindStateINS0_15RunnableAdapterIMN7content15BrowserMainLoopEFivEEEFiPS7_EJNS0_17UnretainedWrapperIS7_EEEEENS0_12InvokeHelperILb0EiSA_EEFivEE3RunEPNS0_13BindStateBaseE
#39 0x7fb058be074e base::Callback<>::Run()
#40 0x7fb059dfde6b content::StartupTaskRunner::RunAllTasksNow()
#41 0x7fb0594fd025 content::BrowserMainLoop::CreateStartupTasks()
#42 0x7fb059507fe1 content::BrowserMainRunnerImpl::Initialize()
#43 0x7fb0594f95fd content::BrowserMain()
#44 0x7fb05ae233b6 content::RunNamedProcessTypeMain()
#45 0x7fb05ae24f8d content::ContentMainRunnerImpl::Run()
#46 0x7fb05ae22982 content::ContentMain()
#47 0x7fb0603b073e ChromeMain
#48 0x7fb0603b06a2 main
#49 0x7fb04d78bec5 __libc_start_main
#50 0x7fb0603b0584 <unknown>

https://code.google.com/p/chromium/codesearch#chromium/src/ui/base/touch/touch_device_linux.cc&sq=package:chromium&type=cs&l=15

[90040:90040:0307/164854:FATAL:ozone_platform.cc(61)] Check failed: instance_. OzonePlatform is not initialized
#0 0x7f9657b9c8be base::debug::StackTrace::StackTrace()
#1 0x7f9657bf21fc logging::LogMessage::~LogMessage()
#2 0x7f964bc9545f ui::OzonePlatform::GetInstance()
#3 0x7f965c2fd85f chromeos::system::(anonymous namespace)::InputDeviceSettingsImplOzone::InputDeviceSettingsImplOzone()
#4 0x7f965c2fd7fc chromeos::system::InputDeviceSettings::Get()
#5 0x7f965c2a8564 chromeos::Preferences::ApplyPreferences()
#6 0x7f965c2a6a8b chromeos::Preferences::Init()
#7 0x7f9658cdb0bc ProfileImpl::InitChromeOSPreferences()
#8 0x7f965c2ae49c chromeos::ProfileHelper::ProfileStartup()
#9 0x7f965b44a5fb StartupBrowserCreator::LaunchBrowser()
#10 0x7f965b449c49 StartupBrowserCreator::ProcessCmdLineImpl()
#11 0x7f965b448f40 StartupBrowserCreator::Start()
#12 0x7f965892e876 ChromeBrowserMainParts::PreMainMessageLoopRunImpl()
#13 0x7f965892d727 ChromeBrowserMainParts::PreMainMessageLoopRun()
#14 0x7f965becd45d chromeos::ChromeBrowserMainPartsChromeos::PreMainMessageLoopRun()
#15 0x7f9651988e8f content::BrowserMainLoop::PreMainMessageLoopRun()
#16 0x7f965101d0e9 _ZN4base8internal15RunnableAdapterIMN7content17GpuWatchdogThreadEFvvEE3RunIJEEEvPS3_DpOT_
#17 0x7f9651990639 _ZN4base8internal12InvokeHelperILb0EiNS0_15RunnableAdapterIMN7content15BrowserMainLoopEFivEEEE8MakeItSoIJPS4_EEEiS7_DpOT_
#18 0x7f96519905fd _ZN4base8internal7InvokerINS_13IndexSequenceIJLm0EEEENS0_9BindStateINS0_15RunnableAdapterIMN7content15BrowserMainLoopEFivEEEFiPS7_EJNS0_17UnretainedWrapperIS7_EEEEENS0_12InvokeHelperILb0EiSA_EEFivEE3RunEPNS0_13BindStateBaseE
#19 0x7f965106a74e base::Callback<>::Run()
#20 0x7f9652287e6b content::StartupTaskRunner::RunAllTasksNow()
#21 0x7f9651987025 content::BrowserMainLoop::CreateStartupTasks()
#22 0x7f9651991fe1 content::BrowserMainRunnerImpl::Initialize()
#23 0x7f96519835fd content::BrowserMain()
#24 0x7f96532ad3b6 content::RunNamedProcessTypeMain()
#25 0x7f96532aef8d content::ContentMainRunnerImpl::Run()
#26 0x7f96532ac982 content::ContentMain()
#27 0x7f965883a73e ChromeMain
#28 0x7f965883a6a2 main
#29 0x7f9645c15ec5 __libc_start_main
#30 0x7f965883a584 <unknown>

https://code.google.com/p/chromium/codesearch#chromium/src/chrome/browser/chromeos/system/input_device_settings_impl_ozone.cc&sq=package:chromium&type=cs&l=61

This can be reproduced with a build using the following GN arguments:
use_goma = true
is_component_build = true
is_debug = true
use_ozone = true
ozone_auto_platforms = false
ozone_platform_x11 = true
current_os = "chromeos"

# Build/Run
ninja -j1000 -k50 -C out_ozone/debug chrome chrome_sandbox mash:all
out_ozone/debug/mojo_runner mojo:mash_shell --ozone-platform=x11
 
Cc: -kylec...@chromium.org
Owner: kylec...@chromium.org
Status: Started (was: Untriaged)
Labels: -mustash mustash1
Project Member

Comment 3 by bugdroid1@chromium.org, Mar 23 2016

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

commit 4ed171b7b7cf88fea577208abbe901a125f675dc
Author: kylechar <kylechar@chromium.org>
Date: Wed Mar 23 18:56:35 2016

Stop chrome from initializing ozone inside mash.

The chrome UI process normally initializes ozone. When running inside
mash the mus prcoess owns ozone instead. Add a check for a flag that
signals chrome is running inside mash and don't initialize ozone in that
case.

BUG= 592756 

Review URL: https://codereview.chromium.org/1825733003

Cr-Commit-Position: refs/heads/master@{#382894}

[modify] https://crrev.com/4ed171b7b7cf88fea577208abbe901a125f675dc/ui/aura/env.cc

Labels: pixelmus
That patch will stop browser UI process from initializing OzonePlatform when running inside mash. There are still multiple places the browser process will crash when trying to use OzonePlatform that need to be handled.
Components: -MUS MUS>Phase>1
Labels: OS-Chrome
I'm seeing another DCHECK here:

[28742:28742:0329/165720:FATAL:ozone_platform.cc(58)] Check failed: instance_. OzonePlatform is not initialized
#0 0x7f4daf62a6de base::debug::StackTrace::StackTrace()
#1 0x7f4daf6802dc logging::LogMessage::~LogMessage()
#2 0x7f4da363f8df ui::OzonePlatform::GetInstance()
#3 0x7f4da93bf15e content::BrowserMainLoop::PostMainMessageLoopStart()
#4 0x7f4da93cb1d7 content::BrowserMainRunnerImpl::Initialize()
#5 0x7f4da93bc5cd content::BrowserMain()
#6 0x7f4daac8ff06 content::RunNamedProcessTypeMain()
#7 0x7f4daac91ae9 content::ContentMainRunnerImpl::Run()
#8 0x7f4daac8f4c2 content::ContentMain()
#9 0x7f4db02fe831 ChromeMain
#10 0x7f4db02fe792 main
#11 0x7f4d9d786ec5 __libc_start_main
#12 0x7f4db02fe674 <unknown>

I'm running an oxygen debug build via:
ninja -C out/Default -j 1000 -l 20 mash:all chrome chrome_sandbox && out/Default/mojo_runner mojo:mash_session --ozone-platform=x11

Same thing happens with:
out/Default/chrome --mash --user-data-dir=/w/udd --ozone-platform=x11

That was expected after my last patch to not initialize Ozone. I was looking into the next step of fixing it, however, crrev.com/1262043002 changed the way CientNativePixmapFactory worked and removed the dependency on Ozone. So that particular problem is solved as of earlier today.

The browser UI process was crashing in a few other places earlier but at HEAD that doesn't seem to be happening. Maybe the renderer processes aren't starting? Not quite sure, nothing happens even if you try to launch "exe:chrome".
Cc: fsam...@chromium.org sadrul@chromium.org sky@chromium.org
Status: Fixed (was: Started)
Status: Verified (was: Fixed)
Bulk verified
Components: Internals>Services>WindowService
Components: -MUS>Phase>1

Sign in to add a comment