New issue
Advanced search Search tips

Issue 872135 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Aug 13
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 3
Type: Bug



Sign in to add a comment

Tast wastes ARC mini container

Project Member Reported by nya@chromium.org, Aug 8

Issue description

In autotest/tast, we enable ARC with private JS API (chrome.autotestPrivate.setPlayStoreEnabled) after entering a user session. This interacts with ARC mini container badly since the mini container is taken down immediately after login, and full container start is initiated after setPlayStoreEnabled call.

This is an example log of session_manager for ARC test:

// ui job is restarted
2018-08-08T03:31:09.778211+00:00 INFO session_manager[30324]: [INFO:browser_job.cc(148)] Running browser /opt/google/chrome/chrome ...
// mini container is started
2018-08-08T03:31:14.653097+00:00 INFO session_manager[30324]: [INFO:android_oci_wrapper.cc(121)] run_oci PID: 30572
2018-08-08T03:31:25.928534+00:00 INFO session_manager[30324]: [INFO:android_oci_wrapper.cc(177)] Container PID: 30631
// mini container is ready
2018-08-08T03:31:25.928606+00:00 INFO session_manager[30324]: [INFO:session_manager_impl.cc(1663)] Started Android container with PID 30631
// user session is started
2018-08-08T03:31:31.258646+00:00 INFO session_manager[30324]: [INFO:session_manager_impl.cc(567)] Starting user session
// mini container gets killed!
2018-08-08T03:31:37.069147+00:00 INFO session_manager[30324]: [INFO:android_oci_wrapper.cc(256)] Cleaning up container 30631
2018-08-08T03:31:37.834219+00:00 INFO session_manager[30324]: [INFO:session_manager_impl.cc(1743)] Android Container with pid 30631 stopped
// full container is started again...
2018-08-08T03:31:41.014197+00:00 INFO session_manager[30324]: [INFO:android_oci_wrapper.cc(121)] run_oci PID: 31017
2018-08-08T03:31:52.600606+00:00 INFO session_manager[30324]: [INFO:android_oci_wrapper.cc(177)] Container PID: 31129
2018-08-08T03:31:52.600682+00:00 INFO session_manager[30324]: [INFO:session_manager_impl.cc(1663)] Started Android container with PID 31129

In this case, Android container needed 15s to start (not boot!) after entering a user session, which is totally waste of time.

 
Owner: nya@chromium.org
Status: Started (was: Untriaged)
I found we can use --arc-start-mode flag to avoid wasting mini containers. 
Summary: Tast wastes ARC mini container (was: Autotest/Tast wastes ARC mini container)
Looks like autotest is not affected, although I'm not sure why...

Project Member

Comment 3 by bugdroid1@chromium.org, Aug 9

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/tast-tests/+/1efc1641de47582b36e67dcccc28fc6cf9379148

commit 1efc1641de47582b36e67dcccc28fc6cf9379148
Author: Shuhei Takahashi <nya@chromium.org>
Date: Thu Aug 09 09:21:27 2018

arc: Avoid unnecessarily stopping mini containers.

For performance, in login screen, session manager spins up Android
container without mounting data partition, and continue booting
after entering a user session. If the user has not enabled ARC,
the container is turned down soon after login.

Since ARC is not enabled initially for test accounts, there is a
race condition that Android container can be turned down soon
after a user session starts. While full Android container will be
started soon, it is completely waste of time.

This CL changes the way to enable ARC from a private JS API to a
Chrome command line flag. This flag makes Chrome enable ARC
regardless of user prefs, so a mini container is never turned down.

BUG= chromium:872135 
TEST=tast run DUT arc.Boot arc.IntentForward arc.Downloads

Change-Id: Ia66e4c5bc9867fe341d7704941463c19641ab32b
Reviewed-on: https://chromium-review.googlesource.com/1166773
Commit-Ready: Shuhei Takahashi <nya@chromium.org>
Tested-by: Shuhei Takahashi <nya@chromium.org>
Reviewed-by: Shuhei Takahashi <nya@chromium.org>

[modify] https://crrev.com/1efc1641de47582b36e67dcccc28fc6cf9379148/src/chromiumos/tast/local/arc/arc.go
[modify] https://crrev.com/1efc1641de47582b36e67dcccc28fc6cf9379148/src/chromiumos/tast/local/bundles/cros/arc/intent_forward.go
[modify] https://crrev.com/1efc1641de47582b36e67dcccc28fc6cf9379148/src/chromiumos/tast/local/chrome/chrome.go
[modify] https://crrev.com/1efc1641de47582b36e67dcccc28fc6cf9379148/src/chromiumos/tast/local/bundles/cros/arc/boot.go
[modify] https://crrev.com/1efc1641de47582b36e67dcccc28fc6cf9379148/src/chromiumos/tast/local/bundles/cros/arc/downloads.go
[modify] https://crrev.com/1efc1641de47582b36e67dcccc28fc6cf9379148/src/chromiumos/tast/local/bundles/cros/arc/boot_forever.go

Status: Fixed (was: Started)

Sign in to add a comment