New issue
Advanced search Search tips

Issue 809735 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Feb 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 1
Type: Bug

Blocking:
issue 268640



Sign in to add a comment

CrossSiteDocumentBlockingServiceWorkerTest.NetworkAndOpaqueResponse may be flaky.

Project Member Reported by lukasza@chromium.org, Feb 6 2018

Issue description

npm@ reports that CrossSiteDocumentBlockingServiceWorkerTest.NetworkAndOpaqueResponse may be flaky, pointing to a flake at https://ci.chromium.org/buildbot/tryserver.chromium.android/linux_android_rel_ng/483409:

    [ RUN      ] CrossSiteDocumentBlockingServiceWorkerTest.NetworkAndOpaqueResponse
    ...
    ../../content/browser/loader/cross_site_document_blocking_browsertest.cc:487: Failure
    Expected equality of these values:
      "error: TypeError: Failed to fetch"
      response
        Which is: ""

OTOH,
- I am not able to repro the flaky failures locally
- The flakiness dashboard is green [1]
- chromium-try-flakes doesn't see the flakiness [2]

[1] https://test-results.appspot.com/dashboards/flakiness_dashboard.html#testType=content_browsertests&tests=CrossSiteDocumentBlockingServiceWorkerTest

[2] http://chromium-try-flakes.appspot.com/search?q=CrossSiteDocumentBlockingServiceWorkerTest
 

Comment 1 by npm@chromium.org, Feb 6 2018

There are some more failures from this test here (not all the content_browsertests are caused by this test though):
https://ci.chromium.org/buildbot/tryserver.chromium.android/linux_android_rel_ng/?limit=200

It's true there's no red so far, but many of the blacks in [1] actually seem to be caused by the test.


I see that CrossSiteDocumentBlockingServiceWorkerTest.NoNetwork also sometimes fails - e.g. here: https://ci.chromium.org/buildbot/chromium.android/KitKat%20Phone%20Tester%20(dbg)/3248

I don't know what can be the source of the flakiness (maybe |event.waitUntil(self.clients.claim())| doesn't guarantee that the service worker is active in the remainder of the test?).  I am not sure if I should try landing speculative fixes.

We probably should at least try to manage the flakiness by disabling the tests on Android.  I can take care of that.
Project Member

Comment 3 by bugdroid1@chromium.org, Feb 7 2018

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

commit 844ff0ceb9d80be166aedb30fe813853555bf177
Author: Lukasz Anforowicz <lukasza@chromium.org>
Date: Wed Feb 07 00:36:23 2018

Disable flaky CrossSiteDocumentBlockingServiceWorkerTest on Android.

Bug:  809735 
Change-Id: I9e5376b7fcea6f4a96fdf831b13bae801753e962
Tbr: creis@chromium.org
Reviewed-on: https://chromium-review.googlesource.com/905748
Reviewed-by: Łukasz Anforowicz <lukasza@chromium.org>
Commit-Queue: Łukasz Anforowicz <lukasza@chromium.org>
Cr-Commit-Position: refs/heads/master@{#534853}
[modify] https://crrev.com/844ff0ceb9d80be166aedb30fe813853555bf177/content/browser/loader/cross_site_document_blocking_browsertest.cc

This test is also flaky on Linux CFI (CL disabling it on Linux on the way).
Increasing priority to P1 as I could not find a way to disable it only for Linux CFI and disabled it for all linux builds.
Labels: -Pri-2 Pri-1
Project Member

Comment 6 by bugdroid1@chromium.org, Feb 14 2018

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

commit 2735f704be9d52160b33f02c539f9c87156f6367
Author: Tim Schumann <tschumann@chromium.org>
Date: Wed Feb 14 11:20:18 2018

Disable flaky Linux CSI tests.

CrossSiteDocumentBlockingServiceWorkerTest.NoNetwork and CrossSiteDocumentBlockingServiceWorkerTest.NetworkAndOpaqueResponse

They were already marked as flaky for Android and fail with the same
error on Linux CSI.

Bug:  809735 
Change-Id: I62d8f8d152af287fd3c983806d430c5bd4e1d93e
Tbr: creis@chromium.org,lukasza@chromium.org
Reviewed-on: https://chromium-review.googlesource.com/918581
Commit-Queue: Tim Schumann <tschumann@chromium.org>
Reviewed-by: Tim Schumann <tschumann@chromium.org>
Cr-Commit-Position: refs/heads/master@{#536696}
[modify] https://crrev.com/2735f704be9d52160b33f02c539f9c87156f6367/content/browser/loader/cross_site_document_blocking_browsertest.cc

Cc: falken@chromium.org
Status: Started (was: Assigned)
WIP CL @ https://chromium-review.googlesource.com/c/chromium/src/+/919256
Blocking: 268640
Project Member

Comment 9 by bugdroid1@chromium.org, Feb 21 2018

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

commit 04f0f4c72d765ccc8059a84b6bcd0e96b62888cb
Author: Lukasz Anforowicz <lukasza@chromium.org>
Date: Wed Feb 21 02:43:01 2018

Speculative flakiness fix: CrossSiteDocumentBlockingServiceWorkerTest.*

This CL speculatively tries to avoid test flakiness (see the referenced
bug) by explicitly reloading the test page after service worker signals
its readiness - the service worker should be active on the reloaded
page.  Before this CL, the service worker tried to depend on the call
to |self.clients.claim()| to make sure the service worker is activated
on the test page (and we speculate that this wasn't properly
synchronized with the rest of the test).

Bug:  809735 
Change-Id: Ic88039b6ab6ab6676d4a75310342ead634b6c5c9
Reviewed-on: https://chromium-review.googlesource.com/919256
Reviewed-by: Nick Carter <nick@chromium.org>
Reviewed-by: Matt Falkenhagen <falken@chromium.org>
Commit-Queue: Łukasz Anforowicz <lukasza@chromium.org>
Cr-Commit-Position: refs/heads/master@{#538005}
[modify] https://crrev.com/04f0f4c72d765ccc8059a84b6bcd0e96b62888cb/content/browser/loader/cross_site_document_blocking_browsertest.cc
[modify] https://crrev.com/04f0f4c72d765ccc8059a84b6bcd0e96b62888cb/content/test/data/cross_site_document_blocking/service_worker.js

Status: Fixed (was: Started)
Everything seems to be green here: https://test-results.appspot.com/dashboards/flakiness_dashboard.html#testType=content_browsertests&tests=CrossSiteDocumentBlockingServiceWorkerTest

So - I assume that the bug really got fixed.  Please shout and reopen if you think this is not the case (e.g. if you see any more flakes).

Sign in to add a comment