Bug 182007 - REGRESSION (r227340): Layout Test fast/workers/worker-cloneport.html is a flaky failure
Summary: REGRESSION (r227340): Layout Test fast/workers/worker-cloneport.html is a fla...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chris Dumez
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2018-01-23 13:03 PST by Ryan Haddad
Modified: 2019-12-18 12:11 PST (History)
9 users (show)

See Also:


Attachments
Patch (2.21 KB, patch)
2018-01-31 14:48 PST, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (2.23 KB, patch)
2018-01-31 14:56 PST, Chris Dumez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ryan Haddad 2018-01-23 13:03:57 PST
The following layout test is flaky on macOS Release WK2

fast/workers/worker-cloneport.html

Probable cause:

Unknown.

Flakiness Dashboard:

https://webkit-test-results.webkit.org/dashboards/flakiness_dashboard.html#showAllRuns=true&tests=fast%2Fworkers%2Fworker-cloneport.html

--- /Volumes/Data/slave/highsierra-release-tests-wk2/build/layout-test-results/fast/workers/worker-cloneport-expected.txt
+++ /Volumes/Data/slave/highsierra-release-tests-wk2/build/layout-test-results/fast/workers/worker-cloneport-actual.txt
@@ -1,6 +1,7 @@
 Test MessagePort messaging/entangle/detangle across threads. Should print "SUCCESS" when done.
 
 PASS: Received request for 50000 messages
+FAILURE: Received: 0 events - expected: 50000
 SUCCESS - received 50000 messages.
 DONE
Comment 1 Ryan Haddad 2018-01-29 15:49:51 PST
This regressed with https://trac.webkit.org/changeset/227340/webkit

I can reproduce the failure with a build of r227340 using the following:

run-webkit-tests fast/workers/worker-cloneport.html -fg --iter 25 --no-retry-failure

I cannot reproduce with r227339.
Comment 2 Radar WebKit Bug Importer 2018-01-29 15:51:04 PST
<rdar://problem/37005504>
Comment 3 Brady Eidson 2018-01-29 19:27:37 PST
(In reply to Ryan Haddad from comment #0)
> The following layout test is flaky on macOS Release WK2
> 
> fast/workers/worker-cloneport.html
> 
> Probable cause:
> 
> Unknown.

How sure are we there's no crashes?
Comment 4 Chris Dumez 2018-01-29 19:29:02 PST
(In reply to Brady Eidson from comment #3)
> (In reply to Ryan Haddad from comment #0)
> > The following layout test is flaky on macOS Release WK2
> > 
> > fast/workers/worker-cloneport.html
> > 
> > Probable cause:
> > 
> > Unknown.
> 
> How sure are we there's no crashes?

https://build.webkit.org/results/Apple%20High%20Sierra%20Release%20WK2%20(Tests)/r227764%20(2595)/results.html shows no crash
Comment 5 Matt Lewis 2018-01-30 16:46:30 PST
marked as flaky on macOS release:
https://trac.webkit.org/changeset/227865/webkit
Comment 6 Chris Dumez 2018-01-31 14:37:46 PST
I can easily reproduce the issue with the command provided by Ryan.
Comment 7 Chris Dumez 2018-01-31 14:45:26 PST
 PASS: Received request for 50000 messages
+FAILURE: Received: 0 events - expected: 50000 // Evidence a timeout timer has fired too early
 SUCCESS - received 50000 messages. // Evidence the test is succeeding.
 DONE

The code looks like:
        // Queue up a task to execute once the messages have been processed. The timeout value is set fairly large to account for Chromium's different message delivery architecture.
        // This only fires in the case of a test failure, so it does not slow down test running.
        var timer = setTimeout(function() {
            log("FAILURE: Received: " + itemNum + " events - expected: " + numMessages);
        }, 1000);

So if we've not received all the messages within one second, that line will be printed out. This is clearly an issue with the test.
Comment 8 Chris Dumez 2018-01-31 14:48:59 PST
Created attachment 332803 [details]
Patch
Comment 9 Ryosuke Niwa 2018-01-31 14:52:52 PST
Comment on attachment 332803 [details]
Patch

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

> LayoutTests/fast/workers/worker-cloneport.html:60
> -        }, 1000);
> +        }, 20000);

20s? That's more than DRTs timeout. How about 8s?
Comment 10 Chris Dumez 2018-01-31 14:56:27 PST
Created attachment 332805 [details]
Patch
Comment 11 Chris Dumez 2018-01-31 14:57:01 PST
(In reply to Ryosuke Niwa from comment #9)
> Comment on attachment 332803 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=332803&action=review
> 
> > LayoutTests/fast/workers/worker-cloneport.html:60
> > -        }, 1000);
> > +        }, 20000);
> 
> 20s? That's more than DRTs timeout. How about 8s?

Deal.
Comment 12 WebKit Commit Bot 2018-01-31 15:22:36 PST
Comment on attachment 332805 [details]
Patch

Clearing flags on attachment: 332805

Committed r227935: <https://trac.webkit.org/changeset/227935>
Comment 13 WebKit Commit Bot 2018-01-31 15:22:38 PST
All reviewed patches have been landed.  Closing bug.