Bug 207038

Summary: Regression: fast/hidpi/image-srcset-svg-canvas-2x.html is failing consistently on iOS EWS
Product: WebKit Reporter: Aakash Jain <aakash_jain>
Component: Tools / TestsAssignee: Said Abou-Hallawa <sabouhallawa>
Status: RESOLVED FIXED    
Severity: Normal CC: ap, darin, dino, simon.fraser, thorton, tsavell, webkit-bot-watchers-bugzilla, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: Other   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=206993
https://bugs.webkit.org/show_bug.cgi?id=207851
Attachments:
Description Flags
Test list from bot
none
Patch
none
Patch
none
Patch
none
Patch
none
Patch
none
Patch
none
Patch
none
Patch
none
Patch none

Description Aakash Jain 2020-01-31 04:12:46 PST
Regression: fast/hidpi/image-srcset-svg-canvas-2x.html is failing consistently on iOS EWS.
This test was passing earlier on iOS, since yesterday (Jan 29) it started failing consistently on iOS EWS.

First failure in:
- Build: https://ews-build.webkit.org/#/builders/24/builds/9662
- Result: https://ews-build.webkit.org/results/iOS-13-Simulator-WK2-Tests-EWS/r389296-9662/results.html

Recent examples:
https://ews-build.webkit.org/#/builders/24/builds/9680
https://ews-build.webkit.org/#/builders/24/builds/9678
https://ews-build.webkit.org/#/builders/24/builds/9675

This issue doesn't seems to be happening on build.webkit.org bots: https://results.webkit.org/?suite=layout-tests&test=fast%2Fhidpi%2Fimage-srcset-svg-canvas-2x.html
Comment 1 Radar WebKit Bug Importer 2020-01-31 04:13:09 PST
<rdar://problem/59058757>
Comment 2 Aakash Jain 2020-02-03 06:41:50 PST
This test seems extremely flaky.

This test is slowing down EWS ios-wk2 queue and sometimes causes EWS to blame random patches for this test failure.

https://ews-build.webkit.org/#/builders/24/builds/9793 - "Found 1 pre-existing test failure: fast/hidpi/image-srcset-svg-canvas-2x.html"

https://ews-build.webkit.org/#/builders/24/builds/9786 - "Found flaky test: fast/hidpi/image-srcset-svg-canvas-2x.html"

https://ews-build.webkit.org/#/builders/24/builds/9779 - "Found 1 new test failure: fast/hidpi/image-srcset-svg-canvas-2x.html"

We should consider updating test expectations meanwhile while it is being investigated.
Comment 3 Truitt Savell 2020-02-05 08:41:45 PST
I am working on reproducing this failure with test lists.
Comment 4 Truitt Savell 2020-02-05 09:08:52 PST
This is not easily reproducing with a test list
Comment 5 Truitt Savell 2020-02-06 15:07:57 PST
Marked as failing in https://trac.webkit.org/changeset/255985/webkit

Sense this will end up skipping the test on EWS I expect another test to begin failing in its place.
Comment 6 Truitt Savell 2020-02-07 08:36:46 PST
The next test in line did end up failing. Now fast/hidpi/image-srcset-svg-canvas.html is failing on iOS-ews
Comment 7 Truitt Savell 2020-02-07 08:37:35 PST
Created attachment 390086 [details]
Test list from bot

This is the list of tests that run before the failing test on the test runner. most likely one of these tests is setting a bad state
Comment 8 Truitt Savell 2020-02-07 11:22:52 PST
I am able to reproduce the failure by using this command on the news bot:

run-webkit-tests --no-build --no-show-results --no-new-test-results --clobber-old-results --release --ios-simulator --child-processes 1 compositing/webgl/webgl-reflection.html fast/hidpi/image-srcset-svg2.html fast/hidpi/image-srcset-svg-canvas.html

remove either of the first two tests and it will no longer fail.


So something in the interaction of these three tests is causing this cascading failure:

compositing/webgl/webgl-reflection.html 
fast/hidpi/image-srcset-svg2.html 
fast/hidpi/image-srcset-svg-canvas.html
Comment 9 Truitt Savell 2020-02-07 13:03:20 PST
This is the first news run that shows the original test failure from fast/hidpi/image-srcset-relative-svg-canvas-2x.html

https://ews-build.webkit.org/#/builders/24/builds/9513
Comment 10 Aakash Jain 2020-02-17 12:26:21 PST
(In reply to Truitt Savell from comment #6)
> The next test in line did end up failing. Now fast/hidpi/image-srcset-svg-canvas.html is failing on iOS-ews
Filed https://bugs.webkit.org/show_bug.cgi?id=207851 to track that.
Comment 11 Truitt Savell 2020-02-20 14:33:48 PST
Changed expectations to force a skip of compositing/webgl/webgl-reflection.html on EWS instead of the two test fast/hidpi/image-srcset-relative-svg-canvas-2x.html and fast/hidpi/image-srcset-svg-canvas-2x.html.

https://trac.webkit.org/changeset/257091/webkit
Comment 12 Alexey Proskuryakov 2020-02-22 16:56:50 PST
*** Bug 207851 has been marked as a duplicate of this bug. ***
Comment 13 Said Abou-Hallawa 2020-03-27 17:17:36 PDT
Created attachment 394772 [details]
Patch
Comment 14 Said Abou-Hallawa 2020-03-27 19:10:22 PDT
With disabling the canvas accelerated drawing, the iOS EWS passed the all the tests from the first time. I will resubmit the patch one more time and see how the bots behave.
Comment 15 Said Abou-Hallawa 2020-03-27 19:11:00 PDT
Created attachment 394779 [details]
Patch
Comment 16 Aakash Jain 2020-03-27 19:54:49 PDT
(In reply to Said Abou-Hallawa from comment #14)
> I will resubmit the patch one more time and see how the bots behave.
Thanks for the patch. I have pressed the 'Rebuild' button 5 times on one of the successful ios-wk2 build (https://ews-build.webkit.org/#/builders/24/builds/14055). 

Let's see the results in following ones:
https://ews-build.webkit.org/#/buildrequests/411396
https://ews-build.webkit.org/#/buildrequests/411397
https://ews-build.webkit.org/#/buildrequests/411398
https://ews-build.webkit.org/#/buildrequests/411399
https://ews-build.webkit.org/#/buildrequests/411400
Comment 17 Said Abou-Hallawa 2020-03-28 00:55:54 PDT
Created attachment 394795 [details]
Patch
Comment 18 Said Abou-Hallawa 2020-03-28 03:26:26 PDT
Created attachment 394804 [details]
Patch
Comment 19 Said Abou-Hallawa 2020-03-28 03:26:59 PDT
Created attachment 394805 [details]
Patch
Comment 20 Said Abou-Hallawa 2020-03-28 03:27:37 PDT
Created attachment 394806 [details]
Patch
Comment 21 Said Abou-Hallawa 2020-03-28 03:28:00 PDT
Created attachment 394807 [details]
Patch
Comment 22 Said Abou-Hallawa 2020-03-28 03:28:40 PDT
Created attachment 394808 [details]
Patch
Comment 24 Said Abou-Hallawa 2020-03-28 09:11:02 PDT
iOS EWS bots succeeded in processing the latest patch from the first time with the 6 uploads I did and with the 6 retries that Aakash did.
Comment 25 Said Abou-Hallawa 2020-03-28 09:15:11 PDT
Created attachment 394820 [details]
Patch
Comment 26 Alexey Proskuryakov 2020-03-28 10:03:29 PDT
Comment on attachment 394820 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=394820&action=review

> LayoutTests/ChangeLog:9
> +        Disable the canvas scaling anti-aliasing by applying the CSS property 
> +        "image-rendering: pixelated;" to the <img> and the <canvas> elements.

Did you figure out what the state leaking form compositing/webgl/webgl-reflection.html is? With the root cause not fixed, it seems very likely that other tests will be affected.
Comment 27 Said Abou-Hallawa 2020-03-28 18:32:17 PDT
Comment on attachment 394820 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=394820&action=review

>> LayoutTests/ChangeLog:9
>> +        "image-rendering: pixelated;" to the <img> and the <canvas> elements.
> 
> Did you figure out what the state leaking form compositing/webgl/webgl-reflection.html is? With the root cause not fixed, it seems very likely that other tests will be affected.

No I have not. But I looked at the canvas drawing code carefully and I did not see anything that can be leaked from a previous page. Most likely the leaking in underlaying simulator frameworks.

I think we should avoid testing the antialiasing in all the hidpi tests. So I think this patch is worthy landing. We can keep the bug open and continue investigating but let's land this patch and see the results. And hopefully this will shorten iOS EWS bots processing time.
Comment 28 Darin Adler 2020-03-28 19:59:04 PDT
Comment on attachment 394820 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=394820&action=review

>>> LayoutTests/ChangeLog:9
>>> +        "image-rendering: pixelated;" to the <img> and the <canvas> elements.
>> 
>> Did you figure out what the state leaking form compositing/webgl/webgl-reflection.html is? With the root cause not fixed, it seems very likely that other tests will be affected.
> 
> No I have not. But I looked at the canvas drawing code carefully and I did not see anything that can be leaked from a previous page. Most likely the leaking in underlaying simulator frameworks.
> 
> I think we should avoid testing the antialiasing in all the hidpi tests. So I think this patch is worthy landing. We can keep the bug open and continue investigating but let's land this patch and see the results. And hopefully this will shorten iOS EWS bots processing time.

I am convinced.
Comment 29 EWS 2020-03-28 21:43:13 PDT
Committed r259174: <https://trac.webkit.org/changeset/259174>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 394820 [details].