Bug 258502 - REGRESSION (264242@main): http/tests/workers/service/postmessage-after-terminating-hung-worker.html is frequently hitting ASSERTION FAILED: state == ServiceWorkerState::Activating
Summary: REGRESSION (264242@main): http/tests/workers/service/postmessage-after-termin...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: youenn fablet
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2023-06-25 14:50 PDT by Fujii Hironori
Modified: 2023-06-27 09:58 PDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Fujii Hironori 2023-06-25 14:50:29 PDT
http/tests/workers/service/postmessage-after-terminating-hung-worker.html is randomly crashing recently

https://results.webkit.org/?suite=layout-tests&test=http%2Ftests%2Fworkers%2Fservice%2Fpostmessage-after-terminating-hung-worker.html

This seems to be the first crash test run.

Buildbot: builder Apple-iOS-16-Simulator-Debug-WK2-Tests build 1207 (264242@main)
https://build.webkit.org/#/builders/663/builds/1207

No crash log found for com.apple.WebKit.Networking.Development:47779.

stdout:

stderr:
ASSERTION FAILED: state == ServiceWorkerState::Activating
/Volumes/Data/worker/Apple-iOS-16-Simulator-Debug-Build/build/Source/WebCore/workers/service/server/SWServerWorker.cpp(216) : void WebCore::SWServerWorker::didFinishActivation()
1   0x10e9e9df8 WTFCrash
2   0x14a647260 WebCore::AudioWorkletProcessor::buildJSArguments(JSC::VM&, JSC::JSGlobalObject&, JSC::MarkedVector<JSC::JSValue, 8ul, WTF::RecordOverflow>&, WTF::Vector<WTF::RefPtr<WebCore::AudioBus, WTF::RawPtrTraits<WebCore::AudioBus>, WTF::DefaultRefDerefTraits<WebCore::AudioBus>>, 0ul, WTF::CrashOnOverflow, 16ul, WTF::FastMalloc> const&, WTF::Vector<WTF::Ref<WebCore::AudioBus, WTF::RawPtrTraits<WebCore::AudioBus>>, 0ul, WTF::CrashOnOverflow, 16ul, WTF::FastMalloc>&, WTF::HashMap<WTF::String, std::__1::unique_ptr<WebCore::AudioArray<float>, std::__1::default_delete<WebCore::AudioArray<float>>>, WTF::DefaultHash<WTF::String>, WTF::HashTraits<WTF::String>, WTF::HashTraits<std::__1::unique_ptr<WebCore::AudioArray<float>, std::__1::default_delete<WebCore::AudioArray<float>>>>, WTF::MemoryCompactLookupOnlyRobinHoodHashTableTraits> const&)
3   0x14d4af31c WebCore::SWServerWorker::didFinishActivation()
4   0x14d4af210 WebCore::SWServerToContextConnection::didFinishActivation(WTF::ObjectIdentifierGeneric<WebCore::ServiceWorkerIdentifierType, WTF::ObjectIdentifierThreadSafeAccessTraits>)
5   0x135b100ac auto void IPC::callMemberFunction<WebKit::WebSWServerToContextConnection, WebCore::SWServerToContextConnection, void (WTF::ObjectIdentifierGeneric<WebCore::ServiceWorkerIdentifierType, WTF::ObjectIdentifierThreadSafeAccessTraits>), std::__1::tuple<WTF::ObjectIdentifierGeneric<WebCore::ServiceWorkerIdentifierType, WTF::ObjectIdentifierThreadSafeAccessTraits>>>(WebKit::WebSWServerToContextConnection*, void (WebCore::SWServerToContextConnection::*)(WTF::ObjectIdentifierGeneric<WebCore::ServiceWorkerIdentifierType, WTF::ObjectIdentifierThreadSafeAccessTraits>), std::__1::tuple<WTF::ObjectIdentifierGeneric<WebCore::ServiceWorkerIdentifierType, WTF::ObjectIdentifierThreadSafeAccessTraits>>&&)::'lambda'(auto&&...)::operator()<WTF::ObjectIdentifierGeneric<WebCore::ServiceWorkerIdentifierType, WTF::ObjectIdentifierThreadSafeAccessTraits>>(auto&&...) const
6   0x135b10014 decltype(std::declval<WebKit::WebSWServerToContextConnection>()(std::declval<WTF::ObjectIdentifierGeneric<WebCore::ServiceWorkerIdentifierType, WTF::ObjectIdentifierThreadSafeAccessTraits>>())) std::__1::__invoke[abi:v15006]<void IPC::callMemberFunction<WebKit::WebSWServerToContextConnection, WebCore::SWServerToContextConnection, void (WTF::ObjectIdentifierGeneric<WebCore::ServiceWorkerIdentifierType, WTF::ObjectIdentifierThreadSafeAccessTraits>), std::__1::tuple<WTF::ObjectIdentifierGeneric<WebCore::ServiceWorkerIdentifierType, WTF::ObjectIdentifierThreadSafeAccessTraits>>>(WebKit::WebSWServerToContextConnection*, void (WebCore::SWServerToContextConnection::*)(WTF::ObjectIdentifierGeneric<WebCore::ServiceWorkerIdentifierType, WTF::ObjectIdentifierThreadSafeAccessTraits>), std::__1::tuple<WTF::ObjectIdentifierGeneric<WebCore::ServiceWorkerIdentifierType, WTF::ObjectIdentifierThreadSafeAccessTraits>>&&)::'lambda'(auto&&...), WTF::ObjectIdentifierGeneric<WebCore::ServiceWorkerIdentifierType, WTF::ObjectIdentifierThreadSafeAccessTraits>>(WebKit::WebSWServerToContextConnection&&, WTF::ObjectIdentifierGeneric<WebCore::ServiceWorkerIdentifierType, WTF::ObjectIdentifierThreadSafeAccessTraits>&&)
7   0x135b0ffe8 decltype(auto) std::__1::__apply_tuple_impl[abi:v15006]<void IPC::callMemberFunction<WebKit::WebSWServerToContextConnection, WebCore::SWServerToContextConnection, void (WTF::ObjectIdentifierGeneric<WebCore::ServiceWorkerIdentifierType, WTF::ObjectIdentifierThreadSafeAccessTraits>), std::__1::tuple<WTF::ObjectIdentifierGeneric<WebCore::ServiceWorkerIdentifierType, WTF::ObjectIdentifierThreadSafeAccessTraits>>>(WebKit::WebSWServerToContextConnection*, void (WebCore::SWServerToContextConnection::*)(WTF::ObjectIdentifierGeneric<WebCore::ServiceWorkerIdentifierType, WTF::ObjectIdentifierThreadSafeAccessTraits>), std::__1::tuple<WTF::ObjectIdentifierGeneric<WebCore::ServiceWorkerIdentifierType, WTF::ObjectIdentifierThreadSafeAccessTraits>>&&)::'lambda'(auto&&...), std::__1::tuple<WTF::ObjectIdentifierGeneric<WebCore::ServiceWorkerIdentifierType, WTF::ObjectIdentifierThreadSafeAccessTraits>>, 0ul>(WebKit::WebSWServerToContextConnection&&, WebCore::SWServerToContextConnection&&, std::__1::__tuple_indices<0ul>)
8   0x135b0ffac decltype(auto) std::__1::apply[abi:v15006]<void IPC::callMemberFunction<WebKit::WebSWServerToContextConnection, WebCore::SWServerToContextConnection, void (WTF::ObjectIdentifierGeneric<WebCore::ServiceWorkerIdentifierType, WTF::ObjectIdentifierThreadSafeAccessTraits>), std::__1::tuple<WTF::ObjectIdentifierGeneric<WebCore::ServiceWorkerIdentifierType, WTF::ObjectIdentifierThreadSafeAccessTraits>>>(WebKit::WebSWServerToContextConnection*, void (WebCore::SWServerToContextConnection::*)(WTF::ObjectIdentifierGeneric<WebCore::ServiceWorkerIdentifierType, WTF::ObjectIdentifierThreadSafeAccessTraits>), std::__1::tuple<WTF::ObjectIdentifierGeneric<WebCore::ServiceWorkerIdentifierType, WTF::ObjectIdentifierThreadSafeAccessTraits>>&&)::'lambda'(auto&&...), std::__1::tuple<WTF::ObjectIdentifierGeneric<WebCore::ServiceWorkerIdentifierType, WTF::ObjectIdentifierThreadSafeAccessTraits>>>(WebKit::WebSWServerToContextConnection&&, WebCore::SWServerToContextConnection&&)
9   0x135b0fe2c void IPC::callMemberFunction<WebKit::WebSWServerToContextConnection, WebCore::SWServerToContextConnection, void (WTF::ObjectIdentifierGeneric<WebCore::ServiceWorkerIdentifierType, WTF::ObjectIdentifierThreadSafeAccessTraits>), std::__1::tuple<WTF::ObjectIdentifierGeneric<WebCore::ServiceWorkerIdentifierType, WTF::ObjectIdentifierThreadSafeAccessTraits>>>(WebKit::WebSWServerToContextConnection*, void (WebCore::SWServerToContextConnection::*)(WTF::ObjectIdentifierGeneric<WebCore::ServiceWorkerIdentifierType, WTF::ObjectIdentifierThreadSafeAccessTraits>), std::__1::tuple<WTF::ObjectIdentifierGeneric<WebCore::ServiceWorkerIdentifierType, WTF::ObjectIdentifierThreadSafeAccessTraits>>&&)
10  0x135b0a834 void IPC::handleMessage<Messages::WebSWServerToContextConnection::DidFinishActivation, WebKit::WebSWServerToContextConnection, WebCore::SWServerToContextConnection, void (WTF::ObjectIdentifierGeneric<WebCore::ServiceWorkerIdentifierType, WTF::ObjectIdentifierThreadSafeAccessTraits>)>(IPC::Connection&, IPC::Decoder&, WebKit::WebSWServerToContextConnection*, void (WebCore::SWServerToContextConnection::*)(WTF::ObjectIdentifierGeneric<WebCore::ServiceWorkerIdentifierType, WTF::ObjectIdentifierThreadSafeAccessTraits>))
11  0x135b09f9c WebKit::WebSWServerToContextConnection::didReceiveMessage(IPC::Connection&, IPC::Decoder&)
12  0x133e28944 WebKit::NetworkConnectionToWebProcess::didReceiveMessage(IPC::Connection&, IPC::Decoder&)
13  0x135c0a57c IPC::Connection::dispatchMessage(IPC::Decoder&)
14  0x135c0a9ac IPC::Connection::dispatchMessage(std::__1::unique_ptr<IPC::Decoder, std::__1::default_delete<IPC::Decoder>>)
15  0x135c0ace4 IPC::Connection::dispatchOneIncomingMessage()
16  0x135c2722c IPC::Connection::enqueueIncomingMessage(std::__1::unique_ptr<IPC::Decoder, std::__1::default_delete<IPC::Decoder>>)::$_17::operator()() const
17  0x135c27188 WTF::Detail::CallableWrapper<IPC::Connection::enqueueIncomingMessage(std::__1::unique_ptr<IPC::Decoder, std::__1::default_delete<IPC::Decoder>>)::$_17, void>::call()
18  0x1106eadec WTF::Function<void ()>::operator()() const
19  0x10eaa41b4 WTF::RunLoop::performWork()
20  0x10eaa87bc WTF::RunLoop::performWork(void*)
21  0x105e15c6c __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__
22  0x105e15bb4 __CFRunLoopDoSource0
23  0x105e15324 __CFRunLoopDoSources0
24  0x105e0f958 __CFRunLoopRun
25  0x105e0f254 CFRunLoopRunSpecific
26  0x10807b4bc -[NSRunLoop(NSRunLoop) runMode:beforeDate:]
27  0x10807b690 -[NSRunLoop(NSRunLoop) run]
28  0x106f0f080 _xpc_objc_main
29  0x106f1119c xpc_main
30  0x133c8a930 WebKit::XPCServiceMain(int, char const**)
31  0x135bdf274 WKXPCServiceMain
com.apple.WebKit.Networking.Development terminated (pid 47779) for reason: crash
Comment 1 Alexey Proskuryakov 2023-06-25 15:55:30 PDT
The assertion failure is flaky, but very frequent, about half of the time.

Looking at commit history, this almost certainly started with 264242@main, there were no related changes before it.
Comment 2 Radar WebKit Bug Importer 2023-06-25 15:55:41 PDT
<rdar://problem/111299016>
Comment 3 youenn fablet 2023-06-27 00:50:32 PDT
Pull request: https://github.com/WebKit/WebKit/pull/15321
Comment 4 EWS 2023-06-27 09:58:38 PDT
Committed 265553@main (42b406d0e2bc): <https://commits.webkit.org/265553@main>

Reviewed commits have been landed. Closing PR #15321 and removing active labels.