Bug 238965

Summary: [ iOS EWS ] css3/background/background-repeat-round-auto2.html is a image failure
Product: WebKit Reporter: Dawn Morningstar <Morningstar>
Component: Tools / TestsAssignee: Simon Fraser (smfr) <simon.fraser>
Status: RESOLVED FIXED    
Severity: Normal CC: ap, bfulgham, ews-watchlist, glenn, jbedard, simon.fraser, thorton, webkit-bot-watchers-bugzilla, webkit-bug-importer, zalan
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=238781
https://bugs.webkit.org/show_bug.cgi?id=240037
Attachments:
Description Flags
BUG238965 DIFFS
none
retry diff
none
first try diff
none
ImageDiff tolerance patch
none
Patch
thorton: review+
Patch ews-feeder: commit-queue-

Description Dawn Morningstar 2022-04-07 15:29:29 PDT
css3/background/background-repeat-round-auto2.html
is an image failure on iOS EWS queue. 

This does not appear on the results database:
HISTORY:
https://results.webkit.org/?suite=layout-tests&test=css3%2Fbackground%2Fbackground-repeat-round-auto2.html

DIFF IMAGES WILL BE ATTACHED.

DIFF-URL:
https://ews-build.s3-us-west-2.amazonaws.com/iOS-15-Simulator-WK2-Tests-EWS/456887-12620/css3/background/background-repeat-round-auto2-diffs.html
Comment 1 Radar WebKit Bug Importer 2022-04-07 17:11:00 PDT
<rdar://problem/91454381>
Comment 2 Dawn Morningstar 2022-04-07 17:13:02 PDT
Created attachment 456995 [details]
BUG238965 DIFFS
Comment 3 Alexey Proskuryakov 2022-04-08 16:16:46 PDT
Antialiasing around edges. Probably a preceding test leaving something graphics related in a bad state. Finding a repro case would help see if it's something we can fix.
Comment 4 Dawn Morningstar 2022-04-08 17:53:50 PDT
(In reply to Alexey Proskuryakov from comment #3)
> Antialiasing around edges. Probably a preceding test leaving something
> graphics related in a bad state. Finding a repro case would help see if it's
> something we can fix.

I knew it! - You had commented on a previous bug I had made and said it was antialiasing and this appeared to be very similar to that... I'll bisect a test list for this and attempt to reproduce the failure and detect the preceding test.
Comment 5 Alexey Proskuryakov 2022-04-13 11:28:28 PDT
> https://ews-build.s3-us-west-2.amazonaws.com/iOS-15-Simulator-WK2-Tests-EWS/456887-12620/css3/background/background-repeat-round-auto2-diffs.html

Build link for this: 

https://ews-build.webkit.org/#/builders/68/builds/12620

What's interesting is that this is EWS, so failing a test means that it fails as part of the main test suite first, but also fails on retry with --singly, so it's actually not about any preceding tests in the process.

In this run, it failed like this first:

11:31:31.809 80268 [1361/53799] css3/background/background-repeat-round-auto2.html failed unexpectedly (reference mismatch maxDifference=1; totalPixels=360)
11:31:31.810 80268 worker/4 css3/background/background-repeat-round-auto2.html failed:
11:31:31.810 80268 worker/4 reference mismatch maxDifference=1; totalPixels=360

And then:

12:30:58.239 80268 [2/14] css3/background/background-repeat-round-auto2.html failed unexpectedly (reference mismatch maxDifference=1; totalPixels=94)
12:30:58.239 80268 css3/background/background-repeat-round-auto2.html failed:
12:30:58.239 80268 reference mismatch maxDifference=1; totalPixels=94
12:30:58.240 80268 finished test group

Only some of the circles had antialiasing diffs on retry!
Comment 6 Alexey Proskuryakov 2022-04-13 11:28:58 PDT
Created attachment 457549 [details]
retry diff
Comment 7 Alexey Proskuryakov 2022-04-13 11:29:30 PDT
Created attachment 457550 [details]
first try diff
Comment 8 Dawn Morningstar 2022-04-22 13:09:30 PDT
css3/background/background-repeat-round-auto1.html 
Seems to also be an Antialiasing issue, Duping that bug onto this one.
https://bugs.webkit.org/show_bug.cgi?id=238781
Comment 9 Dawn Morningstar 2022-04-22 13:09:48 PDT
*** Bug 238781 has been marked as a duplicate of this bug. ***
Comment 10 Simon Fraser (smfr) 2022-04-22 13:53:01 PDT
The various diffs show that that antialiasing differences can be limited to just some CALayers (page tiles).
Comment 11 Simon Fraser (smfr) 2022-04-22 14:40:18 PDT
I think we need to bring back the built-in tolerance of 1 per color component.
Comment 12 Simon Fraser (smfr) 2022-04-22 14:56:20 PDT
This is cause by using different GPU shaders on different layers.

These shaders are not expected to be exact, and results can differ by 1 per component.

ImageDiff does have built-in tolerance (we don't use --exact), but here three color components are different by 1/255:

difference: exact 0 legacyDistance 0.00656 threshold 0.00392 over 1
133 132  133 132  133 132  255 255
Comment 13 Simon Fraser (smfr) 2022-04-22 15:29:42 PDT
Created attachment 458178 [details]
ImageDiff tolerance patch
Comment 14 Simon Fraser (smfr) 2022-04-25 12:02:17 PDT
Created attachment 458291 [details]
Patch
Comment 15 Simon Fraser (smfr) 2022-04-25 20:19:02 PDT
Created attachment 458323 [details]
Patch
Comment 16 EWS 2022-04-26 14:18:29 PDT
Tools/Scripts/svn-apply failed to apply attachment 458323 [details] to trunk.
Please resolve the conflicts and upload a new patch.
Comment 17 Simon Fraser (smfr) 2022-04-26 14:22:54 PDT
https://trac.webkit.org/r293447