Bug 48997

Summary: animations/animation-iteration-event-destroy-renderer.html is flaky timeout
Product: WebKit Reporter: Adam Roben (:aroben) <aroben>
Component: New BugsAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: ahmad.saleem792, Hironori.Fujii
Priority: P2 Keywords: InRadar, LayoutTestFailure, PlatformOnly
Version: 528+ (Nightly build)   
Hardware: PC   
OS: OS X 10.5   
URL: http://build.webkit.org/results/Windows%20Release%20(Tests)/r71329%20(6001)/animations/animation-iteration-event-destroy-renderer-pretty-diff.html

Description Adam Roben (:aroben) 2010-11-04 07:46:21 PDT
animations/animation-iteration-event-destroy-renderer.html sometimes times out on Windows. See the URL for an example.

I've added this test to the Skipped file.
Comment 1 Adam Roben (:aroben) 2010-11-04 07:56:10 PDT
<rdar://problem/8630449>
Comment 2 Fujii Hironori 2023-12-06 19:25:30 PST
I observe flaky timeout on our internal Windows port Release buildbot.

https://results.webkit.org/?suite=layout-tests&test=animations%2Fanimation-iteration-event-destroy-renderer.html

Mac WK1 and WK2 Release are also flaky timeout.
Comment 3 Ahmad Saleem 2023-12-07 16:14:30 PST
(In reply to Fujii Hironori from comment #2)
> I observe flaky timeout on our internal Windows port Release buildbot.
> 
> https://results.webkit.org/?suite=layout-tests&test=animations%2Fanimation-
> iteration-event-destroy-renderer.html
> 
> Mac WK1 and WK2 Release are also flaky timeout.

Should we try to import newer 'testharness' based one from Chromium / Blink:

https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/web_tests/animations/stability/animation-iteration-event-destroy-renderer.html;drc=13fe1b8357c3e67f72136207efdafdaf8a103100
Comment 4 Ahmad Saleem 2023-12-07 16:36:05 PST
@Fuji - did this PR, if you think it might resolve it for Windows platform: https://github.com/WebKit/WebKit/pull/21481
Comment 5 Fujii Hironori 2023-12-07 17:31:42 PST
Does this patch solve the timeout problem on your Mac?
I'm still observing the timeout problem with this patch on my Windows PC.

> python .\Tools\Scripts\run-webkit-tests --release --no-retry --iter=60 -f --child=30 animations/animation-iteration-event-destroy-renderer.html
Comment 6 Fujii Hironori 2023-12-07 18:02:56 PST
If I apply the following patch, it becomes not reproducible on my PC.

diff --git a/LayoutTests/animations/animation-iteration-event-destroy-renderer.html b/LayoutTests/animations/animation-iteration-event-destroy-renderer.html
index 9a05f30fa077..6b62cefe94b6 100644
--- a/LayoutTests/animations/animation-iteration-event-destroy-renderer.html
+++ b/LayoutTests/animations/animation-iteration-event-destroy-renderer.html
@@ -7,7 +7,7 @@
       width: 100px;
       margin: 10px;
       background-color: blue;
-      -webkit-animation-duration: 0.2s;
+      -webkit-animation-duration: 2s;
       -webkit-animation-iteration-count: 2;
     }
     
It seems that webkitAnimationIteration event isn't dispatch under very heavy cpu load.
Comment 7 Ahmad Saleem 2023-12-07 19:28:01 PST
(In reply to Fujii Hironori from comment #5)
> Does this patch solve the timeout problem on your Mac?
> I'm still observing the timeout problem with this patch on my Windows PC.
> 
> > python .\Tools\Scripts\run-webkit-tests --release --no-retry --iter=60 -f --child=30 animations/animation-iteration-event-destroy-renderer.html

Isn't 60 iterations quite too many?(In reply to Fujii Hironori from comment #5)
> Does this patch solve the timeout problem on your Mac?
> I'm still observing the timeout problem with this patch on my Windows PC.
> 
> > python .\Tools\Scripts\run-webkit-tests --release --no-retry --iter=60 -f --child=30 animations/animation-iteration-event-destroy-renderer.html

With 60 iterations, I do get this result:

43 tests ran as expected, 17 didn't:


Unexpected flakiness: crashes (1)
  animations/animation-iteration-event-destroy-renderer.html [ Crash Pass ]
Comment 8 Ahmad Saleem 2023-12-07 19:33:10 PST
(In reply to Fujii Hironori from comment #6)
> If I apply the following patch, it becomes not reproducible on my PC.
> 
> diff --git
> a/LayoutTests/animations/animation-iteration-event-destroy-renderer.html
> b/LayoutTests/animations/animation-iteration-event-destroy-renderer.html
> index 9a05f30fa077..6b62cefe94b6 100644
> --- a/LayoutTests/animations/animation-iteration-event-destroy-renderer.html
> +++ b/LayoutTests/animations/animation-iteration-event-destroy-renderer.html
> @@ -7,7 +7,7 @@
>        width: 100px;
>        margin: 10px;
>        background-color: blue;
> -      -webkit-animation-duration: 0.2s;
> +      -webkit-animation-duration: 2s;
>        -webkit-animation-iteration-count: 2;
>      }
>      
> It seems that webkitAnimationIteration event isn't dispatch under very heavy
> cpu load.

This indeed fix the issue on my side as well and I get on my macOS build environment:

> All 60 tests ran as expected.
Comment 9 Ahmad Saleem 2023-12-07 19:33:30 PST
(In reply to Ahmad Saleem from comment #8)
> (In reply to Fujii Hironori from comment #6)
> > If I apply the following patch, it becomes not reproducible on my PC.
> > 
> > diff --git
> > a/LayoutTests/animations/animation-iteration-event-destroy-renderer.html
> > b/LayoutTests/animations/animation-iteration-event-destroy-renderer.html
> > index 9a05f30fa077..6b62cefe94b6 100644
> > --- a/LayoutTests/animations/animation-iteration-event-destroy-renderer.html
> > +++ b/LayoutTests/animations/animation-iteration-event-destroy-renderer.html
> > @@ -7,7 +7,7 @@
> >        width: 100px;
> >        margin: 10px;
> >        background-color: blue;
> > -      -webkit-animation-duration: 0.2s;
> > +      -webkit-animation-duration: 2s;
> >        -webkit-animation-iteration-count: 2;
> >      }
> >      
> > It seems that webkitAnimationIteration event isn't dispatch under very heavy
> > cpu load.
> 
> This indeed fix the issue on my side as well and I get on my macOS build
> environment:
> 
> > All 60 tests ran as expected.

Let me know if I should update my PR and push the updated test.
Comment 10 Fujii Hironori 2023-12-07 19:50:20 PST
(In reply to Ahmad Saleem from comment #7)
>   animations/animation-iteration-event-destroy-renderer.html [ Crash Pass ]

Crash! Is this a known bug? Do you have to report a bug?

(In reply to Ahmad Saleem from comment #9)
> Let me know if I should update my PR and push the updated test.

I don't know. My guess is that webkitAnimationIteration event has a bug.
Comment 11 Ahmad Saleem 2023-12-07 20:04:47 PST
(In reply to Fujii Hironori from comment #10)
> (In reply to Ahmad Saleem from comment #7)
> >   animations/animation-iteration-event-destroy-renderer.html [ Crash Pass ]
> 
> Crash! Is this a known bug? Do you have to report a bug?
> 
> (In reply to Ahmad Saleem from comment #9)
> > Let me know if I should update my PR and push the updated test.
> 
> I don't know. My guess is that webkitAnimationIteration event has a bug.

could be but this test was also flaky in Blink / Chromium and was updated last in 2019 (to fix timeout issue):

https://chromium.googlesource.com/chromium/src.git/+/13fe1b8357c3e67f72136207efdafdaf8a103100
Comment 12 Fujii Hironori 2023-12-07 20:23:53 PST
(In reply to Ahmad Saleem from comment #11)
> could be but this test was also flaky in Blink / Chromium and was updated
> last in 2019 (to fix timeout issue):

Oh, interesting.

  936462 - animation-iteration-event-destroy-renderer.html times out on Asan and Debug - chromium
  https://bugs.chromium.org/p/chromium/issues/detail?id=936462

But, applying the patch to WebKit doesn't solve the timeout problem at least on my PC.
I have to conclude that the change fixed only Chromium specific timeout problem.
WebKit has anather bug we have to debug.
Comment 13 Ahmad Saleem 2023-12-08 06:12:45 PST
@Fuji - I created new bug to import 'testharness' based test and also unprefixed it based on review (it has landed now): https://github.com/WebKit/WebKit/commit/a75d4f229c6f83b09c4dd8ae9f1039bee4c46843

We can use this bug for tracking issue in leading to flakiness / timeouts.