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

Issue 678683 link

Starred by 2 users

Issue metadata

Status: Archived
Owner:
Closed: Feb 2017
Cc:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 1
Type: Bug



Sign in to add a comment

Bring down all services if any core service crashes

Project Member Reported by sky@chromium.org, Jan 5 2017

Issue description

If any of chrome (browser, not renderer), ash or the ui service crashes we should bring down all apps (maybe trigger reboot?). This is similar to how on chromeos now if chrome crashes the system reboots.
 
Cc: derat@chromium.org
+derat

Chrome OS doesn't usually reboot if chrome crashes -- it just restarts chrome.

I think it only reboots the device if chrome crashes repeatedly, and maybe only if it crashes before the login screen.

That said, at least in the short term we definitely need to restart chrome if ash goes down. We probably should restart ash if browser goes down.

Comment 2 by sky@chromium.org, Jan 5 2017

We should just trigger restarting chrome, by which I mean the main 'chrome --mash' process, which will bring up everything again.

Comment 3 by derat@chromium.org, Jan 6 2017

Cc: mnissler@chromium.org
Yes, that sounds reasonable to me. I think this is effectively what session_manager does right now when it sees the main browser process exit with a nonzero status: it kills everything in the process group and restarts the browser (with a different command line that tells it that it's already logged in). The one exception is if the screen was locked at the time of the crash -- in that case, the user is logged out.

Comment 4 by sky@chromium.org, Jan 13 2017

Cc: roc...@chromium.org sky@chromium.org
 Issue 681040  has been merged into this issue.
Cc: -jamescook@chromium.org
Owner: jamescook@chromium.org
Status: Started (was: Untriaged)
Step 1: Don't automatically restart ash. It's annoying for development and has caused cases in the autotest lab where we fill the disk with crash dumps.

Per #5, Ben already landed a change that makes ash non-restartable.

I have https://codereview.chromium.org/2646033002/ out for review. It makes the root process exit with status 1 if ash crashes. I think that will make session_manager restart chrome, which should start mash again if the flag is set.

Project Member

Comment 7 by bugdroid1@chromium.org, Feb 1 2017

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

commit 3e0797f2ae6a7d349acf6aaf8d02215f28c559c1
Author: jamescook <jamescook@chromium.org>
Date: Wed Feb 01 23:07:04 2017

mash: Exit main process if ui service crashes

Both sides of a connection to the ui service cache information about the
other side. For now, rather than trying to make the ui service restartable
we just bring down the main chrome --mash process if it crashes. The
Chrome OS session_manager will then restart everything.

Add logging for when the main process exits due to a critical service crash.

BUG= 678683 
TEST=kill -SIGILL <ui-service-pid>, main chrome process exits

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

[modify] https://crrev.com/3e0797f2ae6a7d349acf6aaf8d02215f28c559c1/chrome/app/mash/BUILD.gn
[modify] https://crrev.com/3e0797f2ae6a7d349acf6aaf8d02215f28c559c1/chrome/app/mash/chrome_mash_manifest.json
[modify] https://crrev.com/3e0797f2ae6a7d349acf6aaf8d02215f28c559c1/chrome/app/mash/mash_runner.cc

Update: There is a hang in content_browser when the root process tries to restart, but only on chromebook hardware and only after the login screen. I plan to investigate this week.

Comment 9 by st...@chromium.org, Feb 8 2017

Cc: st...@chromium.org
Project Member

Comment 10 by bugdroid1@chromium.org, Feb 14 2017

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

commit 896d1d57393c5a0d787210a3e24007e973fb2fe5
Author: jamescook <jamescook@chromium.org>
Date: Tue Feb 14 23:11:32 2017

mash: Exit main process if content_browser service crashes

For the ash/browser and window-server/browser connections both sides cache
information about the other side. For now, rather than trying to make the
services restartable we just bring down the main chrome --mash root process.
The Chrome OS session_manager will then restart everything.

Also explicitly start content_browser on startup, like mash_session used to
do. It provides interfaces needed by ash (prefs, login state) that we're
going to need for a while.

BUG= 678683 
TEST=navigate to about:inducebrowsercrashforrealz, root process exits

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

[modify] https://crrev.com/896d1d57393c5a0d787210a3e24007e973fb2fe5/chrome/app/mash/chrome_mash_manifest.json
[modify] https://crrev.com/896d1d57393c5a0d787210a3e24007e973fb2fe5/chrome/app/mash/mash_runner.cc

Status: Fixed (was: Started)
Cc: r...@chromium.org
Cc: -st...@chromium.org

Comment 14 by dchan@google.com, Apr 17 2017

Labels: VerifyIn-59

Comment 15 by dchan@google.com, May 30 2017

Labels: VerifyIn-60
Labels: VerifyIn-61
Project Member

Comment 17 by bugdroid1@chromium.org, Oct 13 2017

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

commit ed46d84d726dac5c1bf3f5998384c6c175fa1231
Author: James Cook <jamescook@chromium.org>
Date: Fri Oct 13 19:41:17 2017

cros/mash: Terminate the browser process if the ash process crashes

The window manager process (ash) caches some state about the browser
process, and the browser caches some state about ash. We eventually
want to make these processes restartable, but for now we need to
terminate the browser if ash crashes. When the browser terminates on
Chrome OS the OS-level session manager daemon will restart it.

This broke when we moved the mojo service manager back into the
browser process.

Also clean up the old ShouldTerminateServiceManagerOnInstanceQuit
support we were using for the standalone and background run modes
for service manager, since we're not using those modes right now.

Ctrl-Alt-Shift-K to crash ash, see the browser exit too

Bug:  678683 ,  772098 
Test: unit_tests, run chrome --mash --ash-debug-shortcuts and press
Change-Id: Icc62d46b36039c12a72ba3281babd234553a3f79
Reviewed-on: https://chromium-review.googlesource.com/716930
Reviewed-by: Scott Violet <sky@chromium.org>
Reviewed-by: Charlie Reis <creis@chromium.org>
Reviewed-by: Ken Rockot <rockot@chromium.org>
Commit-Queue: James Cook <jamescook@chromium.org>
Cr-Commit-Position: refs/heads/master@{#508782}
[modify] https://crrev.com/ed46d84d726dac5c1bf3f5998384c6c175fa1231/chrome/app/chrome_main_delegate.cc
[modify] https://crrev.com/ed46d84d726dac5c1bf3f5998384c6c175fa1231/chrome/app/chrome_main_delegate.h
[modify] https://crrev.com/ed46d84d726dac5c1bf3f5998384c6c175fa1231/chrome/browser/chrome_content_browser_client.cc
[modify] https://crrev.com/ed46d84d726dac5c1bf3f5998384c6c175fa1231/chrome/browser/chrome_content_browser_client.h
[modify] https://crrev.com/ed46d84d726dac5c1bf3f5998384c6c175fa1231/chrome/browser/chrome_content_browser_client_unittest.cc
[modify] https://crrev.com/ed46d84d726dac5c1bf3f5998384c6c175fa1231/chrome/browser/mash_service_registry.cc
[modify] https://crrev.com/ed46d84d726dac5c1bf3f5998384c6c175fa1231/chrome/browser/mash_service_registry.h
[modify] https://crrev.com/ed46d84d726dac5c1bf3f5998384c6c175fa1231/content/app/content_service_manager_main_delegate.cc
[modify] https://crrev.com/ed46d84d726dac5c1bf3f5998384c6c175fa1231/content/app/content_service_manager_main_delegate.h
[modify] https://crrev.com/ed46d84d726dac5c1bf3f5998384c6c175fa1231/content/browser/service_manager/service_manager_context.cc
[modify] https://crrev.com/ed46d84d726dac5c1bf3f5998384c6c175fa1231/content/public/app/content_main_delegate.cc
[modify] https://crrev.com/ed46d84d726dac5c1bf3f5998384c6c175fa1231/content/public/app/content_main_delegate.h
[modify] https://crrev.com/ed46d84d726dac5c1bf3f5998384c6c175fa1231/content/public/browser/content_browser_client.cc
[modify] https://crrev.com/ed46d84d726dac5c1bf3f5998384c6c175fa1231/content/public/browser/content_browser_client.h
[modify] https://crrev.com/ed46d84d726dac5c1bf3f5998384c6c175fa1231/services/service_manager/background/background_service_manager.cc
[modify] https://crrev.com/ed46d84d726dac5c1bf3f5998384c6c175fa1231/services/service_manager/background/background_service_manager.h
[modify] https://crrev.com/ed46d84d726dac5c1bf3f5998384c6c175fa1231/services/service_manager/background/tests/background_service_manager_unittest.cc
[modify] https://crrev.com/ed46d84d726dac5c1bf3f5998384c6c175fa1231/services/service_manager/embedder/main.cc
[modify] https://crrev.com/ed46d84d726dac5c1bf3f5998384c6c175fa1231/services/service_manager/embedder/main_delegate.cc
[modify] https://crrev.com/ed46d84d726dac5c1bf3f5998384c6c175fa1231/services/service_manager/embedder/main_delegate.h

Comment 18 by dchan@chromium.org, Oct 14 2017

Status: Archived (was: Fixed)

Sign in to add a comment