Bug 203734 - Flaky API Test TestWebKitAPI.ServiceWorkers.ThrottleCrash
Summary: Flaky API Test TestWebKitAPI.ServiceWorkers.ThrottleCrash
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: Other
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Alex Christensen
URL:
Keywords: InRadar
: 203732 (view as bug list)
Depends on:
Blocks:
 
Reported: 2019-11-01 06:17 PDT by Aakash Jain
Modified: 2019-11-14 18:57 PST (History)
9 users (show)

See Also:


Attachments
Patch (20.35 KB, patch)
2019-11-13 15:47 PST, Alex Christensen
no flags Details | Formatted Diff | Diff
Patch (20.56 KB, patch)
2019-11-13 15:53 PST, Alex Christensen
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Aakash Jain 2019-11-01 06:17:40 PDT
TestWebKitAPI.ServiceWorkers.ThrottleCrash seems flaky on iOS. In https://ews-build.webkit.org/#/builders/9/builds/11291, the test TimedOut in run-api-tests step. However, in the immediately next retry step (re-run-api-tests), it failed. Similar thing happened in https://ews-build.webkit.org/#/builders/9/builds/11264

Also, in following builds, the test was so flaky that EWS incorrectly blamed the patch being tested:
https://ews-build.webkit.org/#/builders/9/builds/11276
https://ews-build.webkit.org/#/builders/9/builds/11269
Comment 1 Radar WebKit Bug Importer 2019-11-01 06:20:29 PDT
<rdar://problem/56814638>
Comment 3 Jonathan Bedard 2019-11-01 09:35:50 PDT
Not convinced this one is flakey, I think someone introduced a regression to the test relatively recently: <https://results.webkit.org/?suite=api-tests&suite=api-tests&test=TestWebKitAPI.EditorStateTests.TypingAttributesTextAlignmentStartEnd&test=TestWebKitAPI.ServiceWorkers.ThrottleCrash&before_id=251111>

My bet is that this is the timeout on our Debug Mac queues. The only question I have left is if this regression is the same crash that we see on iOS, and was recently fixed.
Comment 4 Aakash Jain 2019-11-13 06:17:50 PST
It was added 6 months ago in https://trac.webkit.org/changeset/245327/webkit
Comment 5 Aakash Jain 2019-11-13 06:21:44 PST
It has been too flaky recently on EWS (on Mojave, but works fine on Catalina). Sometimes so flaky that EWS incorrectly blames the patch being tested for this test failure.

e.g.: 
https://ews-build.webkit.org/#/builders/9/builds/11910
https://ews-build.webkit.org/#/builders/9/builds/11900
https://ews-build.webkit.org/#/builders/9/builds/11865
https://ews-build.webkit.org/#/builders/9/builds/11825
https://ews-build.webkit.org/#/builders/9/builds/11821
https://ews-build.webkit.org/#/builders/9/builds/11814
https://ews-build.webkit.org/#/builders/9/builds/11813
https://ews-build.webkit.org/#/builders/9/builds/11808
https://ews-build.webkit.org/#/builders/9/builds/11807
https://ews-build.webkit.org/#/builders/9/builds/11805
https://ews-build.webkit.org/#/builders/9/builds/11798
https://ews-build.webkit.org/#/builders/9/builds/11789
https://ews-build.webkit.org/#/builders/9/builds/11768
https://ews-build.webkit.org/#/builders/9/builds/11761
https://ews-build.webkit.org/#/builders/9/builds/11760
https://ews-build.webkit.org/#/builders/9/builds/11757
https://ews-build.webkit.org/#/builders/9/builds/11755
https://ews-build.webkit.org/#/builders/9/builds/11745
https://ews-build.webkit.org/#/builders/9/builds/11734
https://ews-build.webkit.org/#/builders/9/builds/11731
https://ews-build.webkit.org/#/builders/9/builds/11726
https://ews-build.webkit.org/#/builders/9/builds/11725
https://ews-build.webkit.org/#/builders/9/builds/11711
https://ews-build.webkit.org/#/builders/9/builds/11710
https://ews-build.webkit.org/#/builders/9/builds/11704
https://ews-build.webkit.org/#/builders/9/builds/11702
https://ews-build.webkit.org/#/builders/9/builds/11700
https://ews-build.webkit.org/#/builders/9/builds/11699
https://ews-build.webkit.org/#/builders/9/builds/11698
https://ews-build.webkit.org/#/builders/9/builds/11682
Comment 6 Aakash Jain 2019-11-13 06:28:32 PST
Committed r252405: <https://trac.webkit.org/changeset/252405>
Comment 7 Aakash Jain 2019-11-13 06:28:59 PST
Disabled the test for now to keep infrastructure happy.
Comment 8 Jonathan Bedard 2019-11-13 07:21:12 PST
This test has flaked maybe once in post-commit testing https://results.webkit.org/?suite=api-tests&test=TestWebKitAPI.ServiceWorkers.ThrottleCrash.

This seems like something worth fixing in the test.
Comment 9 Alex Christensen 2019-11-13 15:47:22 PST
Created attachment 383503 [details]
Patch
Comment 10 Alex Christensen 2019-11-13 15:51:55 PST
*** Bug 203732 has been marked as a duplicate of this bug. ***
Comment 11 Alex Christensen 2019-11-13 15:53:29 PST
Created attachment 383505 [details]
Patch
Comment 12 youenn fablet 2019-11-14 15:49:19 PST
Comment on attachment 383505 [details]
Patch

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

> Tools/TestWebKitAPI/Tests/WebKitCocoa/WebsiteDataStoreCustomPaths.mm:581
> +        { "/test.mp4", { "test!", {{ "Content-Type", "video/test" }}}},

Looks nice and easy to understand!

> Tools/TestWebKitAPI/cocoa/HTTPServer.h:41
> +    HTTPServer(std::initializer_list<std::pair<String, HTTPResponse>>);

explicit and &&

> Tools/TestWebKitAPI/cocoa/HTTPServer.h:53
> +    HTTPResponse(String&& body)

explicit.

> Tools/TestWebKitAPI/cocoa/HTTPServer.h:63
> +    HTTPResponse& operator=(HTTPResponse&&) = default;

Why do we need all of these?
Comment 13 Alex Christensen 2019-11-14 17:13:33 PST
(In reply to youenn fablet from comment #12)
> Comment on attachment 383505 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=383505&action=review
> 
> > Tools/TestWebKitAPI/Tests/WebKitCocoa/WebsiteDataStoreCustomPaths.mm:581
> > +        { "/test.mp4", { "test!", {{ "Content-Type", "video/test" }}}},
> 
> Looks nice and easy to understand!

Thanks!  I think this will be a great improvement to our testing.

> > Tools/TestWebKitAPI/cocoa/HTTPServer.h:41
> > +    HTTPServer(std::initializer_list<std::pair<String, HTTPResponse>>);
> 
> explicit and &&
Unfortunately C++ std::initializer_list cannot be moved from, and there is an indication that this will not change because of ABI compatibility concerns.

> > Tools/TestWebKitAPI/cocoa/HTTPServer.h:53
> > +    HTTPResponse(String&& body)
> 
> explicit.
> 
> > Tools/TestWebKitAPI/cocoa/HTTPServer.h:63
> > +    HTTPResponse& operator=(HTTPResponse&&) = default;
> 
> Why do we need all of these?

The lack of explicit and these constructors are necessary to make it so we can just use { "string" } syntax to construct a response without requiring additional names or unneeded {} for the empty HashSet.
Comment 14 WebKit Commit Bot 2019-11-14 18:57:33 PST
Comment on attachment 383505 [details]
Patch

Clearing flags on attachment: 383505

Committed r252476: <https://trac.webkit.org/changeset/252476>
Comment 15 WebKit Commit Bot 2019-11-14 18:57:34 PST
All reviewed patches have been landed.  Closing bug.