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

Issue 705159 link

Starred by 4 users

Issue metadata

Status: WontFix
Owner:
Last visit > 30 days ago
Closed: Mar 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 1
Type: Bug

Blocking:
issue 699818
issue 712897



Sign in to add a comment

Chrome takes longer to exit due to kernel drm_framebuffer_remove change

Project Member Reported by sonnysasaka@chromium.org, Mar 24 2017

Issue description

Chrome Version: 42.0.2311.13
OS: Chrome OS, Platform 6812.9.0
Device: Chromebook Pixel 1 (LINK)

What steps will reproduce the problem?
(1) Get ChromeOS R42-6812.9.0 (gs://chromeos-releases/dev-channel/link/6812.9.0/ChromeOS-test-R42-6812.9.0-link.tar.xz) and install this in LINK board.
(2) Sign in, and after several seconds, Sign out.
(3) Get the logout time by executing this command in shell: echo `bootstat_get_last chrome-exec` `bootstat_get_last logout-started` | awk '{print $1 - $2}'
(4) The previous command basically gets the difference time from the time sign out button is clicked to the time chrome is restarted.
(5) Do the same thing with the previous version (R42-6812.8.0, gs://chromeos-releases/dev-channel/link/6812.8.0/ChromeOS-test-R42-6812.8.0-link.tar.xz)
(6) Compare the logout time: version 6812.9.0 takes almost 1 second longer than version 6812.8.0. The suspected cause of this logout delay is session_manager (https://chromium.googlesource.com/chromiumos/platform2/+/7d6c96221b3af0e06ce68549c3f7250ba9a6cc2c).


What is the expected result? Sign out time shouldn't take significantly longer than the previous version.

What happens instead? Sign out time takes significantly longer than the previous version.
 

Comment 1 by r...@chromium.org, Mar 24 2017

Cc: alemate@chromium.org xiy...@chromium.org jdufault@chromium.org tbarzic@chromium.org

Comment 2 by r...@chromium.org, Mar 25 2017

Labels: -Pri-3 M-59 Pri-1
Dan, is this something you could maybe get to in M-59? A delay on logout translates to a delay to restart, which is something we're trying to really keep locked down.

On a relatively fast machine like a link, we were seeing a 1s delay - it is probably longer on slower machines.

(tentatively assigning milestone, feel free to move if it isn't feasible)

Comment 3 by derat@chromium.org, Mar 25 2017

This happened in M42 but just got filed now? How did that happen?

I agree that slow logout is bad since it blocks the next login, but I don't understand what's being tracked here.

https://chromium-review.googlesource.com/c/252803/ looks like it updated session_manager to wait for Chrome's entire process group to be gone instead of just the browser process (note that the BUG= line appears to be wrong). I think that this is the correct behavior.

The ui-post-stop script, which runs after session_manager exits, kills any remaining chronos processes. This script appears to use kill -9, so it's possible that it's faster than what session_manager is doing (since I think that session_manager sends TERM first and then waits a bit for processes to exit before sending ABRT). I think that it's still better to kill these processes gracefully to avoid data loss.

In any case, it sounds like the underlying problem is that Chrome isn't exiting as fast as we'd like. I think that that's the thing that needs to be scrutinized. I assume that we don't want to revert this two-year-old change that made session_manager do a better job of cleaning up Chrome.

Comment 4 by r...@chromium.org, Mar 26 2017

Sonny has been investigating why our logout/restart is so slow. Among a few other issues which he found, this was one of them.

AFAICT, we used to wait on the browser process to terminate already, now we're waiting for its descendants also to exit. Do we know if this is really necessary? For example, would the renderer processes have any state to save? In any case, identifying which processes these are, is probably a good start.


Sonny, since you are already investigating this and have the devices setup, could you, on ToT, verify which processes in this process group are taking the longest to cleanly terminate?

It seems this might take some non-trivial instrumentation of session_manager.
After more inspection, it seems that the kernel CL (https://chromium.googlesource.com/chromiumos/third_party/kernel/+/2fd20b643abb417a0de3b8d369728e09013413eb) is the cause of the delay. I suspect this causes some delay in display/graphics related operation, and the session manager wait would have been okay if without this display/graphics delay.

Comment 6 by derat@chromium.org, Mar 27 2017

Cc: ynovikov@chromium.org
Components: OS>Kernel>Graphics
Owner: marc...@chromium.org
Summary: Chrome takes longer to exit due to kernel drm_framebuffer_remove change (was: R42-6812.9.0 caused significant logout delay.)
Status: WontFix (was: Assigned)
This kernel change is required for correctness, so there isn't much we can do about it. Also the reason for the long delay is the panel timing requirements on link which are crazy high. In short, the hardware is imposing this delay on us and there is nothing I can do about it.
Some idea for restart to happen faster is not to get drm_framebuffer_remove to get called during it. I.e. make FB owned not by Chrome, but by something else which is alive through Chrome restarts.
Cc: wzang@chromium.org
 Issue 705154  has been merged into this issue.
Blocking: 712897

Sign in to add a comment