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

Issue 705958 link

Starred by 2 users

Issue metadata

Status: WontFix
Owner: ----
Closed: Jun 2017
Cc:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 2
Type: Bug



Sign in to add a comment

mash_unittests hang during shutdown on local machine

Project Member Reported by kylec...@chromium.org, Mar 28 2017

Issue description

Some of mash_unittests will hang on exit for me when running locally. I think this would also occur for other service tests that start up service:ui and service:content_packaged_services.

Here is the command line that will the hang 100% of the time at b39b8d6fb03d46dff5556e7a5c428ac9302f5579 on my machine. I'm running the tests with an Ozone X11 build (release/component/dcheck_always_on).

$ ninja -j1000 -C <build_dir> mash_unittests mash:all
$ testing/xvfb.py <build_dir>/mash_unittests --gtest_filter=AppLaunchTest.TestQuickLaunch
# test hangs and times out.

It look like some kind of a race during shutdown. The entire test body runs successfully and the hang happens during shutdown. It's the service:content_packaged_services process that hangs, which I understand is the main Chrome browser process. It doesn't appear to reproduce on the trybots.

Can anyone else reproduce this?
 

Comment 1 by sadrul@chromium.org, Mar 28 2017

Does it happen on non-x11 (e.g. headless) ozone?
Yes, it happens with Ozone headless (--ozone-platform=headless) too.

Comment 3 by sky@chromium.org, Mar 28 2017

If you rm build_dir/chrome does it work fine?
Oh, yes it does. It complains it can't launch chrome in that case but the test passes and finishes running. 

LaunchProcess: failed to execvp:
/usr/local/google/data/chrome/src/out/ozone/chrome

Comment 5 by sadrul@chromium.org, Mar 28 2017

Looks like ServiceTest::TearDown() is the one hanging. Looking more ...

Comment 6 by sadrul@chromium.org, Mar 28 2017

More result: BackgroundServiceManager::ShutDownOnBackgroundThread() is blocking on |context_.reset()| for some as-yet unknown reason https://cs.chromium.org/chromium/src/services/service_manager/background/background_service_manager.cc?type=cs&sq=package:chromium&l=110

Comment 7 by sadrul@chromium.org, Mar 28 2017

More result: Context::~Context() is blocking on its ServiceManager being destroyed. So the block is happening in ~ServiceManager.

PS: I am doing a running commentary because I don't want to have to re-remember when I get inevitably distract

Comment 8 by sky@chromium.org, Mar 28 2017

I haven't tried to diagnose this, but I wonder who is trying to launch chrome. I thought we removed all deps from mash to chrome, so I'm a bit surprised we're trying to launch it. Maybe it's ime? Maybe the manifest and deps aren't right for the test?

Comment 9 by sadrul@chromium.org, Mar 28 2017

For me, the process tree looks like:

 mash_unittests ...
   - mash_unittests --single-process-tests ...
      - ash
      - quick_launch
      - ui
      - test_ime_driver
      - font_service
      - chrome
         .. more chrome


On ToT, mash_unittests is crashing because of the timeout (exposes a race). That is being tracked in issue 706357 (I have a fix up at https://codereview.chromium.org/2779903005/)
Status: WontFix (was: Available)
This no longer reproduces.

Sign in to add a comment