Mash crashes when ShelfWidget is being destroyed |
||||||||||||
Issue descriptionThe ShelfWidget crashes when it gets destroyed. This can be reproduced by running "out_oxygen/chrome --mash --multi-display" and closing the second window. There appears to be a number of problems with the order in which parts of mash are shutdown / destroyed in the window that is closing. In general ash::mus::RootWindowController is missing all of the logic that ash::RootWindowController::Shutdown() contains.
,
Aug 29 2016
So that is caused by ShelfWidget::Shutdown() not getting called before ShelfWidget::~ShelfWidget(). If ShelfWidget::Shutdown() is called in ~WmShelfMus() then a different crash happens a bit later on with the following stack trace: Received signal 11 SEGV_MAPERR ffffee6691406edd #0 0x7f7372314317 base::debug::(anonymous namespace)::StackDumpSignalHandler() #1 0x7f7372458330 <unknown> #2 0x7f736dbe9a21 views::Widget::OnNativeWidgetDestroying() #3 0x7f736ccc3b21 views::NativeWidgetMus::OnPlatformWindowClosed() #4 0x7f736ccc6d67 views::NativeWidgetMus::MusWindowObserver::OnWindowDestroyed() #5 0x7f736cd04e94 ui::Window::~Window() #6 0x7f736cd025dd ui::Window::Destroy() #7 0x7f736ccc366b views::NativeWidgetMus::~NativeWidgetMus() #8 0x7f736ccc3819 views::NativeWidgetMus::~NativeWidgetMus() #9 0x7f736dbe669f views::Widget::~Widget() #10 0x7f736d4dcf18 ash::ShelfWidget::~ShelfWidget() #11 0x7f736d4dcfc9 ash::ShelfWidget::~ShelfWidget() #12 0x7f7373797cc1 ash::mus::WmShelfMus::~WmShelfMus() #13 0x7f7373797d19 ash::mus::WmShelfMus::~WmShelfMus() #14 0x7f73737a2ec0 ash::mus::RootWindowController::~RootWindowController() #15 0x7f73737a2f29 ash::mus::RootWindowController::~RootWindowController() #16 0x7f73737a6294 ash::mus::WindowManager::OnWindowDestroyed() #17 0x7f73736997e4 ui::Window::~Window() #18 0x7f7373697701 ui::Window::LocalDestroy() #19 0x7f73736a16a7 ui::WindowTreeClient::OnWindowDeleted() #20 0x7f737367e972 ui::mojom::WindowTreeClientStub::Accept() #21 0x7f7373fe361e mojo::InterfaceEndpointClient::HandleValidatedMessage() #22 0x7f7373fe34d6 mojo::FilterChain::Accept() #23 0x7f7373fe436c mojo::InterfaceEndpointClient::HandleIncomingMessage() #24 0x7f7373fe91b4 mojo::internal::MultiplexRouter::ProcessIncomingMessage() #25 0x7f7373fe8b8e mojo::internal::MultiplexRouter::Accept() #26 0x7f7373fe34d6 mojo::FilterChain::Accept() #27 0x7f7373fe1a22 mojo::Connector::ReadSingleMessage() #28 0x7f7373fe1f74 mojo::Connector::OnHandleReadyInternal() #29 0x7f7372ef157b mojo::Watcher::OnHandleReady() #30 0x7f7372315180 base::debug::TaskAnnotator::RunTask() #31 0x7f737233c4e5 base::MessageLoop::RunTask() #32 0x7f737233c818 base::MessageLoop::DeferOrRunPendingTask() #33 0x7f737233cc6b base::MessageLoop::DoWork() #34 0x7f737233ef99 base::MessagePumpLibevent::Run() #35 0x7f737233c041 base::MessageLoop::RunHandler() #36 0x7f73723651e0 base::RunLoop::Run() #37 0x7f737233b270 base::MessageLoop::Run() #38 0x7f7372eaccd6 MashRunner::StartChildApp() #39 0x7f7372eae81e _ZN4base8internal7InvokerINS0_9BindStateIM10MashRunnerFvN4mojo16InterfaceRequestIN5shell5mojom7ServiceEEEEJNS0_17UnretainedWrapperIS3_EEEEEFvS9_EE3RunEPNS0_13BindStateBaseEOS9_ #40 0x7f73737e8c9a shell::ChildProcessMainWithCallback() #41 0x7f7372eac7e8 MashRunner::Run() #42 0x7f7372eacdb7 MashMain() #43 0x7f7372eaada8 ChromeMain #44 0x7f736a149f45 __libc_start_main #45 0x7f7372eaac40 <unknown>
,
Aug 29 2016
I suspect the problem is that the ash window containers are not being shut down early enough, so the shelf container isn't shut down, so the ShelfLayoutManager isn't destroyed, so WmShelfMus::WillDeleteShelfLayoutManager isn't called, so shelf_widget_->Shutdown() doesn't run.
,
Sep 2 2016
,
Sep 6 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/709f84d2f2bac43662b31b9393812c8a711f6da0 commit 709f84d2f2bac43662b31b9393812c8a711f6da0 Author: msw <msw@chromium.org> Date: Tue Sep 06 22:59:45 2016 mash: Avoid shelf crashes on display removal. Make ShelfWidget CloseNow in Shutdown. Call ShutdownShelfWidget() in the WmShelfMus dtor. Check for a valid shelf window in UpdateVisibilityState. BUG= 641463 TEST='chrome --mash --multi-display' doesn't crash when closing the second display. R=sky@chromium.org Review-Url: https://codereview.chromium.org/2302673002 Cr-Commit-Position: refs/heads/master@{#416747} [modify] https://crrev.com/709f84d2f2bac43662b31b9393812c8a711f6da0/ash/common/shelf/shelf_layout_manager.cc [modify] https://crrev.com/709f84d2f2bac43662b31b9393812c8a711f6da0/ash/common/shelf/shelf_widget.cc [modify] https://crrev.com/709f84d2f2bac43662b31b9393812c8a711f6da0/ash/mus/bridge/wm_shelf_mus.cc
,
Sep 6 2016
,
Oct 7 2016
,
Nov 19 2016
,
Jan 21 2017
,
Mar 4 2017
,
Apr 17 2017
,
May 30 2017
,
Aug 1 2017
,
Oct 14 2017
,
Feb 26 2018
|
||||||||||||
►
Sign in to add a comment |
||||||||||||
Comment 1 by msw@chromium.org
, Aug 29 2016