New issue
Advanced search Search tips

Issue 921835 link

Starred by 4 users

Issue metadata

Status: Fixed
Owner:
Closed: Jan 17
Cc:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 1
Type: Bug
Flaky-Test: WorkletAnimationTest.CurrentTimeFromDocumentTimelineIsOffsetByStartTime



Sign in to add a comment

WorkletAnimationTest.CurrentTimeFromDocumentTimelineIsOffsetByStartTime is flaky

Project Member Reported by Findit, Jan 15

Issue description

Labels: Test-Findit-Wrong
The linked CL only changes flag metadata.

Comment 2 by atotic@chromium.org, Jan 16 (6 days ago)

Filed Wrong culprit bug report at https://bugs.chromium.org/p/chromium/issues/detail?id=922416

Comment 5 by majidvp@chromium.org, Jan 16 (6 days ago)

Status: Started (was: Untriaged)
I am now looking into this.

Comment 6 by majidvp@google.com, Jan 16 (6 days ago)

The test is trying to compare two time values and expects a certain amount of error (1us). The patch is changing our internal representation of current time to be a TimeDelta instead of a double but then the time is converted to double before it is sent to the worklet.

So the change can affect our precision since it introduces additional conversions. Ultimately we should avoid converting to double and keep sending the TimeDelta to the worklet [1] but in the meantime we can improve the test.


[1] https://chromium-review.googlesource.com/c/chromium/src/+/1397846/9/third_party/blink/renderer/modules/animationworklet/worklet_animation.cc#576l




Here is an example failure: 

[ RUN      ] WorkletAnimationTest.CurrentTimeFromDocumentTimelineIsOffsetByStartTime
../../third_party/blink/renderer/modules/animationworklet/worklet_animation_test.cc:130: Failure
The difference between 123.4 and input->updated_animations[0].current_time is 0.0010000000000047748, which exceeds error, where
123.4 evaluates to 123.40000000000001,
input->updated_animations[0].current_time evaluates to 123.399, and
error evaluates to 0.001.
Stack trace:
#0 0x56390a8e1772 testing::internal::UnitTestImpl::CurrentOsStackTraceExceptTop()
#1 0x56390a8e13d1 testing::internal::AssertHelper::operator=()
#2 0x56390b793e3a blink::WorkletAnimationTest_CurrentTimeFromDocumentTimelineIsOffsetByStartTime_Test::TestBody()

[  FAILED  ] WorkletAnimationTest.CurrentTimeFromDocumentTimelineIsOffsetByStartTime (12 ms)

Comment 7 by majidvp@google.com, Jan 16 (6 days ago)

Cc: yigu@chromium.org
 Issue 922607  has been merged into this issue.

Comment 8 by majidvp@google.com, Jan 16 (6 days ago)

Cc: flackr@chromium.org loyso@google.com
 Issue 921897  has been merged into this issue.
Project Member

Comment 9 by bugdroid1@chromium.org, Jan 16 (6 days ago)

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

commit 10b5e48292eec73e2c523b6684c2e8677fcf0158
Author: Majid Valipour <majidvp@chromium.org>
Date: Wed Jan 16 23:18:14 2019

Improve WorkletAnimationTest to reduce flakiness

 - Increase expected timing error by a small amount to take into account
   double rounding issues.
 - Use AnimationClock::ResetTimeForTesting to ensure we are not going to
   ever depend on wall clock. This is unrelated to flakiness but just a
   cleanup.

Also I re-enabled incorrectly disabled test (that had the same name). To
avoid future confusion, change the cc side name. [1]

[1] https://bugs.chromium.org/p/chromium/issues/detail?id=921897#c5

TEST: Locally ran the test 500 times successfully (previously failed at least 1 out of 100)
TBR: flackr@chromium.org
Bug:  921835 
Change-Id: I29e03db25122e63660877ee64145252c1d258564
Reviewed-on: https://chromium-review.googlesource.com/c/1416290
Reviewed-by: Majid Valipour <majidvp@chromium.org>
Reviewed-by: Yi Gu <yigu@chromium.org>
Commit-Queue: Majid Valipour <majidvp@chromium.org>
Cr-Commit-Position: refs/heads/master@{#623435}
[modify] https://crrev.com/10b5e48292eec73e2c523b6684c2e8677fcf0158/cc/animation/worklet_animation_unittest.cc
[modify] https://crrev.com/10b5e48292eec73e2c523b6684c2e8677fcf0158/third_party/blink/renderer/modules/animationworklet/worklet_animation_test.cc

Comment 11 by majidvp@chromium.org, Jan 17 (5 days ago)

Looking at the flakes referred to in #10 they are from builds that don't include the patch.

So far looking at the dashboard it seems that the fix is effective but it will be a while before we know for sure: 
https://test-results.appspot.com/dashboards/flakiness_dashboard.html#testType=webkit_unit_tests&tests=WorkletAnimationTest.CurrentTimeFromDocumentTimelineIsOffsetByStartTime

Comment 12 by iclell...@chromium.org, Jan 17 (5 days ago)

Labels: -Sheriff-Chromium
Thanks, Majid -- going to remove from the sheriff queue then. If it flakes again, sheriffs should see this come back up.

Comment 13 by majidvp@chromium.org, Jan 17 (5 days ago)

Status: Fixed (was: Started)

Sign in to add a comment