Bug 182991

Summary: ASSERT under WebAutomationSession::setProcessPool() when running W3C test suite a second time
Product: WebKit Reporter: BJ Burg <bburg>
Component: WebDriverAssignee: BJ Burg <bburg>
Severity: Normal CC: aestes, bburg, cgarcia, commit-queue, ews-watchlist, joepeck, mkwst, timothy, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Description Flags
Proposed Fix none

Description BJ Burg 2018-02-20 17:13:24 PST
It appears that the WebProcessPool's WebAutomationSession did not get cleared properly before we set the next one. Thus, we hit this assertion:

#1	0x000000010f8cf13e in IPC::MessageReceiverMap::addMessageReceiver(IPC::StringReference, IPC::MessageReceiver&) at /Users/bburg/repos/webkit/OpenSource/Source/WebKit/Platform/IPC/MessageReceiverMap.cpp:44


Because the old session has still registered for the name "WebAutomationSession". I looked into the receiver map and saw some unrecognized pointer still registered for that name. So, my hunch is that it's an old session that wasn't cleared properly. In general, the existing pattern of relying on the destructor to run at a certain time and clean up message receivers seems bad. If the client accidentally retained the WebAutomationSession somehow, then this would behave poorly.
Comment 1 BJ Burg 2018-02-20 17:13:45 PST
Comment 2 BJ Burg 2018-02-20 17:20:39 PST
Created attachment 334324 [details]
Proposed Fix
Comment 3 Timothy Hatcher 2018-02-20 17:23:08 PST
Comment on attachment 334324 [details]
Proposed Fix

Good call. I blame me.
Comment 4 WebKit Commit Bot 2018-02-20 18:18:02 PST
Comment on attachment 334324 [details]
Proposed Fix

Clearing flags on attachment: 334324

Committed r228854: <https://trac.webkit.org/changeset/228854>
Comment 5 WebKit Commit Bot 2018-02-20 18:18:03 PST
All reviewed patches have been landed.  Closing bug.