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

Issue 898641 link

Starred by 1 user

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 1
Type: Bug
Flaky-Test: WebContentsImplBrowserTest.RenderWidgetDeletedWhileMouseLockPending

Blocking:
issue 899073



Sign in to add a comment

WebContentsImplBrowserTest.RenderWidgetDeletedWhileMouseLockPending is flaky

Project Member Reported by Findit, Oct 24

Issue description


Flaky test: WebContentsImplBrowserTest.RenderWidgetDeletedWhileMouseLockPending
Sample failed build due to flakiness: https://ci.chromium.org/buildbot/chromium.chromiumos/linux-chromeos-rel/15110
Test output log: https://chromium-swarm.appspot.com/task?id=40c06a6021863c10
Culprit (75.4% confidence): r602389
Analysis: https://findit-for-me.appspot.com/waterfall/flake?key=ag9zfmZpbmRpdC1mb3ItbWVy6QELEhdNYXN0ZXJGbGFrZUFuYWx5c2lzUm9vdCKyAWNocm9taXVtLmNocm9taXVtb3MvbGludXgtY2hyb21lb3MtcmVsLzE1MTEwL3NpbmdsZV9wcm9jZXNzX21hc2hfY29udGVudF9icm93c2VydGVzdHMvVjJWaVEyOXVkR1Z1ZEhOSmJYQnNRbkp2ZDNObGNsUmxjM1F1VW1WdVpHVnlWMmxrWjJWMFJHVnNaWFJsWkZkb2FXeGxUVzkxYzJWTWIyTnJVR1Z1WkdsdVp3PT0MCxITTWFzdGVyRmxha2VBbmFseXNpcxgBDA

Please revert the culprit, or disable the test and find the appropriate owner.

If the culprit above is wrong, please file a bug using this link:
https://bugs.chromium.org/p/chromium/issues/entry?status=Unconfirmed&labels=Pri-1,Test-Findit-Wrong&components=Tools%3ETest%3EFindit%3EFlakiness&summary=%5BFindit%5D%20Flake%20Analyzer%20-%20Wrong%20result%20for%20WebContentsImplBrowserTest.RenderWidgetDeletedWhileMouseLockPending&comment=Link%20to%20Analysis%3A%20https://findit-for-me.appspot.com/waterfall/flake?key=ag9zfmZpbmRpdC1mb3ItbWVy6QELEhdNYXN0ZXJGbGFrZUFuYWx5c2lzUm9vdCKyAWNocm9taXVtLmNocm9taXVtb3MvbGludXgtY2hyb21lb3MtcmVsLzE1MTEwL3NpbmdsZV9wcm9jZXNzX21hc2hfY29udGVudF9icm93c2VydGVzdHMvVjJWaVEyOXVkR1Z1ZEhOSmJYQnNRbkp2ZDNObGNsUmxjM1F1VW1WdVpHVnlWMmxrWjJWMFJHVnNaWFJsWkZkb2FXeGxUVzkxYzJWTWIyTnJVR1Z1WkdsdVp3PT0MCxITTWFzdGVyRmxha2VBbmFseXNpcxgBDA

Automatically posted by the findit-for-me app (https://goo.gl/Ot9f7N).
 
Cc: danakj@chromium.org
Reverted target CL, so should return to normal.
Cc: creis@chromium.org ajwong@chromium.org dcheng@chromium.org
Components: Tests>Flaky Internals>Sandbox>SiteIsolation
Owner: lfg@chromium.org
This is already flaky before that CL. Example:

  [ RUN      ] WebContentsImplBrowserTest.RenderWidgetDeletedWhileMouseLockPending
  [156907:156907:1024/165427.693361:ERROR:render_process_host_impl.cc(4011)] UnmatchedServiceWorkerProcessTracker got host (nil)
  [156907:156907:1024/165427.693417:ERROR:render_process_host_impl.cc(4019)] MaybeTakeSpareRenderProcessHost

  DevTools listening on ws://127.0.0.1:41497/devtools/browser/9b794164-8a21-41d2-adaf-3f287b8c59fd
  [156907:156907:1024/165427.709315:ERROR:render_process_host_impl.cc(2805)] NotifySpareManagerAboutRecentlyUsedBrowserContext
  [156907:156907:1024/165427.717905:ERROR:render_process_host_impl.cc(2805)] NotifySpareManagerAboutRecentlyUsedBrowserContext
  [156907:156907:1024/165427.718743:ERROR:render_process_host_impl.cc(2805)] NotifySpareManagerAboutRecentlyUsedBrowserContext
  [156907:156907:1024/165428.085665:ERROR:render_process_host_impl.cc(4011)] UnmatchedServiceWorkerProcessTracker got host (nil)
  [156907:156907:1024/165428.085715:ERROR:render_process_host_impl.cc(4019)] MaybeTakeSpareRenderProcessHost
  [156907:156907:1024/165428.092819:ERROR:render_process_host_impl.cc(2805)] NotifySpareManagerAboutRecentlyUsedBrowserContext
  ../../content/browser/web_contents/web_contents_impl_browsertest.cc:2075: Failure
  Value of: delegate.get()->request_to_lock_mouse_called_
    Actual: false
  Expected: true


Cc: lukasza@chromium.org
Labels: -Sheriff-Chromium
Removing from sheriff queue since recent build succeeded after revert.
This test does a NavigateToURL(a new origin) then expects the RenderWidgetHost to be replaced when it runs its script. Is it possible it's running the script in the old renderer racily before the navigate happens?
Re#5: No, NavigateToURL should block until the navigation completes (see https://chromium.googlesource.com/chromium/src/+/HEAD/content/public/test/browser_test_utils.cc#579).

I suspect that the race is because the ExecuteScript() will send the IPC to the browser process, but it doesn't guarantee that the message loop will process the IPC. If that's the case, then the fix should be adding a message loop after ExecuteScript() that quits when RequestToLockMouse() is called on the WebContentsDelegate.

See https://bugs.chromium.org/p/chromium/issues/detail?id=898628#c15

Tests appear to be assuming navigation completed in renderer B implies teardown is complete for renderer A, which is not true.
This test fails consistently by delaying the SwapOut_ACK message, just like ProcessManagementTest.ExtensionProcessBalancing in https://bugs.chromium.org/p/chromium/issues/detail?id=898628

Blocking: 899073
Cc: lfg@chromium.org
Owner: lukasza@chromium.org
lukasza@ I think you were looking at how to solve this, can we assign to you?
Status: Assigned (was: Untriaged)
Project Member

Comment 12 by bugdroid1@chromium.org, Nov 5

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

commit da0109e9c47e5cb38e8400a229766de5ac1f6637
Author: danakj <danakj@chromium.org>
Date: Mon Nov 05 20:54:59 2018

Disable the flaky RenderWidgetDeletedWhileMouseLockPending test

R=piman@chromium.org

Change-Id: Ie3ad9d57c1b078551a0a7e83dc84a3e95958072c
Bug: 898641
Reviewed-on: https://chromium-review.googlesource.com/c/1318385
Reviewed-by: Antoine Labour <piman@chromium.org>
Commit-Queue: danakj <danakj@chromium.org>
Cr-Commit-Position: refs/heads/master@{#605460}
[modify] https://crrev.com/da0109e9c47e5cb38e8400a229766de5ac1f6637/content/browser/web_contents/web_contents_impl_browsertest.cc

Just to update the bug -- I think the test is fine, the bug is in the implementation.

When a process swap occurs, we need to release the mouse lock before the RenderWidgetHost is deleted, which only happens after the unload handlers are finished running.

Looking at the code, keyboard lock should probably be fixed as well.

Sign in to add a comment