Bug 240146

Summary: GPU Process crash under IPC::Connection::open() ASSERTION FAILED: m_sendPort
Product: WebKit Reporter: Karl Rackler <rackler>
Component: WebGPUAssignee: Kimmo Kinnunen <kkinnunen>
Status: RESOLVED FIXED    
Severity: Normal CC: cdumez, Hironori.Fujii, jenner, kkinnunen, webkit-bot-watchers-bugzilla, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
crash log
none
Patch none

Description Karl Rackler 2022-05-05 16:32:07 PDT
Created attachment 458924 [details]
crash log

Multiple Layout tests show a crash under IPC::Connection::open()
https://build.webkit.org/results/Apple-iOS-15-Simulator-Debug-WK2-Tests/250317@main%20(2474)/results.html
Comment 1 Radar WebKit Bug Importer 2022-05-05 16:32:28 PDT
<rdar://problem/92827525>
Comment 2 Fujii Hironori 2022-05-05 16:55:00 PDT
ASSERTION FAILED: m_sendPort
/Volumes/Data/worker/Apple-iOS-15-Simulator-Debug-Build/build/Source/WebKit/Platform/IPC/cocoa/ConnectionCocoa.mm(200) : bool IPC::Connection::open()
1   0x13bfa0929 WTFCrash
2   0x126145e7b WTFCrashWithInfo(int, char const*, char const*, int)
3   0x126c57a7c IPC::Connection::open()
4   0x126e6eb3f WebKit::GPUConnectionToWebProcess::GPUConnectionToWebProcess(WebKit::GPUProcess&, WTF::ObjectIdentifier<WebCore::ProcessIdentifierType>, PAL::SessionID, IPC::Connection::Identifier&&, WebKit::GPUProcessConnectionParameters&&)
5   0x126e6e6dd WebKit::GPUConnectionToWebProcess::GPUConnectionToWebProcess(WebKit::GPUProcess&, WTF::ObjectIdentifier<WebCore::ProcessIdentifierType>, PAL::SessionID, IPC::Connection::Identifier&&, WebKit::GPUProcessConnectionParameters&&)
6   0x126e6e613 WebKit::GPUConnectionToWebProcess::create(WebKit::GPUProcess&, WTF::ObjectIdentifier<WebCore::ProcessIdentifierType>, PAL::SessionID, IPC::Connection::Identifier&&, WebKit::GPUProcessConnectionParameters&&)
7   0x126e75481 WebKit::GPUProcess::createGPUConnectionToWebProcess(WTF::ObjectIdentifier<WebCore::ProcessIdentifierType>, PAL::SessionID, IPC::Attachment&&, WebKit::GPUProcessConnectionParameters&&, WTF::CompletionHandler<void ()>&&)
8   0x126d58750 void IPC::callMemberFunctionImpl<WebKit::GPUProcess, void (WebKit::GPUProcess::*)(WTF::ObjectIdentifier<WebCore::ProcessIdentifierType>, PAL::SessionID, IPC::Attachment&&, WebKit::GPUProcessConnectionParameters&&, WTF::CompletionHandler<void ()>&&), void (), std::__1::tuple<WTF::ObjectIdentifier<WebCore::ProcessIdentifierType>, PAL::SessionID, IPC::Attachment, WebKit::GPUProcessConnectionParameters>, 0ul, 1ul, 2ul, 3ul>(WebKit::GPUProcess*, void (WebKit::GPUProcess::*)(WTF::ObjectIdentifier<WebCore::ProcessIdentifierType>, PAL::SessionID, IPC::Attachment&&, WebKit::GPUProcessConnectionParameters&&, WTF::CompletionHandler<void ()>&&), WTF::CompletionHandler<void ()>&&, std::__1::tuple<WTF::ObjectIdentifier<WebCore::ProcessIdentifierType>, PAL::SessionID, IPC::Attachment, WebKit::GPUProcessConnectionParameters>&&, std::__1::integer_sequence<unsigned long, 0ul, 1ul, 2ul, 3ul>)
9   0x126d531a2 void IPC::callMemberFunction<WebKit::GPUProcess, void (WebKit::GPUProcess::*)(WTF::ObjectIdentifier<WebCore::ProcessIdentifierType>, PAL::SessionID, IPC::Attachment&&, WebKit::GPUProcessConnectionParameters&&, WTF::CompletionHandler<void ()>&&), void (), std::__1::tuple<WTF::ObjectIdentifier<WebCore::ProcessIdentifierType>, PAL::SessionID, IPC::Attachment, WebKit::GPUProcessConnectionParameters>, std::__1::integer_sequence<unsigned long, 0ul, 1ul, 2ul, 3ul> >(std::__1::tuple<WTF::ObjectIdentifier<WebCore::ProcessIdentifierType>, PAL::SessionID, IPC::Attachment, WebKit::GPUProcessConnectionParameters>&&, WTF::CompletionHandler<void ()>&&, WebKit::GPUProcess*, void (WebKit::GPUProcess::*)(WTF::ObjectIdentifier<WebCore::ProcessIdentifierType>, PAL::SessionID, IPC::Attachment&&, WebKit::GPUProcessConnectionParameters&&, WTF::CompletionHandler<void ()>&&))
10  0x126d22024 void IPC::handleMessageAsync<Messages::GPUProcess::CreateGPUConnectionToWebProcess, WebKit::GPUProcess, void (WebKit::GPUProcess::*)(WTF::ObjectIdentifier<WebCore::ProcessIdentifierType>, PAL::SessionID, IPC::Attachment&&, WebKit::GPUProcessConnectionParameters&&, WTF::CompletionHandler<void ()>&&)>(IPC::Connection&, IPC::Decoder&, WebKit::GPUProcess*, void (WebKit::GPUProcess::*)(WTF::ObjectIdentifier<WebCore::ProcessIdentifierType>, PAL::SessionID, IPC::Attachment&&, WebKit::GPUProcessConnectionParameters&&, WTF::CompletionHandler<void ()>&&))
11  0x126d21385 WebKit::GPUProcess::didReceiveGPUProcessMessage(IPC::Connection&, IPC::Decoder&)
12  0x126e75318 WebKit::GPUProcess::didReceiveMessage(IPC::Connection&, IPC::Decoder&)
13  0x1276b4a84 IPC::Connection::dispatchMessage(IPC::Decoder&)
14  0x1276b5145 IPC::Connection::dispatchMessage(std::__1::unique_ptr<IPC::Decoder, std::__1::default_delete<IPC::Decoder> >)
15  0x1276ae523 IPC::Connection::SyncMessageState::ConnectionAndIncomingMessage::dispatch()
16  0x1276ae7b8 IPC::Connection::SyncMessageState::dispatchMessagesAndResetDidScheduleDispatchMessagesForConnection(IPC::Connection&)
17  0x1276c7a1c IPC::Connection::SyncMessageState::processIncomingMessage(IPC::Connection&, std::__1::unique_ptr<IPC::Decoder, std::__1::default_delete<IPC::Decoder> >&)::$_5::operator()()
18  0x1276c7949 WTF::Detail::CallableWrapper<IPC::Connection::SyncMessageState::processIncomingMessage(IPC::Connection&, std::__1::unique_ptr<IPC::Decoder, std::__1::default_delete<IPC::Decoder> >&)::$_5, void>::call()
19  0x13bfcffb2 WTF::Function<void ()>::operator()() const
20  0x13c06a6be WTF::RunLoop::performWork()
21  0x13c06f11e WTF::RunLoop::performWork(void*)
22  0x7fff20373833 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__
23  0x7fff2037372b __CFRunLoopDoSource0
24  0x7fff20372bf8 __CFRunLoopDoSources0
25  0x7fff2036d2f4 __CFRunLoopRun
26  0x7fff2036ca90 CFRunLoopRunSpecific
27  0x7fff20827e31 -[NSRunLoop(NSRunLoop) runMode:beforeDate:]
28  0x7fff2082804f -[NSRunLoop(NSRunLoop) run]
29  0x7fff20069feb _xpc_objc_main
30  0x7fff2006bfd4 xpc_main
31  0x126f16092 WebKit::XPCServiceMain(int, char const**)
com.apple.WebKit.GPU.Development terminated (pid 30695) for reason: crash
Comment 3 Kimmo Kinnunen 2022-05-06 02:30:47 PDT
Created attachment 458943 [details]
Patch
Comment 4 Kimmo Kinnunen 2022-05-06 02:50:02 PDT
I cannot yet repro the assert on my iMac1,1 (x86_64) similar OS, simulator build
The fix is a speculative fix for the issue
Comment 5 EWS 2022-05-06 08:14:47 PDT
Committed r293890 (250348@main): <https://commits.webkit.org/250348@main>

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