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

Issue 783728 link

Starred by 3 users

Issue metadata

Status: Fixed
Owner:
Closed: Nov 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Mac
Pri: 1
Type: Bug-Regression



Sign in to add a comment

Regression : Chrome task manager becomes unresponsive on terminating 'GPU Process' multiple times.

Reported by avsha...@etouch.net, Nov 10 2017

Issue description

Chrome Version : 64.0.3264.0 (Official Build) c555c442306ca8d68cf0d53d4a3b1adabfd25295-refs/heads/master@{#515409} 32/64-bit
OS : Windows(7,8,10), Mac(10.12.6)

Precondition : Freshly install chrome browser.

What steps will reproduce the problem?
1. Launch chrome, open NTP and press 'Shift + Esc' keys to open chrome task manager.
2. Select 'GPU Process' and click on 'End process' button.
3. Again kill  'GPU Process' 2-3 times and observe.

Actual Result : Chrome task manager becomes unresponsive on terminating 'GPU Process' multiple times.

Expected Result : Task manager should not become unresponsive after terminating 'GPU Process' multiple times.

(Note : In Mac 10.12.6 OS, background tabs turn blank on terminating 'GPU Process' multiple times. Kindly review an attached screen cast).

This is a regression issue broken in ‘M-64’ and using the per-revision bisect providing the bisect results,
Good build : 64.0.3262.0 (Revision : 514704)
Bad build : 64.0.3263.0 (Revision : 515052)

You are probably looking for a change made after 515035 (known good), but no later than 515036 (first known bad).

CHANGELOG URL:
https://chromium.googlesource.com/chromium/src/+log/cdf40eef972eea49a3764fb9c6b59af908fdeecb..1202f66559ca7e37f643a691cac72144ab60493f

Suspect : https://chromium.googlesource.com/chromium/src/+/1202f66559ca7e37f643a691cac72144ab60493f

@zmo : Could you please look into the issue, pardon me if it has nothing to do with your changes and if possible please assign it to concern owner.

Note : This issue is not observed on Linux(14.04 LTS) OS.
 
Actual_GPU_Process.mp4
1.0 MB View Download
Expected_GPU_Process.mp4
1.2 MB View Download
Mac_Behaviour.mov
8.0 MB Download

Comment 1 by avsha...@etouch.net, Nov 10 2017

Description: Show this description
Labels: ReleaseBlock-Stable
Adding RB Label as this is a recent Regression. Please remove if not required.
Thank You.

Comment 3 by zmo@chromium.org, Nov 10 2017

Labels: Needs-Feedback
I tried on my mac desktop and mac laptop, and with Canary (exactly @515409) and ToT, and can't reproduce this.

For the mac machines you can reproduce this, please provide the about:gpu content.

Comment 4 by zmo@chromium.org, Nov 11 2017

Cc: danakj@chromium.org enne@chromium.org piman@chromium.org
Labels: -OS-Windows -OS-Mac OS-Linux
Status: Started (was: Assigned)
Interestingly, I can only reproduce this on Linux.

If I run Chrome Linux, open task manager, crash GPU process three times, task manager will froze.

If I run Chrome Linux with --disable-software-rasterizer, the issue goes away.

With my CL, when we switch from GPU process running with hardware to GPU process running with SwiftShader, we don't block GPU compositing right away (before we did). Now we wait for the GPU process to launch, and learn that GPU compositing is blacklisted with SwiftShader.

Apparently the compositor for task manager doesn't fallback in this situation.

Comment 5 by zmo@chromium.org, Nov 11 2017

When the freeze happens, we got the following log:

[1:10:1110/170505.370233:ERROR:command_buffer_proxy_impl.cc(118)] ContextResult::kFatalFailure: Shared memory handle is not valid
[1:10:1110/170505.370387:ERROR:context_provider_command_buffer.cc(245)] GpuChannelHost failed to create command buffer.

Comment 6 by zmo@chromium.org, Nov 11 2017

Note that it's not always the task manager window gets frozen. Sometimes it's the tab (renderer).

Comment 7 by zmo@chromium.org, Nov 13 2017

https://chromium-review.googlesource.com/c/chromium/src/+/767291 should address this regression.

Comment 8 by zmo@chromium.org, Nov 14 2017

Working on the underlying root cause of this flakiness.

1) there are two compositors, one for the renderer, one for the task manager. When GPU process crashes three times and hardware GPU is disabled, it really depends on which compositor's GPU channel gets connected first.  The one who gets GPU channel back first will realize GPU compositing is disabled, so it disable GPU compositing for the other compositor. The second one gets a GPU channel, also realizes GPU compositing is disabled, but somehow it gets stuck.

2) In GpuProcessTransportFactory::DisableGpuCompositing, if we don't touch the other compositors, then both compositors fall back to the software mode correctly.

Comment 9 by zmo@chromium.org, Nov 14 2017

Here is some more analysis:

After the third time GPU process crashed, both compositors call RequestNewLayerTreeFrameSink(), which in turn call CreateLayerTreeFrameSink(), and layer_tree_frame_sink_requested_ isn't set to true.

Now the first GPU channel comes back to compositor A, and it tries to disable GPU compositing for both compositors.

In DisableGpuCompositing(), compositor B is removed from GpuProcessTransportFactory through ReleaseAcceleratedWidget(), and in SetAcceleratedWidget, because layer_tree_frame_sink_requested_ wasn't set to true, so CreateLayerTreeFrameSink() wasn't triggered.

Then Gpu channel was established for compositor B, but at this point, compositor B has been removed from GpuProcessTransportFactory, so early exit.

Compositor B ends up without a LayerTreeFrameSink.
Project Member

Comment 11 by bugdroid1@chromium.org, Nov 14 2017

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

commit c3c48528bba261dddc1550c3f8c6d3ffa0f4ff5e
Author: Zhenyao Mo <zmo@chromium.org>
Date: Tue Nov 14 21:25:53 2017

Fix a racing in compositor falling back from GPU to software mode

It can be reproduced while GPU process crashes three times and hardware
acceleration gets blocked.

Also, revert a unittest added for the reverted fix.

BUG= 783728 
TEST=manual
R=piman@chromium.org

Change-Id: I5e97a339b0f24bc905652c66c52d14263dd8b793
Reviewed-on: https://chromium-review.googlesource.com/769328
Reviewed-by: Antoine Labour <piman@chromium.org>
Commit-Queue: Zhenyao Mo <zmo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#516431}
[modify] https://crrev.com/c3c48528bba261dddc1550c3f8c6d3ffa0f4ff5e/ui/compositor/compositor.cc
[modify] https://crrev.com/c3c48528bba261dddc1550c3f8c6d3ffa0f4ff5e/ui/compositor/compositor.h
[modify] https://crrev.com/c3c48528bba261dddc1550c3f8c6d3ffa0f4ff5e/ui/compositor/compositor_unittest.cc

Comment 12 by zmo@chromium.org, Nov 14 2017

Cc: abdulsyed@chromium.org ligim...@chromium.org zmo@chromium.org kbr@chromium.org gov...@chromium.org
 Issue 783069  has been merged into this issue.

Comment 13 by zmo@chromium.org, Nov 14 2017

Labels: OS-Mac
Status: Fixed (was: Started)
Verified the issue has been fixed on Linux and MacBook Air with Intel HD 4000.

Sign in to add a comment