New issue
Advanced search Search tips

Issue 709593 link

Starred by 2 users

Issue metadata

Status: Archived
Owner:
Closed: May 2017
Cc:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 2
Type: Bug

Blocking:
issue 705716



Sign in to add a comment

chrome --mus shutdown crash at login screen ~WindowTreeClient windows_.empty()

Project Member Reported by jamescook@chromium.org, Apr 7 2017

Issue description

Saw this with ToT chrome from this morning.

Run chrome --mus on device.
At login screen, run "stop ui"

[9643:9643:0407/124606.011430:FATAL:window_tree_client.cc(256)] Check failed: windows_.empty(). 
#0 0x7f978a9d96b7 base::debug::StackTrace::StackTrace()
#1 0x7f978a9ed3eb logging::LogMessage::~LogMessage()
#2 0x7f978bb36437 aura::WindowTreeClient::~WindowTreeClient()
#3 0x7f978bb36789 aura::WindowTreeClient::~WindowTreeClient()
#4 0x7f9789c51598 ash::mus::WindowManager::Shutdown()
#5 0x7f978aa7ebd8 mojo::InterfaceEndpointClient::NotifyError()
#6 0x7f978aa837c0 mojo::internal::MultiplexRouter::ProcessNotifyErrorTask()
#7 0x7f978aa82156 mojo::internal::MultiplexRouter::ProcessTasks()
#8 0x7f978aa8101a mojo::internal::MultiplexRouter::OnPipeConnectionError()
#9 0x7f978aa7cc3d mojo::Connector::HandleError()
#10 0x7f978aa7ce44 mojo::Connector::ReadSingleMessage()
#11 0x7f978aa7d342 mojo::Connector::ReadAllAvailableMessages()
#12 0x7f978aa8ac9b mojo::SimpleWatcher::OnHandleReady()
#13 0x7f978aa60553 base::debug::TaskAnnotator::RunTask()
#14 0x7f978a9f2fdd base::MessageLoop::RunTask()
#15 0x7f978a9f3288 base::MessageLoop::DeferOrRunPendingTask()
#16 0x7f978a9f3666 base::MessageLoop::DoWork()
#17 0x7f978a9f4df9 base::MessagePumpLibevent::Run()
#18 0x7f978a9f2d57 base::MessageLoop::RunHandler()
#19 0x7f978aa122de base::RunLoop::Run()
#20 0x7f978a693cf6 ChromeBrowserMainParts::MainMessageLoopRun()
#21 0x7f97892b24c1 content::BrowserMainLoop::RunMainMessageLoopParts()
#22 0x7f97892b4e9d content::BrowserMainRunnerImpl::Run()
#23 0x7f97892adb76 content::BrowserMain()
#24 0x7f978a653131 content::ContentMainRunnerImpl::Run()
#25 0x7f978bbac5b9 service_manager::Main()
#26 0x7f978a652142 content::ContentMain()
#27 0x7f9788dc29a4 ChromeMain
#28 0x7f978684b796 __libc_start_main
#29 0x7f9788dc2779 _start

Doing a normal shutdown (hold power button instead of "stop ui") seems to shutdown cleanly. Maybe this is related to how the root process / service manager tears things down?

 

Comment 1 by sky@chromium.org, Apr 7 2017

This indicates a window is outliving WindowTreeClient (and the Shell). I remember the classic Shell explicitly allowing this to happen (an aura::Window outliving Shell), but this is problematic in mus as the Shell effectively owns the WindowTreeClient and WindowTreeClient doesn't want any Windows outliving it. We may need to shutdown the shell, and later shut down WindowTreeClient.

Comment 2 by sky@chromium.org, Apr 7 2017

If this blocks a msurhome auto-test assign the bug back to me, and I'll work out a fix.
Cc: kylec...@chromium.org
I don't know if this will block the autotest or not (since we don't have a mushrome one yet) but it might. The mash autotest does shut down chrome at the login screen, similar to "stop ui".

+kylechar FYI

Comment 4 by sky@chromium.org, Apr 20 2017

Labels: mustash-2
Blocking: 705716
Cc: jonr...@chromium.org
This is also blocking mus_browser_tests. Several tests fail during shutdown with this error

Comment 6 by sky@chromium.org, Apr 20 2017

Owner: jonr...@chromium.org
Status: Assigned (was: Untriaged)
Jon, would you be willing to investigate this? I suspect we need a way to release the WindowTreeClient from WindowManager so that we can destroy it later on.
Status: Started (was: Assigned)
Project Member

Comment 8 by bugdroid1@chromium.org, Apr 28 2017

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

commit 01c007bd982841a14c4a8279b019daa062471d4d
Author: sky <sky@chromium.org>
Date: Fri Apr 28 15:48:46 2017

chromeos: makes WindowManager not delete shell when connection to mus is lost

Chrome also detects when the connection to mus is lost and further
chrome needs to control when the shell it shutdown, so adds the option
to set a callback that controls what should happen when connection to
mus is lost.

I think there is more that needs to happen, but this is a good start.

BUG= 709593 
TEST=covered by tests
R=jonross@chromium.org

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

[modify] https://crrev.com/01c007bd982841a14c4a8279b019daa062471d4d/ash/mus/window_manager.cc
[modify] https://crrev.com/01c007bd982841a14c4a8279b019daa062471d4d/ash/mus/window_manager.h
[modify] https://crrev.com/01c007bd982841a14c4a8279b019daa062471d4d/chrome/browser/ui/ash/ash_init.cc

Status: Fixed (was: Started)
The error as seen in this bug is gone.

However if we see it in the future we will need to further update chrome shutdown Similar to the fix in #8
Labels: VerifyIn-61

Comment 11 by dchan@chromium.org, Jan 22 2018

Status: Archived (was: Fixed)

Sign in to add a comment