Bug 188357

Summary: REGRESSION (r234330): 3 legacy-animation-engine/compositing tests are flaky failures
Product: WebKit Reporter: Ryan Haddad <ryanhaddad>
Component: New BugsAssignee: Simon Fraser (smfr) <simon.fraser>
Status: RESOLVED FIXED    
Severity: Normal CC: ap, commit-queue, dino, realdawei, simon.fraser, tsavell, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: Other   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=187866
Attachments:
Description Flags
Repro Test List
none
Patch none

Description Ryan Haddad 2018-08-06 13:58:06 PDT
From https://bugs.webkit.org/show_bug.cgi?id=187866

Truitt Savell 2018-07-30 10:27:14 PDT
It looks like there are three tests on High Sierra WK1 that are continuing to fail consistently after https://trac.webkit.org/changeset/234330/webkit. The tests are flakey on other WK1 release platforms.

Tests:
legacy-animation-engine/compositing/backing/transform-transition-from-outside-view.html 
legacy-animation-engine/compositing/geometry/limit-layer-bounds-opacity-transition.html 
legacy-animation-engine/compositing/layer-creation/animation-overlap-with-children.html

Test History
https://webkit-test-results.webkit.org/dashboards/flakiness_dashboard.html#showAllRuns=true&tests=legacy-animation-engine%2Fcompositing%2Fbacking%2Ftransform-transition-from-outside-view.html%20legacy-animation-engine%2Fcompositing%2Fgeometry%2Flimit-layer-bounds-opacity-transition.html%20legacy-animation-engine%2Fcompositing%2Flayer-creation%2Fanimation-overlap-with-children.html

Text Diffs:
https://build.webkit.org/results/Apple%20High%20Sierra%20Release%20WK1%20(Tests)/r234363%20(7001)/legacy-animation-engine/compositing/backing/transform-transition-from-outside-view-diff.txt

https://build.webkit.org/results/Apple%20High%20Sierra%20Release%20WK1%20(Tests)/r234363%20(7001)/legacy-animation-engine/compositing/geometry/limit-layer-bounds-opacity-transition-diff.txt

https://build.webkit.org/results/Apple%20High%20Sierra%20Release%20WK1%20(Tests)/r234363%20(7001)/legacy-animation-engine/compositing/layer-creation/animation-overlap-with-children-diff.txt
Comment 1 Simon Fraser (smfr) 2018-08-06 14:02:47 PDT
I reproduces two flakes and am fixing in bug 188356, but I could not reproduce all of these.
Comment 2 Radar WebKit Bug Importer 2018-08-06 16:42:06 PDT
<rdar://problem/42986633>
Comment 3 Simon Fraser (smfr) 2018-08-06 17:17:13 PDT
I can only reproduce flakiness with:
legacy-animation-engine/animations/needs-layout.html failed unexpectedly (reference mismatch)                 
legacy-animation-engine/animations/trigger-container-scroll-empty.html failed unexpectedly (text diff)
Comment 4 Truitt Savell 2018-08-07 11:15:06 PDT
Created attachment 346717 [details]
Repro Test List

Here is a reliable repro of the Three tests that are failing. A state is being set and this list order reliably reproduces the failure. I ran this list of tests using:

run-webkit-tests --test-list DIRECTORY_OF_TEST_LIST_FILE --child-processes 1 -1

I am going to try and bisect the list and see if I can get a better idea of what's causing this.
Comment 5 Truitt Savell 2018-08-07 11:42:46 PDT
These tests are causing the failures:

js/slow-stress/Int32Array-alloc-large-long-lived.html
js/slow-stress/Int32Array-alloc-huge.html
js/slow-stress/Int32Array-alloc-huge-long-lived.html
 
legacy-animation-engine/compositing/backing/transform-transition-from-outside-view.html
legacy-animation-engine/compositing/geometry/limit-layer-bounds-opacity-transition.html
legacy-animation-engine/compositing/layer-creation/animation-overlap-with-children.html

Running these tests together causes the legacy-animation tests to fail. The js/ tests can be ran in any order but all three of them together cause the state that is making the three legacy tests fail.
Comment 6 Simon Fraser (smfr) 2018-08-07 11:46:22 PDT
It looks like the legacy-animation-engine/compositing test are responding to memory pressure, but DRT is supposed to override the compositing policy option. That must be broken somehow.
Comment 7 Simon Fraser (smfr) 2018-08-08 17:34:51 PDT
The bug here is that the Internals code to reset state between tests clears the compositing policy override, allowing a test to fall into low memory mode. In WTR, we explicitly set the override to "Normal", but there is no such code in DRT.
Comment 8 Truitt Savell 2018-08-09 16:31:32 PDT
Marking these three tests flakey in https://trac.webkit.org/changeset/234742/webkit

doing this to clear noise on the tree while a solution is found.
Comment 9 Simon Fraser (smfr) 2019-04-25 16:20:20 PDT
Created attachment 368284 [details]
Patch
Comment 10 WebKit Commit Bot 2019-04-25 19:55:43 PDT
Comment on attachment 368284 [details]
Patch

Clearing flags on attachment: 368284

Committed r244675: <https://trac.webkit.org/changeset/244675>
Comment 11 WebKit Commit Bot 2019-04-25 19:55:44 PDT
All reviewed patches have been landed.  Closing bug.
Comment 12 Alexey Proskuryakov 2019-05-11 15:59:16 PDT
*** Bug 188421 has been marked as a duplicate of this bug. ***
Comment 13 Alexey Proskuryakov 2019-05-11 16:03:15 PDT
*** Bug 188910 has been marked as a duplicate of this bug. ***
Comment 14 Alexey Proskuryakov 2019-05-11 16:14:58 PDT
This patch fixed two of these tests, and it also fixed other tests that I just duped here.

legacy-animation-engine/compositing/backing/transform-transition-from-outside-view.html remains super flaky. Turns out that we already have a separate bug for it, bug 184611, but failures are not as before.

Updated test results in http://trac.webkit.org/r245211