Bug 260895

Summary: WPT webmessaging/broadcastchannel/opaque-origin.html crashes in debug
Product: WebKit Reporter: Anne van Kesteren <annevk>
Component: DOMAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: achristensen, cdumez, mark.lam, webkit-bug-importer, youennf
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   

Description Anne van Kesteren 2023-08-30 00:23:18 PDT
mac-AS-debug-wk2 during run-layout-tests-in-stress-mode crashes on imported/w3c/web-platform-tests/webmessaging/broadcastchannel/opaque-origin.html. stderr contains

ERROR: Invalid Content-Type string ''
/Volumes/Data/worker/macOS-AppleSilicon-Ventura-Debug-Build-EWS/build/Source/WebCore/platform/network/ParsedContentType.cpp(236) : bool WebCore::ParsedContentType::parseContentType(WebCore::Mode)
ERROR: Invalid Content-Type string ''
/Volumes/Data/worker/macOS-AppleSilicon-Ventura-Debug-Build-EWS/build/Source/WebCore/platform/network/ParsedContentType.cpp(236) : bool WebCore::ParsedContentType::parseContentType(WebCore::Mode)
ERROR: Invalid Content-Type string ''
/Volumes/Data/worker/macOS-AppleSilicon-Ventura-Debug-Build-EWS/build/Source/WebCore/platform/network/ParsedContentType.cpp(236) : bool WebCore::ParsedContentType::parseContentType(WebCore::Mode)
ERROR: Invalid Content-Type string ''
/Volumes/Data/worker/macOS-AppleSilicon-Ventura-Debug-Build-EWS/build/Source/WebCore/platform/network/ParsedContentType.cpp(236) : bool WebCore::ParsedContentType::parseContentType(WebCore::Mode)

See https://github.com/WebKit/WebKit/pull/17132 for additional context.
Comment 1 Alexey Proskuryakov 2023-08-30 09:02:04 PDT
Crashed in ServiceWorker process. Tests were being run like this:

python3 Tools/Scripts/run-webkit-tests --no-build --no-show-results --no-new-test-results --clobber-old-results --debug --results-directory layout-test-results --debug-rwt-logging --exit-after-n-failures 10 --skip-failing-tests --iterations 10 LayoutTests/imported/w3c/web-platform-tests/webmessaging/broadcastchannel/cross-partition.https.tentative.html LayoutTests/imported/w3c/web-platform-tests/webmessaging/postMessage_CryptoKey_insecure.sub.html LayoutTests/imported/w3c/web-platform-tests/webmessaging/message-channels/detached-iframe.window.html LayoutTests/imported/w3c/web-platform-tests/webmessaging/broadcastchannel/blobs.html LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-options/one-arg.html LayoutTests/imported/w3c/web-platform-tests/webmessaging/broadcastchannel/opaque-origin.html


03:00:37.913 855 worker/2   ASSERTION FAILED: vm.hasTerminationRequest()
03:00:37.913 855 worker/2   ./runtime/VMTraps.cpp(408) : void JSC::VMTraps::handleTraps(VMTraps::BitField)
03:00:37.914 855 worker/2 imported/w3c/web-platform-tests/webmessaging/broadcastchannel/cross-partition.https.tentative.html passed
03:00:38.094 855 worker/2 ServiceWorkerProcess crash, pid = 1000

03:00:58.238 855 worker/2 worker/2 imported/w3c/web-platform-tests/webmessaging/broadcastchannel/opaque-origin.html crashed, (stderr lines):
03:00:58.238 855 worker/2   1   0x1371846d8 WTFCrash
03:00:58.238 855 worker/2   2   0x1377eddb0 JSC::VMTraps::maybeNeedHandling() const
03:00:58.238 855 worker/2   3   0x13917b29c JSC::VMTraps::handleTraps(unsigned int)
03:00:58.238 855 worker/2   4   0x13917adf8 JSC::VM::hasExceptionsAfterHandlingTraps()
03:00:58.238 855 worker/2   5   0x138f035b4 JSC::JSPromise::resolve(JSC::JSGlobalObject*, JSC::JSValue)
03:00:58.238 855 worker/2   6   0x282ea0b20 WebCore::DeferredPromise::callFunction(JSC::JSGlobalObject&, WebCore::DeferredPromise::ResolveMode, JSC::JSValue)
03:00:58.238 855 worker/2   7   0x282a52c5c WebCore::DeferredPromise::resolve(JSC::JSGlobalObject&, JSC::JSValue)
03:00:58.238 855 worker/2   8   0x2803e350c void WebCore::DeferredPromise::resolve<WebCore::IDLBoolean>(WebCore::IDLBoolean::ParameterType)
03:00:58.238 855 worker/2   9   0x28229e20c WebCore::DOMPromiseDeferred<WebCore::IDLBoolean>::resolve(bool)
03:00:58.238 855 worker/2   10  0x2822fe3b0 void WebCore::DOMPromiseDeferred<WebCore::IDLBoolean>::settle<bool>(WebCore::ExceptionOr<bool>&&)
03:00:58.238 855 worker/2   11  0x2859f99d8 auto WebCore::ServiceWorkerContainer::unregisterRegistration(WTF::ObjectIdentifierGeneric<WebCore::ServiceWorkerRegistrationIdentifierType, WTF::ObjectIdentifierThreadSafeAccessTraits>, WebCore::DOMPromiseDeferred<WebCore::IDLBoolean>&&)::$_24::operator()<WebCore::ExceptionOr<bool>>(WebCore::ExceptionOr<bool>&&)
03:00:58.238 855 worker/2   12  0x2859f9930 WTF::Detail::CallableWrapper<WebCore::ServiceWorkerContainer::unregisterRegistration(WTF::ObjectIdentifierGeneric<WebCore::ServiceWorkerRegistrationIdentifierType, WTF::ObjectIdentifierThreadSafeAccessTraits>, WebCore::DOMPromiseDeferred<WebCore::IDLBoolean>&&)::$_24, void, WebCore::ExceptionOr<bool>&&>::call(WebCore::ExceptionOr<bool>&&)
03:00:58.238 855 worker/2   13  0x282302564 WTF::Function<void (WebCore::ExceptionOr<bool>&&)>::operator()(WebCore::ExceptionOr<bool>&&) const
03:00:58.238 855 worker/2   14  0x282302370 WTF::CompletionHandler<void (WebCore::ExceptionOr<bool>&&)>::operator()(WebCore::ExceptionOr<bool>&&)
03:00:58.238 855 worker/2   15  0x285a75fec auto& auto WebCore::WorkerSWClientConnection::scheduleUnregisterJobInServer(WTF::ObjectIdentifierGeneric<WebCore::ServiceWorkerRegistrationIdentifierType, WTF::ObjectIdentifierThreadSafeAccessTraits>, std::__1::variant<WTF::ObjectIdentifierGeneric<WebCore::ServiceWorkerIdentifierType, WTF::ObjectIdentifierThreadSafeAccessTraits>, WebCore::ProcessQualified<WTF::UUID>>, WTF::CompletionHandler<void (WebCore::ExceptionOr<bool>&&)>&&)::$_14::operator()()::'lambda'(auto&&)::operator()<WebCore::ExceptionOr<bool>>(auto&&) const::'lambda'(auto&)::operator()<WebCore::ScriptExecutionContext>('lambda'(auto&))
03:00:58.238 855 worker/2   16  0x285a75f04 WTF::Detail::CallableWrapper<auto WebCore::WorkerSWClientConnection::scheduleUnregisterJobInServer(WTF::ObjectIdentifierGeneric<WebCore::ServiceWorkerRegistrationIdentifierType, WTF::ObjectIdentifierThreadSafeAccessTraits>, std::__1::variant<WTF::ObjectIdentifierGeneric<WebCore::ServiceWorkerIdentifierType, WTF::ObjectIdentifierThreadSafeAccessTraits>, WebCore::ProcessQualified<WTF::UUID>>, WTF::CompletionHandler<void (WebCore::ExceptionOr<bool>&&)>&&)::$_14::operator()()::'lambda'(auto&&)::operator()<WebCore::ExceptionOr<bool>>(auto&&) const::'lambda'(auto&), void, WebCore::ScriptExecutionContext&>::call(WTF::Detail::CallableWrapper<auto WebCore::WorkerSWClientConnection::scheduleUnregisterJobInServer(WTF::ObjectIdentifierGeneric<WebCore::ServiceWorkerRegistrationIdentifierType, WTF::ObjectIdentifierThreadSafeAccessTraits>, std::__1::variant<WTF::ObjectIdentifierGeneric<WebCore::ServiceWorkerIdentifierType, WTF::ObjectIdentifierThreadSafeAccessTraits>, WebCore::ProcessQualified<WTF::UUID>>, WTF::CompletionHandler<void (WebCore::ExceptionOr<bool>&&)>&&)::$_14::operator()()::'lambda'(auto&&)::operator()<WebCore::ExceptionOr<bool>>(auto&&) const::'lambda'(auto&), void, WebCore::ScriptExecutionContext&>)
03:00:58.238 855 worker/2   17  0x282b76654 WTF::Function<void (WebCore::ScriptExecutionContext&)>::operator()(WebCore::ScriptExecutionContext&) const
03:00:58.238 855 worker/2   18  0x282b6c05c WebCore::ScriptExecutionContext::Task::performTask(WebCore::ScriptExecutionContext&)
03:00:58.238 855 worker/2   19  0x28599d354 WebCore::WorkerDedicatedRunLoop::Task::performTask(WebCore::WorkerOrWorkletGlobalScope*)
03:00:58.238 855 worker/2   20  0x28599c88c WebCore::WorkerDedicatedRunLoop::runInMode(WebCore::WorkerOrWorkletGlobalScope*, WebCore::ModePredicate const&)
03:00:58.238 855 worker/2   21  0x28599af68 WebCore::WorkerDedicatedRunLoop::run(WebCore::WorkerOrWorkletGlobalScope*)
03:00:58.239 855 worker/2   22  0x28599aeec WebCore::WorkerOrWorkletThread::runEventLoop()
03:00:58.239 855 worker/2   23  0x285ad7ce0 WebCore::ServiceWorkerThread::runEventLoop()
03:00:58.239 855 worker/2   24  0x28599b27c WebCore::WorkerOrWorkletThread::workerOrWorkletThread()
03:00:58.239 855 worker/2   25  0x2859bc268 WebCore::WorkerThread::createThread()::$_17::operator()() const
03:00:58.239 855 worker/2   26  0x2859bc214 WTF::Detail::CallableWrapper<WebCore::WorkerThread::createThread()::$_17, void>::call()
03:00:58.239 855 worker/2   27  0x1371ac8c0 WTF::Function<void ()>::operator()() const
03:00:58.239 855 worker/2   28  0x137285604 WTF::Thread::entryPoint(WTF::Thread::NewThreadContext*)
03:00:58.239 855 worker/2   29  0x13729154c WTF::wtfThreadEntryPoint(void*)
03:00:58.239 855 worker/2   30  0x1a2faffa8 _pthread_start
03:00:58.239 855 worker/2   31  0x1a2faada0 thread_start
03:00:58.239 855 worker/2   ServiceWorkerProcess terminated (pid 1000) for reason: crash
Comment 2 Radar WebKit Bug Importer 2023-09-06 00:24:14 PDT
<rdar://problem/115041106>