Shutdown crash after failed enrollment |
||||||||
Issue descriptionChrome Version: ToT OS: CrOS What steps will reproduce the problem? (1) Start enrollment but make it fail (my YAPS is failing currently) (2) While the error screen is shown, click on shutdown [2551:2551:0320/154428.304360:FATAL:enrollment_screen.cc(112)] Check failed: !enrollment_helper_ || g_browser_process->IsShuttingDown(). #0 0x7fe1052ffe1c base::debug::StackTrace::StackTrace() #1 0x7fe105326a6b logging::LogMessage::~LogMessage() #2 0x559186cd83ce chromeos::EnrollmentScreen::~EnrollmentScreen() #3 0x559186cd851e chromeos::EnrollmentScreen::~EnrollmentScreen() #4 0x5591866fb3c0 std::__1::__tree<>::destroy() #5 0x559186d52ede chromeos::WizardController::~WizardController() #6 0x559186d5324e chromeos::WizardController::~WizardController() #7 0x559186d2fd0e chromeos::LoginDisplayHostWebUI::~LoginDisplayHostWebUI() #8 0x559186d2ffae chromeos::LoginDisplayHostWebUI::~LoginDisplayHostWebUI() #9 0x7fe105300704 base::debug::TaskAnnotator::RunTask() #10 0x7fe105331809 base::internal::IncomingTaskQueue::RunTask() #11 0x7fe10533536b base::MessageLoop::RunTask() #12 0x7fe10533570a base::MessageLoop::DeferOrRunPendingTask() #13 0x7fe10533596c base::MessageLoop::DoWork() #14 0x7fe105337d59 base::MessagePumpLibevent::Run() #15 0x7fe105334c99 base::MessageLoop::Run() #16 0x7fe10536b9e9 base::RunLoop::Run() #17 0x55918701c4ba ChromeBrowserMainParts::MainMessageLoopRun() #18 0x7fe1025641a7 content::BrowserMainLoop::RunMainMessageLoopParts() #19 0x7fe102567206 content::BrowserMainRunnerImpl::Run() #20 0x7fe102560549 content::BrowserMain() #21 0x7fe102f3d7fd content::ContentMainRunnerImpl::Run() #22 0x7fe10583e0b3 service_manager::Main() #23 0x7fe102f3be24 content::ContentMain() #24 0x5591864be8f3 ChromeMain #25 0x7fe0f828a2b1 __libc_start_main #26 0x5591864be76a _start Received signal 6 #0 0x7fe1052ffe1c base::debug::StackTrace::StackTrace() #1 0x7fe1052ff911 base::debug::(anonymous namespace)::StackDumpSignalHandler() #2 0x7fe1054890c0 <unknown> #3 0x7fe0f829cfcf gsignal #4 0x7fe0f829e3fa abort #5 0x7fe1052fd2a5 base::debug::BreakDebugger() #6 0x7fe105326e25 logging::LogMessage::~LogMessage() #7 0x559186cd83ce chromeos::EnrollmentScreen::~EnrollmentScreen() #8 0x559186cd851e chromeos::EnrollmentScreen::~EnrollmentScreen() #9 0x5591866fb3c0 std::__1::__tree<>::destroy() #10 0x559186d52ede chromeos::WizardController::~WizardController() #11 0x559186d5324e chromeos::WizardController::~WizardController() #12 0x559186d2fd0e chromeos::LoginDisplayHostWebUI::~LoginDisplayHostWebUI() #13 0x559186d2ffae chromeos::LoginDisplayHostWebUI::~LoginDisplayHostWebUI() #14 0x7fe105300704 base::debug::TaskAnnotator::RunTask() #15 0x7fe105331809 base::internal::IncomingTaskQueue::RunTask() #16 0x7fe10533536b base::MessageLoop::RunTask() #17 0x7fe10533570a base::MessageLoop::DeferOrRunPendingTask() #18 0x7fe10533596c base::MessageLoop::DoWork() #19 0x7fe105337d59 base::MessagePumpLibevent::Run() #20 0x7fe105334c99 base::MessageLoop::Run() #21 0x7fe10536b9e9 base::RunLoop::Run() #22 0x55918701c4ba ChromeBrowserMainParts::MainMessageLoopRun() #23 0x7fe1025641a7 content::BrowserMainLoop::RunMainMessageLoopParts() #24 0x7fe102567206 content::BrowserMainRunnerImpl::Run() #25 0x7fe102560549 content::BrowserMain() #26 0x7fe102f3d7fd content::ContentMainRunnerImpl::Run() #27 0x7fe10583e0b3 service_manager::Main() #28 0x7fe102f3be24 content::ContentMain() #29 0x5591864be8f3 ChromeMain #30 0x7fe0f828a2b1 __libc_start_main #31 0x5591864be76a _start r8: 0000000000000000 r9: 00007fff681f3f40 r10: 0000000000000008 r11: 0000000000000246 r12: 00007fff681f4648 r13: 00007fff681f4638 r14: 00007fff681f4640 r15: 00007fff681f45e1 di: 0000000000000002 si: 00007fff681f3f40 bp: 00007fff681f4180 bx: 0000000000000006 dx: 0000000000000000 ax: 0000000000000000 cx: 00007fe0f829cfcf sp: 00007fff681f3fb8 ip: 00007fe0f829cfcf efl: 0000000000000246 cgf: 002b000000000033 erf: 0000000000000000 trp: 0000000000000000 msk: 0000000000000000 cr2: 0000000000000000 [end of stack trace] Calling _exit(1). Core file will not be generated.
,
Mar 21 2018
,
Mar 21 2018
The DCHECK which fails in both cases is: DCHECK(!enrollment_helper_ || g_browser_process->IsShuttingDown()); Some thoughts: First of all, I'm not sure why the enrollment screen should DCHECK-fail if it's being destroyed before it's done. Maybe it wants to enforce that EnrollmentHelper::ClearAuth is done in all cases when exiting enrollment - not sure how important that would be in reality - especially since it already doesn't care when we're shutting down. === CASE 1 === Here it looks like we'd expect g_browser_process->IsShuttingDown()) to be true, because you pressed Shutdown :) But shutdown seems to go through ShutdownController / LockStateController now, so maybe something is wrong there and the screens get closed before the flag is set? Someone will have to debug. This happens on dekstop chrome with --login-manager for you, correct? === CASE 2 === This crash is probably only reproducible if you set the MinimumRequiredChromeVersion (minimum_required_version) device policy to a value which is higher than your chrome versoin (e.g. 70.0). What may be happening: - As part of enrollment, device policy is fetched. - NotifyMinimumVersionStateChanged is called. ExistingUserController::OnMinimumVersionStateChanged is called as a consequence and finds out the version is too old. It calls host_->StartWizard(OobeScreen::SCREEN_UPDATE_REQUIRED) - This destroys the current wizard controller which is showing the EnrollmentScreen. So, EnrollmentScreen seems to simply not be prepared for being closed externally when it is not done yet.
,
Mar 21 2018
This also happens if you enroll a device to a domain that is flagged for AD managrment. Here we also restart Chrome after enrollment. Ask me for credentials if you need a repro.
,
Mar 21 2018
With latest sources, I get an exception when drawing the enrollment screen (so can't really get to enrollment at all):
out/ChromeOs/chrome --user-data-dir=/tmp/$RANDOM-$RANDOM --login-manager --login-profile=user
...
[1:1:0321/151940.743200:FATAL:FindPropertiesNeedingUpdate.h(167)] Check failed: *original_properties_->Effect() == *object_properties->Effect(). Property was updated without the layout object ("LayoutSVGContainer g id='YGlOvc' class='yhFy6d sOEOU'") needing a paint property update.
Original:
0xdc9e9740570 {"parent":"0xdc9e973c1f0","localTransformSpace":"0xdc9e97a3df0","outputClip":"(nil)","opacity":0,"compositorElementId":"(536)"}
Updated:
Effect (LayoutSVGContainer g id='YGlOvc' class='yhFy6d sOEOU') 0xdc9e973e950 {"parent":"0xdc9e973c1f0","localTransformSpace":"0xdc9e97a3df0","outputClip":"(nil)","opacity":0,"directCompositingReasons":"activeOpacityAnimation","compositorElementId":"(536)"}
#0 0x7f35968a3e1d base::debug::StackTrace::StackTrace()
#1 0x7f35968a244c base::debug::StackTrace::StackTrace()
#2 0x7f3596923c8d logging::LogMessage::~LogMessage()
#3 0x7f357d06ace2 blink::FindObjectPropertiesNeedingUpdateScope::~FindObjectPropertiesNeedingUpdateScope()
#4 0x7f357d0569a5 blink::(anonymous namespace)::FragmentPaintPropertyTreeBuilder::UpdateForSelf()
#5 0x7f357d05671c blink::ObjectPaintPropertyTreeBuilder::UpdateForSelf()
#6 0x7f357d087ca8 blink::PrePaintTreeWalk::WalkInternal()
,
Mar 21 2018
Looks like bug 813577 which is supposed to be fixed. Can you check if your local checkout includes the revision that is supposed to fix this (https://chromium-review.googlesource.com/926911) ? If yes and it's still failing, you may want to comment on that bug.
,
Mar 21 2018
+antrim since this is an interesting state (minimumrequiredchromeversion code triggered during initial enrollment)
,
Mar 21 2018
I don't think this should be assigned to Roger since it's cros enrollment flow. Denis, you wanna take this?
,
Mar 26 2018
The (abridged) call stack that triggers the destruction is chrome::AttemptRestart() (chrome/browser/lifetime/application_lifetime.cc:262) chromeos::EnrollmentScreen::OnConfirmationClosed(chromeos::EnrollmentScreen * this) (chrome/browser/chromeos/login/enrollment/enrollment_screen.cc:293) chromeos::EnrollmentScreenHandler::HandleClose(chromeos::EnrollmentScreenHandler * this, const std::__1::string & reason) (chrome/browser/ui/webui/chromeos/login/enrollment_screen_handler.cc:596) chrome::AttemptRestart() in turn posts chrome::ExitCleanly(): chromeos::LoginDisplayHostCommon::ShutdownDisplayHost(chromeos::LoginDisplayHostWebUI * this) (chrome/browser/chromeos/login/ui/login_display_host_common.cc:259) chromeos::LoginDisplayHostCommon::Observe(chromeos::LoginDisplayHostWebUI * this, int type, const content::NotificationSource & source, const content::NotificationDetails & details) (chrome/browser/chromeos/login/ui/login_display_host_common.cc:237) chromeos::LoginDisplayHostWebUI::Observe(chromeos::LoginDisplayHostWebUI * this, int type, const content::NotificationSource & source, const content::NotificationDetails & details) (chrome/browser/chromeos/login/ui/login_display_host_webui.cc:783) libcontent.so!content::NotificationServiceImpl::Notify(content::NotificationServiceImpl * this, int type, const content::NotificationSource & source, const content::NotificationDetails & details) (content/browser/notification_service_impl.cc:128) browser_shutdown::NotifyAppTerminating() (chrome/browser/lifetime/termination_notification.cc:27) browser_shutdown::NotifyAndTerminate(bool fast_path, browser_shutdown::RebootPolicy reboot_policy) (chrome/browser/lifetime/termination_notification.cc:47) browser_shutdown::NotifyAndTerminate(bool fast_path) (chrome/browser/lifetime/termination_notification.cc:34) chrome::ShutdownIfNoBrowsers() (chrome/browser/lifetime/application_lifetime.cc:171) chrome::CloseAllBrowsers() (chrome/browser/lifetime/application_lifetime.cc:182) BrowserProcessPlatformPartBase::AttemptExit(BrowserProcessPlatformPart * this) (chrome/browser/browser_process_platform_part_base.cc:33) chrome::AttemptExitInternal(bool try_to_quit_application) (chrome/browser/lifetime/application_lifetime.cc:148) chrome::ExitCleanly() (chrome/browser/lifetime/application_lifetime.cc:313) And login_display_host_common.cc:259 deletes the LoginDisplayHostWebUI: base::ThreadTaskRunnerHandle::Get()->DeleteSoon(FROM_HERE, this); This ends up in chromeos::EnrollmentScreen::~EnrollmentScreen(), where the DCHECK is fired. An additional check for browser_shutdown::IsTryingToQuit() fixes it. I'll upload a CL.
,
Apr 9 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/c641281663aa3c0e1c9b5098f6faaea11c8dc4a0 commit c641281663aa3c0e1c9b5098f6faaea11c8dc4a0 Author: Lutz Justen <ljusten@chromium.org> Date: Mon Apr 09 12:50:30 2018 Fix DCHECK crash in EnrollmentScreen The destructor calls g_browser_process->IsShuttingDown(), but that's not hit in certain situations (see bug). Adding an additional check for browser_shutdown::IsTryingToQuit() solves this (see bug comment #9). BUG= chromium:823738 TEST=Enrolled with Chromad domain, which triggers a restart after enrollment, and it didn't crash. Change-Id: Ifc4430012da40ec729d8337a0c7b3be2f44eafb2 Reviewed-on: https://chromium-review.googlesource.com/980852 Reviewed-by: Denis Kuznetsov <antrim@chromium.org> Reviewed-by: Achuith Bhandarkar <achuith@chromium.org> Commit-Queue: Lutz Justen <ljusten@chromium.org> Cr-Commit-Position: refs/heads/master@{#549162} [modify] https://crrev.com/c641281663aa3c0e1c9b5098f6faaea11c8dc4a0/chrome/browser/chromeos/login/enrollment/enrollment_screen.cc
,
Apr 9 2018
,
Apr 16 2018
Verified fixed. No crashes after enrollment, tested with YAPS (steps from c#1) and AD enrollment. Chrome OS: 10569.1.0 Chrome: 67.0.3393.4 Device: Robo360 |
||||||||
►
Sign in to add a comment |
||||||||
Comment 1 by tnagel@chromium.org
, Mar 21 2018