Bug 195969 - [ Mac WK2 ] Layout Test js/dom/unhandled-promise-rejection-bindings-type-error.html is a flaky failure
Summary: [ Mac WK2 ] Layout Test js/dom/unhandled-promise-rejection-bindings-type-erro...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Devin Rousso
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2019-03-19 15:50 PDT by Shawn Roberts
Modified: 2019-05-13 15:07 PDT (History)
9 users (show)

See Also:


Attachments
Patch (1.61 KB, patch)
2019-05-13 01:04 PDT, Devin Rousso
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Shawn Roberts 2019-03-19 15:50:56 PDT
The following layout test is failing on Mac WK2

js/dom/unhandled-promise-rejection-bindings-type-error.html

Probable cause:

Just showed up on the dashboard for the first time around r243141. Cannot find a regression point as I got it to fail locally with the oldest builds I could spade of Mojave Release WK2(228049) and Mojave Debug WK2(230024) . 
I could get it to fail consistently once I added -gf to my repro steps, and it would fail usually 2 within 10 tries. I could also get it to fail when running without it, but maybe 1 or 2 times in 10000 iterations. I get the same diff locally as seen on the server error. 

Reproduced with :

run-webkit-tests js/dom/unhandled-promise-rejection-bindings-type-error.html -gf --iterations 2500 --exit-after-n-failures=2 --no-retry
run-webkit-tests js/dom/unhandled-promise-rejection-bindings-type-error.html -gf --iterations 2500 --debug --exit-after-n-failures=2 --no-retry

Flakiness Dashboard:

https://webkit-test-results.webkit.org/dashboards/flakiness_dashboard.html#showAllRuns=true&tests=js%2Fdom%2Funhandled-promise-rejection-bindings-type-error.html

Diff:

--- /Volumes/Data/slave/mojave-debug-tests-wk2/build/layout-test-results/js/dom/unhandled-promise-rejection-bindings-type-error-expected.txt
+++ /Volumes/Data/slave/mojave-debug-tests-wk2/build/layout-test-results/js/dom/unhandled-promise-rejection-bindings-type-error-actual.txt
@@ -1,10 +1,7 @@
-CONSOLE MESSAGE: Unhandled Promise Rejection: TypeError: The PromiseRejectionEvent.promise getter can only be used on instances of PromiseRejectionEvent
 Test rejected promises are returned from bindings and trigger unhandledrejection.
 
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
-PASS error.promise is promise
-PASS error.reason instanceof TypeError is true
 PASS successfullyParsed is true
 
 TEST COMPLETE
Comment 1 Radar WebKit Bug Importer 2019-03-19 15:52:03 PDT
<rdar://problem/49039441>
Comment 2 Joseph Pecoraro 2019-03-19 17:46:14 PDT
It is possible for this to fail if somehow the 100ms timeout fires before promise rejections are handled. Which in practice should never happen...

    --debug will certainly make things slower
    -g is libgmalloc which will make the tests slower still
    -f is fully parallel which shouldn't do much

Perhaps there is something better for the test to use instead of setTimeout.

Maybe queueMicrotask a few times?
Comment 3 Devin Rousso 2019-05-13 01:04:14 PDT
Created attachment 369707 [details]
Patch
Comment 4 WebKit Commit Bot 2019-05-13 15:07:58 PDT
Comment on attachment 369707 [details]
Patch

Clearing flags on attachment: 369707

Committed r245256: <https://trac.webkit.org/changeset/245256>
Comment 5 WebKit Commit Bot 2019-05-13 15:07:59 PDT
All reviewed patches have been landed.  Closing bug.