Bug 207515

Summary: [ Mac wk2 ] http/wpt/service-workers/service-worker-spinning-fetch.https.html is flaky failing.
Product: WebKit Reporter: Jason Lawrence <Lawrence.j>
Component: Service WorkersAssignee: youenn fablet <youennf>
Status: RESOLVED FIXED    
Severity: Normal CC: achristensen, cdumez, ggaren, webkit-bot-watchers-bugzilla, webkit-bug-importer, youennf
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Mac   
OS: Unspecified   
Attachments:
Description Flags
Patch none

Description Jason Lawrence 2020-02-10 15:49:59 PST
http/wpt/service-workers/service-worker-spinning-fetch.https.html

Description:
This test is flaky failing on Mac wk2. It is flaky failing in all visible history.

History:
https://results.webkit.org/?limit=50000&platform=ios&suite=layout-tests&test=http%2Fwpt%2Fservice-workers%2Fservice-worker-spinning-fetch.https.html


Diff:
--- /Volumes/Data/slave/ios-simulator-13-release-tests-wk2/build/layout-test-results/http/wpt/service-workers/service-worker-spinning-fetch.https-expected.txt
+++ /Volumes/Data/slave/ios-simulator-13-release-tests-wk2/build/layout-test-results/http/wpt/service-workers/service-worker-spinning-fetch.https-actual.txt
@@ -1,5 +1,5 @@
 
 
 PASS Spin in fetch 
-PASS Spin after fetch 
+FAIL Spin after fetch promise_test: Unhandled rejection with value: "service worker is still running"
Comment 1 Radar WebKit Bug Importer 2020-02-10 15:50:30 PST
<rdar://problem/59329307>
Comment 2 Jason Lawrence 2020-02-10 15:59:42 PST
I have marked this test as failing while this issue is investigated.
https://trac.webkit.org/changeset/256226/webkit
Comment 3 Alexey Proskuryakov 2020-02-11 14:21:16 PST
The test was added a month ago in r254341.

It is also asserting:

ASSERTION FAILED: m_messageEventCount
./workers/service/context/ServiceWorkerThread.cpp(296) : void WebCore::ServiceWorkerThread::finishedFiringMessageEvent()
1   0x1b7a572b9 WTFCrash
2   0x19c106c2b WTFCrashWithInfo(int, char const*, char const*, int)
3   0x1a08e3a6c WebCore::ServiceWorkerThread::finishedFiringMessageEvent()
4   0x1a0915230 WebCore::ServiceWorkerThread::queueTaskToPostMessage(WebCore::MessageWithMessagePorts&&, WTF::Variant<WebCore::ServiceWorkerData, WebCore::ServiceWorkerClientData>&&)::$_22::operator()()::'lambda'()::operator()() const
5   0x1a09151b9 WTF::Detail::CallableWrapper<WebCore::ServiceWorkerThread::queueTaskToPostMessage(WebCore::MessageWithMessagePorts&&, WTF::Variant<WebCore::ServiceWorkerData, WebCore::ServiceWorkerClientData>&&)::$_22::operator()()::'lambda'(), void>::call()
6   0x1b7a818ea WTF::Function<void ()>::operator()() const
7   0x1b7ac064b WTF::dispatchFunctionsFromMainThread()
8   0x1b7ac37e5 -[JSWTFMainThreadCaller call]
Comment 4 Jason Lawrence 2020-02-11 15:01:22 PST
I called this test Mac wk2, it is flaky failing on iOS.
I have marked it appropriately here: https://trac.webkit.org/changeset/256379/webkit
Comment 5 Jason Lawrence 2020-02-12 12:05:45 PST
I am able to reproduce this issue using r256431 using the command below.
run-webkit-tests http/wpt/service-workers/service-worker-spinning-fetch.https.html --iterations 5000 --exit-after-n-failures 5 -f --force --ios-simulator --debug

[747/5000] http/wpt/service-workers/service-worker-spinning-fetch.https.html failed unexpectedly (ServiceWorkerProcess crashed [pid=51990])
[804/5000] http/wpt/service-workers/service-worker-spinning-fetch.https.html failed unexpectedly (ServiceWorkerProcess crashed [pid=60097])
Comment 6 youenn fablet 2020-05-15 05:45:10 PDT
This bug is titled for iOS but the expectation and description is about Mac-wk2.
Let's keep this one for Mac-wk2 and I'll create a new one for iOS.
Comment 7 youenn fablet 2020-05-15 05:46:40 PDT
Filed https://bugs.webkit.org/show_bug.cgi?id=211951 for iOS.
Comment 8 youenn fablet 2020-05-15 06:00:35 PDT
Created attachment 399473 [details]
Patch
Comment 9 youenn fablet 2020-05-18 08:40:07 PDT
ping review
Comment 10 EWS 2020-06-02 04:23:51 PDT
Committed r262409: <https://trac.webkit.org/changeset/262409>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 399473 [details].