Various Kiosk browser tests DCHECKing while trying to show shelf |
|||||||
Issue description
On 6/24, a number of Kiosk browser tests started DCHECKing and failing on Linux ChromiumOS Tests (dbg). The DCHECK is
DCHECK(!visible_ || layer()->GetTargetOpacity() > 0.0f);
in Window::Show():
https://cs.chromium.org/chromium/src/ui/aura/window.cc?q=Window::Show&sq=package:chromium&dr=CSs&l=235
See recent failures in
https://build.chromium.org/p/chromium.chromiumos/builders/Linux%20ChromiumOS%20Tests%20%28dbg%29%281%29?numbuilds=200
Some tests observed to have failed in this specific way are:
KioskUpdateTest.IncompliantPlatformFirstInstall
KioskUpdateTest.LaunchAppWithSecondaryArcLikeAppAndExtension
KioskUpdateTest.LaunchAppWithSharedModuleAndSecondaryApp
KioskUpdateTest.LaunchKioskAppWithSecondaryExtension
KioskUpdateTest.PRE_LaunchAppWithUpdatedModule
KioskUpdateTest.PRE_UpdateMultiAppKioskAddOneApp
KioskUpdateTest.PRE_UpdateMultiAppKioskRemoveOneApp
KioskEnterpriseTest.PrivateStore
... and so forth. The problem always happens when the test calls WaitForAppLaunchWithOptions(). The message loop runs StartupAppLauncher::OnReadyToLaunch(), which leads to Shell::ShowShelf(), and Widget::Show() on the StatusAreaWidget; then the NativeWidgetAura calls window_->Show().
When I traced through this, the StatusAreaWidget's Show() function was called 47 times. Regarding the DCHECK conditions: sometimes the window_ was visible and opacity was 1; sometimes it wasn't visible, and opacity was 1. On the Show() call right before the DCHECK, it wasn't visible, and opacity was 0. When it DCHECKED, of course, it was now visible, but opacity was still 0. Note that this this doesn't always happen... sometimes these tests pass. So whatever is showing and hiding this window and setting its opacity is doing it in a non-deterministic order.
I don't know if this is related to Issue 612688 . Those aren't running on (dbg), and the errors seem different.
Here's the call stack:
#1 logging::LogMessage::~LogMessage()
#2 aura::Window::Show()
#3 views::NativeWidgetAura::ShowWithWindowState()
#4 views::Widget::Show()
#5 ash::RootWindowController::ShowShelf()
#6 ash::Shell::ShowShelf()
#7 ChromeShellDelegate::Observe()
#8 content::NotificationServiceImpl::Notify()
#9 chromeos::ChromeUserManagerImpl::SessionStarted()
#10 chromeos::StartupAppLauncher::LaunchApp()
#11 chromeos::AppLaunchController::OnReadyToLaunch()
#12 chromeos::StartupAppLauncher::OnReadyToLaunch()
#13 base*internal*RunnableAdapter*CancelableCallback*Run*WeakPtr*
#14 base*internal*InvokeHelper*MakeItSo*RunnableAdapter*CancelableCallback*WeakPtr*
#15 base*internal*Invoker*IndexSequence*BindState*RunnableAdapter*chromeos*StartupAppLauncher*WeakPtr*BindStateBase*
#16 base::Callback<>::Run()
#17 base::debug::TaskAnnotator::RunTask()
#18 base::MessageLoop::RunTask()
#19 base::MessageLoop::DeferOrRunPendingTask()
#20 base::MessageLoop::DoWork()
#21 base::MessagePumpGlib::Run()
#22 base::MessageLoop::RunHandler()
#23 base::RunLoop::Run()
#24 content::RunThisRunLoop()
#25 content::MessageLoopRunner::Run()
#26 content::WindowedNotificationObserver::Wait()
#27 chromeos::KioskTest::WaitForAppLaunchWithOptions()
#28 chromeos::KioskEnterpriseTest_PrivateStore_Test::RunTestOnMainThread() (for example)
... more to come...
,
Jun 30 2016
Pass to afakhry@ who is helping to look at those failures. I'll dup the other one into this since glevin@ put more context here.
,
Jun 30 2016
,
Jun 30 2016
,
Jun 30 2016
The browser tests start with clean state, so we would load login screen as oobe, which would show the bottom bar after 300ms [1]. The handler of that would mark status area as visible. The status area is made visible by toggling the visibility flag with an opacity animation [3]. Now the fun part, if the above happens right before we finish kiosk app launch that calls ChromeUserManagerImpl::SessionStarted(). We end up trying to show the status area widget with visible_ true but opacity 0, hence the DCHECK. Not sure about what could be a proper fix though. :( [1]: https://cs.chromium.org/chromium/src/chrome/browser/resources/chromeos/login/login_shared.js?rcl=0&l=98 [2] https://cs.chromium.org/chromium/src/chrome/browser/ui/webui/chromeos/login/core_oobe_handler.cc?rcl=0&l=470 [3] https://cs.chromium.org/chromium/src/ash/common/system/tray/tray_background_view.cc?rcl=1467300303&l=296
,
Jul 1 2016
,
Jul 1 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/1828054aceaf6bc19e5ac5c5bc49689c47930df3 commit 1828054aceaf6bc19e5ac5c5bc49689c47930df3 Author: afakhry <afakhry@chromium.org> Date: Fri Jul 01 18:33:03 2016 Fix flaky Kiosk browser_tests failing on wrong widget opacity. Ash was trying to show the shelf with its widget opacity set to 0.0 causing a DCHECK crash in the tests. This makes sure the opacity of the system tray's widget is set properly when it's shown or hidden. Also re-enables a test that was disabled previously since it's passing now due to this CL. BUG= 624584 TEST=browser_tests --gtest_filter=KioskEnterpriseTest.PrivateStore TEST=browser_tests --gtest_filter=KioskUpdateTest.IncompliantPlatformFirstInstall Review-Url: https://codereview.chromium.org/2119913002 Cr-Commit-Position: refs/heads/master@{#403489} [modify] https://crrev.com/1828054aceaf6bc19e5ac5c5bc49689c47930df3/chrome/browser/chromeos/login/kiosk_browsertest.cc [modify] https://crrev.com/1828054aceaf6bc19e5ac5c5bc49689c47930df3/chrome/browser/chromeos/login/ui/webui_login_view.cc
,
Jul 1 2016
,
Aug 29 2016
,
Aug 29 2016
bulk verified |
|||||||
►
Sign in to add a comment |
|||||||
Comment 1 by glevin@chromium.org
, Jun 30 2016Labels: -Pri-2 Pri-1
Owner: xiy...@chromium.org
Status: Assigned (was: Available)