New issue
Advanced search Search tips

Issue 621892 link

Starred by 3 users

Issue metadata

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



Sign in to add a comment

Some css3/filter/effect-*-hw.html are flaky

Project Member Reported by vasi...@chromium.org, Jun 21 2016

Issue description

Regressions: Unexpected image-only failures (1)
  css3/filters/effect-hue-rotate-hw.html [ Failure ]

Happens on WebKit Win7 (dbg), WebKit Linux (dbg), WebKit Linux Leak reliably.

Link to the first failure on Windows: https://build.chromium.org/p/chromium.webkit/builders/WebKit%20Win7%20%28dbg%29/builds/6112
 
Project Member

Comment 1 by bugdroid1@chromium.org, Jun 21 2016

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

commit bc74a8deed658256d3150e4c17a79cccea9aea06
Author: Vasilii Sukhanov <vasilii@chromium.org>
Date: Tue Jun 21 12:26:14 2016

Disable css3/filters/effect-hue-rotate-hw.html

BUG= 621892 
TBR=wangxianzhu@chromium.org

Review URL: https://codereview.chromium.org/2085953002 .

Cr-Commit-Position: refs/heads/master@{#400965}

[modify] https://crrev.com/bc74a8deed658256d3150e4c17a79cccea9aea06/third_party/WebKit/LayoutTests/TestExpectations

Components: Blink>SVG
Labels: -OS-Linux -OS-Windows OS-All
Owner: pdr@chromium.org
Status: Assigned (was: Untriaged)
Summary: Some css3/filter/effect-*-hw.html are flaky (was: css3/filters/effect-hue-rotate-hw.html fails on Win7 and Linux)
Other css3/filter/effect-*-hw.html are also flaky, not only on platforms on which the tests are rebaselined (http://test-results.appspot.com/dashboards/flakiness_dashboard.html#tests=css3%2Ffilters%2Feffect-):

css3/filters/effect-brightness-clamping-hw.html
css3/filters/effect-brightness-hw.html
css3/filters/effect-hue-rotate-hw.html
css3/filters/effect-saturate-hw.html
css3/filters/effect-sepia-hw.html

pdr@ can you take a look?

Comment 4 by f...@opera.com, Jun 21 2016

Quote from  issue 620141 :

WebKit Win7 (dbg) rev 399539 ... 399592
css3/filters/effect-hue-rotate-hw.html

In that range 399591 is another rebaseline which is for 4fd93e539bd8fdc3a42d1ba5f5bfe9acd9bbd949.
Cc: f...@opera.com
Owner: enne@chromium.org
enne@: could you take a look or reassign? These tests seem to have gotten flaky 
around when https://chromium.googlesource.com/chromium/src/+/4fd93e539bd8fdc3a42d1ba5f5bfe9ac
d9bbd949 landed, and don't seem to be flaky on Mac (where the optimization is 
disabled).

Comment 7 by enne@chromium.org, Aug 12 2016

The difference between the images is definitely what I would expect to see when the optimization was and wasn't running.  I'll take a look and see if I can understand why it's being flakily applied.  At worst, maybe we need a layout tests setting to run in a consistent mode.

Comment 8 by pdr@chromium.org, Aug 31 2016

Components: Blink>CSS>Filters
Any progress on this issue? We lose quite a bit of test coverage without these tests.

Comment 9 by enne@chromium.org, Aug 31 2016

Sorry for letting this drop off my radar.  I'll take a look.

Comment 10 by enne@chromium.org, Sep 1 2016

Cc: pdr@chromium.org senorblanco@chromium.org
This is extremely odd.  Running locally, I get four flaky failures:
 effect-sepia-hw
 effect-hue-rotate-hw
 effect-saturate-hw
 effect-contrast-hw

contrast isn't on the flakiness dashboard, but should be.  I can't repro brightness-hw or brightness-clamping-hw.

printf debugging suggests that my optimization in GL renderer is running every time, and every time there is a single color filter at the root of the dag.  It's possible that this is just exposing preexisting flakiness, and it's not clear to me yet where this is coming from.

Comment 11 by enne@chromium.org, Sep 1 2016

It does appear to be my change.  If I comment out the render pass skipping optimization and rebaseline all the tests, then they pass consistently through a number of retries.

The flakes appear similar to the rebaselines, where the cause is slightly different texture sampling of a bitmap that's being stretched (whereas before the optimization the render pass was then being sampled 1:1 texel to screen pixels).  The images are not perceptually different when there are failures.

With my patch, the texture uniforms appear to be identical when the tests pass and fail.  I am not able to discern any different behavior inside of cc between passing and failing tests.  Skia filters aren't used.  These all go through the "color matrix" shader path in GLRenderer and don't use Ganesh.

Another test: I resized the reference.png to be 256x256 so that the render pass and the tile quad would be the same size.  I rebaselined all the tests.  With that, the flakes disappeared.  So, it does appear to be somewhat texture sampling related.

A final test: I took my patch and rebaselined all the tests with the results from desktop gl.  I ran all the tests 10 times both in batches and singly and there were zero failures.

Therefore, so far as I can tell, this appears to be a texture sampling flakiness bug in mesa.  T_T

Possible solutions:
(1) add whitespace to reference.png so that it's 256x256.  (And hope in the future that this would be the tile size that a layer would choose for such a layer size.)
(2) add hella plumbing to turn off this optimization only for layout tests, somehow.  (And hope that no other changes end up tickling this particular bug.)
(3) Fix Mesa.  (Mostly kidding.  I don't think it's worth the time.)

Thoughts?

Comment 12 by pdr@chromium.org, Sep 1 2016

Wow, amazing investigation!

Do you know why only these tests affected by the mesa bug?

Comment 13 by enne@chromium.org, Sep 1 2016

I suspect it's because these tests are the only ones that create graphics layers (so don't just raster with skia software), only have a color filter (so don't use ganesh), and are not reference filters (which skip the optimization in my patch).  There's a couple others (grayscale?) that fit into that category but aren't flaky, but I'm not sure why.
Thanks so much for looking into this! It's definitely possible that Mesa is buggy, but generally it tends to be deterministic, rather than random, so I'm surprised at Mesa-induced flakiness.

There is a project underway to switch layout tests to use SwiftShader instead of Mesa, which should help to isolate the Mesa-specific problems. If that's the case, it should go away with the switch.
Project Member

Comment 15 by bugdroid1@chromium.org, Sep 14 2016

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

commit 3950059021388215d3864e552c7da761d4c3f822
Author: enne <enne@chromium.org>
Date: Wed Sep 14 00:11:32 2016

Deflake css3/filter/effect layout tests

https://codereview.chromium.org/1960543002 introduced some flakiness in
these tests, which appears to be due to texture sampling flakiness in
Mesa.  One workaround for this is to resize the bitmap in the tests to
be 256x128.  Because the tile (and the tile draw quad) will use this
size directly (instead of rounding up to some other size), the tile
and the render pass share the same size and are nice round numbers,
so texture sampling should have no errors.

BUG= 621892 

Review-Url: https://codereview.chromium.org/2304243002
Cr-Commit-Position: refs/heads/master@{#418428}

[modify] https://crrev.com/3950059021388215d3864e552c7da761d4c3f822/third_party/WebKit/LayoutTests/TestExpectations
[modify] https://crrev.com/3950059021388215d3864e552c7da761d4c3f822/third_party/WebKit/LayoutTests/css3/filters/effect-brightness-clamping-hw.html
[modify] https://crrev.com/3950059021388215d3864e552c7da761d4c3f822/third_party/WebKit/LayoutTests/css3/filters/effect-brightness-hw.html
[modify] https://crrev.com/3950059021388215d3864e552c7da761d4c3f822/third_party/WebKit/LayoutTests/css3/filters/effect-grayscale-hw.html
[modify] https://crrev.com/3950059021388215d3864e552c7da761d4c3f822/third_party/WebKit/LayoutTests/css3/filters/effect-hue-rotate-hw.html
[modify] https://crrev.com/3950059021388215d3864e552c7da761d4c3f822/third_party/WebKit/LayoutTests/css3/filters/effect-saturate-hw.html
[modify] https://crrev.com/3950059021388215d3864e552c7da761d4c3f822/third_party/WebKit/LayoutTests/css3/filters/effect-sepia-hw.html
[add] https://crrev.com/3950059021388215d3864e552c7da761d4c3f822/third_party/WebKit/LayoutTests/css3/filters/resources/reference_square.png
[add] https://crrev.com/3950059021388215d3864e552c7da761d4c3f822/third_party/WebKit/LayoutTests/platform/android/css3/filters/effect-brightness-clamping-hw-expected.txt
[add] https://crrev.com/3950059021388215d3864e552c7da761d4c3f822/third_party/WebKit/LayoutTests/platform/android/css3/filters/effect-brightness-hw-expected.txt
[add] https://crrev.com/3950059021388215d3864e552c7da761d4c3f822/third_party/WebKit/LayoutTests/platform/android/css3/filters/effect-grayscale-hw-expected.txt
[add] https://crrev.com/3950059021388215d3864e552c7da761d4c3f822/third_party/WebKit/LayoutTests/platform/android/css3/filters/effect-hue-rotate-hw-expected.txt
[add] https://crrev.com/3950059021388215d3864e552c7da761d4c3f822/third_party/WebKit/LayoutTests/platform/android/css3/filters/effect-saturate-hw-expected.txt
[add] https://crrev.com/3950059021388215d3864e552c7da761d4c3f822/third_party/WebKit/LayoutTests/platform/android/css3/filters/effect-sepia-hw-expected.txt
[modify] https://crrev.com/3950059021388215d3864e552c7da761d4c3f822/third_party/WebKit/LayoutTests/platform/linux/css3/filters/effect-brightness-clamping-hw-expected.png
[modify] https://crrev.com/3950059021388215d3864e552c7da761d4c3f822/third_party/WebKit/LayoutTests/platform/linux/css3/filters/effect-brightness-clamping-hw-expected.txt
[modify] https://crrev.com/3950059021388215d3864e552c7da761d4c3f822/third_party/WebKit/LayoutTests/platform/linux/css3/filters/effect-brightness-hw-expected.png
[modify] https://crrev.com/3950059021388215d3864e552c7da761d4c3f822/third_party/WebKit/LayoutTests/platform/linux/css3/filters/effect-brightness-hw-expected.txt
[modify] https://crrev.com/3950059021388215d3864e552c7da761d4c3f822/third_party/WebKit/LayoutTests/platform/linux/css3/filters/effect-grayscale-hw-expected.png
[modify] https://crrev.com/3950059021388215d3864e552c7da761d4c3f822/third_party/WebKit/LayoutTests/platform/linux/css3/filters/effect-grayscale-hw-expected.txt
[modify] https://crrev.com/3950059021388215d3864e552c7da761d4c3f822/third_party/WebKit/LayoutTests/platform/linux/css3/filters/effect-hue-rotate-hw-expected.png
[modify] https://crrev.com/3950059021388215d3864e552c7da761d4c3f822/third_party/WebKit/LayoutTests/platform/linux/css3/filters/effect-hue-rotate-hw-expected.txt
[modify] https://crrev.com/3950059021388215d3864e552c7da761d4c3f822/third_party/WebKit/LayoutTests/platform/linux/css3/filters/effect-saturate-hw-expected.png
[modify] https://crrev.com/3950059021388215d3864e552c7da761d4c3f822/third_party/WebKit/LayoutTests/platform/linux/css3/filters/effect-saturate-hw-expected.txt
[modify] https://crrev.com/3950059021388215d3864e552c7da761d4c3f822/third_party/WebKit/LayoutTests/platform/linux/css3/filters/effect-sepia-hw-expected.png
[modify] https://crrev.com/3950059021388215d3864e552c7da761d4c3f822/third_party/WebKit/LayoutTests/platform/linux/css3/filters/effect-sepia-hw-expected.txt
[modify] https://crrev.com/3950059021388215d3864e552c7da761d4c3f822/third_party/WebKit/LayoutTests/platform/mac/css3/filters/effect-brightness-clamping-hw-expected.png
[modify] https://crrev.com/3950059021388215d3864e552c7da761d4c3f822/third_party/WebKit/LayoutTests/platform/mac/css3/filters/effect-brightness-clamping-hw-expected.txt
[modify] https://crrev.com/3950059021388215d3864e552c7da761d4c3f822/third_party/WebKit/LayoutTests/platform/mac/css3/filters/effect-brightness-hw-expected.txt
[modify] https://crrev.com/3950059021388215d3864e552c7da761d4c3f822/third_party/WebKit/LayoutTests/platform/mac/css3/filters/effect-grayscale-hw-expected.txt
[modify] https://crrev.com/3950059021388215d3864e552c7da761d4c3f822/third_party/WebKit/LayoutTests/platform/mac/css3/filters/effect-hue-rotate-hw-expected.txt
[modify] https://crrev.com/3950059021388215d3864e552c7da761d4c3f822/third_party/WebKit/LayoutTests/platform/mac/css3/filters/effect-saturate-hw-expected.txt
[modify] https://crrev.com/3950059021388215d3864e552c7da761d4c3f822/third_party/WebKit/LayoutTests/platform/mac/css3/filters/effect-sepia-hw-expected.txt
[modify] https://crrev.com/3950059021388215d3864e552c7da761d4c3f822/third_party/WebKit/LayoutTests/platform/win/css3/filters/effect-brightness-clamping-hw-expected.png
[modify] https://crrev.com/3950059021388215d3864e552c7da761d4c3f822/third_party/WebKit/LayoutTests/platform/win/css3/filters/effect-brightness-clamping-hw-expected.txt
[modify] https://crrev.com/3950059021388215d3864e552c7da761d4c3f822/third_party/WebKit/LayoutTests/platform/win/css3/filters/effect-brightness-hw-expected.png
[modify] https://crrev.com/3950059021388215d3864e552c7da761d4c3f822/third_party/WebKit/LayoutTests/platform/win/css3/filters/effect-brightness-hw-expected.txt
[modify] https://crrev.com/3950059021388215d3864e552c7da761d4c3f822/third_party/WebKit/LayoutTests/platform/win/css3/filters/effect-grayscale-hw-expected.png
[modify] https://crrev.com/3950059021388215d3864e552c7da761d4c3f822/third_party/WebKit/LayoutTests/platform/win/css3/filters/effect-grayscale-hw-expected.txt
[modify] https://crrev.com/3950059021388215d3864e552c7da761d4c3f822/third_party/WebKit/LayoutTests/platform/win/css3/filters/effect-hue-rotate-hw-expected.png
[modify] https://crrev.com/3950059021388215d3864e552c7da761d4c3f822/third_party/WebKit/LayoutTests/platform/win/css3/filters/effect-hue-rotate-hw-expected.txt
[modify] https://crrev.com/3950059021388215d3864e552c7da761d4c3f822/third_party/WebKit/LayoutTests/platform/win/css3/filters/effect-saturate-hw-expected.png
[modify] https://crrev.com/3950059021388215d3864e552c7da761d4c3f822/third_party/WebKit/LayoutTests/platform/win/css3/filters/effect-saturate-hw-expected.txt
[modify] https://crrev.com/3950059021388215d3864e552c7da761d4c3f822/third_party/WebKit/LayoutTests/platform/win/css3/filters/effect-sepia-hw-expected.png
[modify] https://crrev.com/3950059021388215d3864e552c7da761d4c3f822/third_party/WebKit/LayoutTests/platform/win/css3/filters/effect-sepia-hw-expected.txt

Components: -Blink>CSS>Filters Blink>Compositing>Filters

Comment 17 by enne@chromium.org, May 8 2017

Status: Fixed (was: Assigned)

Comment 18 by enne@chromium.org, May 8 2017

Cc: enne@chromium.org
 Issue 620097  has been merged into this issue.

Sign in to add a comment