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

Issue 735883 link

Starred by 0 users

Issue metadata

Status: Fixed
Owner:
Closed: Jul 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 3
Type: Bug

Blocking:
issue 678905



Sign in to add a comment

external/wpt/service-workers/service-worker/fetch-canvas-tainting-cache.https.html and fetch-canvas-tainting.https.html are flaky

Project Member Reported by vabr@chromium.org, Jun 22 2017

Issue description

sample build: https://build.chromium.org/p/chromium.webkit/builders/WebKit%20Win10/builds/23125

02:33:56.998 2832 worker/2 external/wpt/service-workers/service-worker/fetch-canvas-tainting-cache.https.html output stderr lines:
02:33:56.998 2832   CONSOLE ERROR: Access to Image at 'https://www1.web-platform.test:8444/service-workers/service-worker/resources/fetch-access-control.py?PNGIMAGE&ignore&cache' from origin 'https://web-platform.test:8444' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'https://web-platform.test:8444' is therefore not allowed access.
02:33:56.998 2832   CONSOLE ERROR: Access to Image at 'https://www1.web-platform.test:8444/service-workers/service-worker/resources/fetch-access-control.py?PNGIMAGE&ignore&cache' from origin 'https://web-platform.test:8444' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'https://web-platform.test:8444' is therefore not allowed access.
02:33:56.998 2832   CONSOLE ERROR: Access to Image at 'https://www1.web-platform.test:8444/service-workers/service-worker/resources/fetch-access-control.py?PNGIMAGE&ACAOrigin=https://web-platform.test:8444&ignore&cache' from origin 'https://web-platform.test:8444' has been blocked by CORS policy: The value of the 'Access-Control-Allow-Credentials' header in the response is '' which must be 'true' when the request's credentials mode is 'include'. Origin 'https://web-platform.test:8444' is therefore not allowed access.
02:33:56.998 2832   CONSOLE ERROR: Access to Image at 'https://www1.web-platform.test:8444/service-workers/service-worker/resources/fetch-access-control.py?PNGIMAGE&Auth&ignore&cache' from origin 'https://web-platform.test:8444' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'https://web-platform.test:8444' is therefore not allowed access. The response had HTTP status code 401.
02:33:56.998 2832   CONSOLE ERROR: Access to Image at 'https://www1.web-platform.test:8444/service-workers/service-worker/resources/fetch-access-control.py?PNGIMAGE&Auth&ignore&cache' from origin 'https://web-platform.test:8444' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'https://web-platform.test:8444' is therefore not allowed access.
02:33:56.998 2832   CONSOLE ERROR: Access to Image at 'https://www1.web-platform.test:8444/service-workers/service-worker/resources/fetch-access-control.py?PNGIMAGE&Auth&ACAOrigin=https://web-platform.test:8444&ignore&cache' from origin 'https://web-platform.test:8444' has been blocked by CORS policy: The value of the 'Access-Control-Allow-Credentials' header in the response is '' which must be 'true' when the request's credentials mode is 'include'. Origin 'https://web-platform.test:8444' is therefore not allowed access.
02:33:56.998 2832   [7904:6644:0622/023356.973:1549046:WARNING:ipc_message_attachment_set.cc(49)] MessageAttachmentSet destroyed with unconsumed attachments: 0/1
02:33:57.001 4776 [33854/58986] external/wpt/service-workers/service-worker/fetch-canvas-tainting-cache.https.html failed unexpectedly (text diff)
02:33:57.000 2832 worker/2 external/wpt/service-workers/service-worker/fetch-canvas-tainting-cache.https.html failed:
02:33:57.001 2832 worker/2  text diff

Full log attached.
 
webkit_tests.txt
8.0 MB View Download

Comment 1 by vabr@chromium.org, Jun 22 2017

Labels: OS-Windows
Project Member

Comment 2 by bugdroid1@chromium.org, Jun 22 2017

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

commit 9aa5c81cef82581927359413d7b1522352d72965
Author: Vaclav Brozek <vabr@chromium.org>
Date: Thu Jun 22 11:10:20 2017

Disable fetch-canvas-tainting-cache.https.html on Win10

Disable
external/wpt/service-workers/service-worker/fetch-canvas-tainting-cache.https.html,
more info on the bug.

NOTRY=true
TBR=qyearsley@google.com
BUG= 735883 

Change-Id: I32209d9e45a2049f816d2b52755722415783ded1
Reviewed-on: https://chromium-review.googlesource.com/544860
Commit-Queue: Vaclav Brozek <vabr@chromium.org>
Reviewed-by: Vaclav Brozek <vabr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#481504}
[modify] https://crrev.com/9aa5c81cef82581927359413d7b1522352d72965/third_party/WebKit/LayoutTests/TestExpectations

Comment 3 by falken@chromium.org, Jun 23 2017

Blocking: 678905
Owner: leon....@intel.com
Status: Assigned (was: Untriaged)
The flakes started when this test was enabled at:
https://chromium-review.googlesource.com/c/536356/

We expected to fail in one way:
"cross_origin: use-credentials must be LOAD_ERROR but NOT_TAINTED"

But failed in another:
"cross_origin:  must be TAINTED but NOT_TAINTED"

Leon can you look?
Project Member

Comment 4 by bugdroid1@chromium.org, Jun 23 2017

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

commit b0041268bdb98f23e9b89ab3205adb93631bd5a8
Author: Matt Falkenhagen <falken@chromium.org>
Date: Fri Jun 23 06:39:34 2017

Gardening: Revise service worker bug links and expectations.

TBR=horo

Bug:  735883 
Change-Id: Ia974a3c566c677d3f5bfdaedee5ef5a53397f6fb
Reviewed-on: https://chromium-review.googlesource.com/544728
Reviewed-by: Matt Falkenhagen <falken@chromium.org>
Reviewed-by: Tim 'mithro' Ansell <tansell@chromium.org>
Reviewed-by: Tsuyoshi Horo <horo@chromium.org>
Commit-Queue: Matt Falkenhagen <falken@chromium.org>
Cr-Commit-Position: refs/heads/master@{#481817}
[modify] https://crrev.com/b0041268bdb98f23e9b89ab3205adb93631bd5a8/third_party/WebKit/LayoutTests/TestExpectations

Comment 5 by falken@chromium.org, Jun 23 2017

Summary: external/wpt/service-workers/service-worker/fetch-canvas-tainting-cache.https.html and fetch-canvas-tainting.https.html are flaky (was: external/wpt/service-workers/service-worker/fetch-canvas-tainting-cache.https.html flakes with text diff)
Both tests are flaky:
fetch-canvas-tainting-cache.https.html
fetch-canvas-tainting.https.html

Comment 6 by leon....@intel.com, Jun 24 2017

Status: Started (was: Assigned)

Comment 7 by leon....@intel.com, Jun 27 2017

I uploaded CL https://chromium-review.googlesource.com/c/549857/ to fix the failure mentioned at comment #3.

Note:
Currently both tests are still flaky, the root cause would be fixed from the part of resource fetcher:
https://chromium-review.googlesource.com/c/536356/1/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/resources/fetch-canvas-tainting-iframe.html#235
https://chromium-review.googlesource.com/c/516925/40/third_party/WebKit/Source/platform/loader/fetch/ResourceFetcher.cpp#1037
 
After fixed that, we can finally remove both these tests from TestExpectations and remove their corresponding -expected.txt files.

Comment 8 by leon....@intel.com, Jun 27 2017

Cc: falken@chromium.org tyoshino@chromium.org horo@chromium.org
Project Member

Comment 9 by bugdroid1@chromium.org, Jun 28 2017

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

commit f970e7925878bb086007ca4d8fefaa866150478f
Author: Han Leon <leon.han@intel.com>
Date: Wed Jun 28 07:05:39 2017

[ServiceWorker] Fix wpt test fetch-canvas-tainting-iframe.html

Fetching image from remote url with 'mode=cors&credentials=same-origin'
should not taint the image object without crossOrigin setting.

'
The response type is "cors" which is one of CORS-same-origin.

https://html.spec.whatwg.org/#terminology-3
> A response whose type is "basic", "cors", or "default" is
> CORS-same-origin.

So the origin of the image is the element's node document's origin.

https://html.spec.whatwg.org/#origin:cors-cross-origin
> For images of img elements
>  If the image data is CORS-cross-origin
>   A unique opaque origin assigned when the image is created.
>  If the image data is CORS-same-origin
>   The img element's node document's origin.

So the origin-clean flag of the element is true.

https://html.spec.whatwg.org/#images-2:concept-canvas-origin-clean-6
> If the origin of image's image is not the same origin as the origin
> specified by the entry settings object, then set the origin-clean flag
> of the ImageBitmap object's bitmap to false.

So the image should not be tainted.
'

BUG= 735883 
TEST=blink_tests
external/wpt/service-workers/service-worker/fetch-canvas-tainting.https.html
external/wpt/service-workers/service-worker/fetch-canvas-tainting-cache.https.html

Change-Id: I22521f1d78f6fb6bb122b166ef0d0b3ca70857ad
Reviewed-on: https://chromium-review.googlesource.com/549857
Reviewed-by: Tsuyoshi Horo <horo@chromium.org>
Commit-Queue: Han Leon <leon.han@intel.com>
Cr-Commit-Position: refs/heads/master@{#482909}
[modify] https://crrev.com/f970e7925878bb086007ca4d8fefaa866150478f/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/resources/fetch-canvas-tainting-iframe.html

Project Member

Comment 10 by bugdroid1@chromium.org, Jul 14 2017

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

commit 9f76987f9f8ee5c7b0647270db7db4dde49746e7
Author: Han Leon <leon.han@intel.com>
Date: Fri Jul 14 07:22:05 2017

[ServiceWorker] Forbid reusing resource if requests have different credentials mode

This CL is to fix the root cause for failures of service worker wpt
tests.

The test loads an url for an Image object with 'anonymous' crossOrigin
property at line227 of fetch-canvas-tainting-iframe.html, succeeds in
loading without tainting, and then it loads the url again for another
Image object with 'use-credentials' crossOrigin property at line234,
this is expected to result in loading error, but currently it results
in success. The root cause is that Memory Cache is reusing the first
time's response for the second time resource request, although these
two requests have different credentials mode.

BUG= 735883 
TEST=blink_tests
external/wpt/service-workers/service-worker/fetch-canvas-tainting.https.html
external/wpt/service-workers/service-worker/fetch-canvas-tainting-cache.https.html

Change-Id: I9acdcf3811b6dcd5ea2ffe858ec35f51f7f2cc3f
Reviewed-on: https://chromium-review.googlesource.com/567690
Reviewed-by: Tsuyoshi Horo <horo@chromium.org>
Reviewed-by: Takeshi Yoshino <tyoshino@chromium.org>
Commit-Queue: Han Leon <leon.han@intel.com>
Cr-Commit-Position: refs/heads/master@{#486697}
[modify] https://crrev.com/9f76987f9f8ee5c7b0647270db7db4dde49746e7/third_party/WebKit/LayoutTests/TestExpectations
[delete] https://crrev.com/6f246deb08d7f37dfa7036c62d608e4fddbfe098/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/fetch-canvas-tainting-cache.https-expected.txt
[delete] https://crrev.com/6f246deb08d7f37dfa7036c62d608e4fddbfe098/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/fetch-canvas-tainting.https-expected.txt
[delete] https://crrev.com/6f246deb08d7f37dfa7036c62d608e4fddbfe098/third_party/WebKit/LayoutTests/platform/mac-mac10.11/virtual/off-main-thread-fetch/external/wpt/service-workers/service-worker/fetch-canvas-tainting.https-expected.txt
[delete] https://crrev.com/6f246deb08d7f37dfa7036c62d608e4fddbfe098/third_party/WebKit/LayoutTests/platform/mac-mac10.9/virtual/off-main-thread-fetch/external/wpt/service-workers/service-worker/fetch-canvas-tainting-cache.https-expected.txt
[delete] https://crrev.com/6f246deb08d7f37dfa7036c62d608e4fddbfe098/third_party/WebKit/LayoutTests/platform/mac-retina/virtual/off-main-thread-fetch/external/wpt/service-workers/service-worker/fetch-canvas-tainting.https-expected.txt
[delete] https://crrev.com/6f246deb08d7f37dfa7036c62d608e4fddbfe098/third_party/WebKit/LayoutTests/platform/mac/virtual/off-main-thread-fetch/external/wpt/service-workers/service-worker/fetch-canvas-tainting.https-expected.txt
[modify] https://crrev.com/9f76987f9f8ee5c7b0647270db7db4dde49746e7/third_party/WebKit/Source/platform/loader/fetch/MemoryCacheCorrectnessTest.cpp
[modify] https://crrev.com/9f76987f9f8ee5c7b0647270db7db4dde49746e7/third_party/WebKit/Source/platform/loader/fetch/RawResource.h
[modify] https://crrev.com/9f76987f9f8ee5c7b0647270db7db4dde49746e7/third_party/WebKit/Source/platform/loader/fetch/RawResourceTest.cpp
[modify] https://crrev.com/9f76987f9f8ee5c7b0647270db7db4dde49746e7/third_party/WebKit/Source/platform/loader/fetch/Resource.cpp
[modify] https://crrev.com/9f76987f9f8ee5c7b0647270db7db4dde49746e7/third_party/WebKit/Source/platform/loader/fetch/ResourceTest.cpp

Comment 11 by leon....@intel.com, Jul 17 2017

Status: Fixed (was: Started)

Sign in to add a comment