Bug 141934 - [Mac][WK2] ASSERTION FAILED: m_sendPort in IPC::Connection::open()
Summary: [Mac][WK2] ASSERTION FAILED: m_sendPort in IPC::Connection::open()
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chris Dumez
Depends on:
Reported: 2015-02-23 16:41 PST by Chris Dumez
Modified: 2015-02-25 23:38 PST (History)
5 users (show)

See Also:

Patch (2.31 KB, patch)
2015-02-23 16:52 PST, Chris Dumez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Dumez 2015-02-23 16:41:31 PST
I recently hit the following assertion while navigating:

/Volumes/Data/cdumez/WebKit/OpenSource/Source/WebKit2/Platform/IPC/mac/ConnectionMac.mm(182) : bool IPC::Connection::open()
1   0x115764cb0 WTFCrash
2   0x111f263ba IPC::Connection::open()
3   0x111ef2344 WebKit::ChildProcess::initialize(WebKit::ChildProcessInitializationParameters const&)
4   0x11240ead9 void WebKit::XPCServiceInitializer<WebKit::WebProcess, WebKit::XPCServiceInitializerDelegate>(WTF::OSObjectPtr<_xpc_connection_s*>, void*)
5   0x11240e8a1 WebContentServiceInitializer
6   0x10ad6868d invocation function for block in WebKit::XPCServiceEventHandler(NSObject<OS_xpc_object>*)
7   0x7fff8a388d51 _xpc_connection_call_event_handler
8   0x7fff8a3888cf _xpc_connection_mach_event
9   0x7fff90dd20f8 _dispatch_client_callout4
10  0x7fff90dd31a3 _dispatch_mach_msg_invoke
11  0x7fff90dd0154 _dispatch_queue_drain
12  0x7fff90dd1a10 _dispatch_mach_invoke
13  0x7fff90dd8b02 _dispatch_main_queue_callback_4CF
15  0x7fff8f8f8d8f __CFRunLoopRun
16  0x7fff8f8f82d8 CFRunLoopRunSpecific
17  0x7fff8b23663f RunCurrentEventLoopInMode
18  0x7fff8b2363ba ReceiveNextEventCommon
19  0x7fff8b2361fb _BlockUntilNextEventMatchingListInModeWithFilter
20  0x7fff864abe3d _DPSNextEvent
21  0x7fff864ab440 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:]
22  0x7fff864a1133 -[NSApplication run]
23  0x7fff8641d814 NSApplicationMain
24  0x7fff8a398958 _xpc_objc_main
25  0x7fff8a39a060 _parse_sysctl_once
26  0x10ad68185 main
27  0x7fff8f4495c9 start

I had a very quick look and the culprit might be XPCServiceInitializerDelegate::getConnectionIdentifier() which returns true unconditionally although xpc_dictionary_copy_mach_send() can return MACH_PORT_NULL. I am not familiar with this code though.
Comment 1 Chris Dumez 2015-02-23 16:52:08 PST
Created attachment 247166 [details]
Comment 2 WebKit Commit Bot 2015-02-24 19:52:57 PST
Comment on attachment 247166 [details]

Clearing flags on attachment: 247166

Committed r180606: <http://trac.webkit.org/changeset/180606>
Comment 3 WebKit Commit Bot 2015-02-24 19:53:03 PST
All reviewed patches have been landed.  Closing bug.
Comment 4 Alexey Proskuryakov 2015-02-25 23:38:22 PST
Doesn't this make IPC problems harder to detect? Instead of an assertion, we now just get a mysterious exit with no diagnostics at all.