The following layout test is failing on Mac WK2
Due to an unrelated issue we do not have results on the dashboard yet, but I was able to verify locally this crash happens after r245873 .
New test added http/wpt/service-workers/service-worker-networkprocess-crash.html when run before http/wpt/service-workers/update-service-worker.https.html will flakily cause a crash on Mac WK2
reproduces like this:
run-webkit-tests http/wpt/service-workers/service-worker-networkprocess-crash.html http/wpt/service-workers/update-service-worker.https.html --child-process 1 --iter 10 --exit-after-n-crashes=1
Usually crashes in 3 runs.
Will post full crash log in radar:
0 com.apple.WebKit 0x000000010976889d WebKit::SharedStringHashTableReadOnly::setSharedMemory(WTF::RefPtr<WebKit::SharedMemory, WTF::DumbPtrTraits<WebKit::SharedMemory> >&&) + 19
1 com.apple.WebKit 0x00000001099ccc59 WebKit::WebSWOriginTable::setSharedMemory(WebKit::SharedMemory::Handle const&) + 63
2 com.apple.WebKit 0x0000000109ad7208 WebKit::WebSWClientConnection::didReceiveMessage(IPC::Connection&, IPC::Decoder&) + 6580
3 com.apple.WebKit 0x00000001095fdd67 IPC::Connection::dispatchMessage(std::__1::unique_ptr<IPC::Decoder, std::__1::default_delete<IPC::Decoder> >) + 165
4 com.apple.WebKit 0x000000010960476e WTF::Detail::CallableWrapper<IPC::Connection::enqueueIncomingMessage(std::__1::unique_ptr<IPC::Decoder, std::__1::default_delete<IPC::Decoder> >)::$_14, void>::call() + 202
Occurring in iOS Simulator as well.
Will fix it today
Layout test : http/tests/websocket/tests/hybi/no-subprotocol.html is hitting the same crash as well. It's not triggering off your new test however. I can bisect and find out which test is triggering it, if it's helpful?
I think I know the route cause of this.
We probably need to remove the WebSWClientConnection from NetworkProcessConnection map at destruction time.
Created attachment 370979 [details]
Comment on attachment 370979 [details]
Clearing flags on attachment: 370979
Committed r245913: <https://trac.webkit.org/changeset/245913>
All reviewed patches have been landed. Closing bug.