<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>247395</bug_id>
          
          <creation_ts>2022-11-02 17:21:35 -0700</creation_ts>
          <short_desc>The crashy WebKit XPC service causes Safari to Crash on iOS</short_desc>
          <delta_ts>2022-11-07 17:20:35 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WebKit Process Model</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Michael Saboff">msaboff</reporter>
          <assigned_to name="Michael Saboff">msaboff</assigned_to>
          <cc>achristensen</cc>
    
    <cc>cdumez</cc>
    
    <cc>david_quesada</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1909938</commentid>
    <comment_count>0</comment_count>
    <who name="Michael Saboff">msaboff</who>
    <bug_when>2022-11-02 17:21:35 -0700</bug_when>
    <thetext>We get crashes like:
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
 0  WebKit           	       0x1a434f6c0 void WebKit::WebProcessPool::sendToAllProcessesForSession&lt;Messages::WebProcess::SetResourceLoadStatisticsEnabled&gt;(Messages::WebProcess::SetResourceLoadStatisticsEnabled const&amp;, PAL::SessionID) + 156 /Library/Caches/com.apple.xbs/Sources/WebKit/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.h:132
 1  WebKit           	       0x1a434f40c WebKit::WebsiteDataStore::setResourceLoadStatisticsEnabled(bool) + 168 /Library/Caches/com.apple.xbs/Sources/WebKit/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp:1605
 2  WebKit           	       0x1a434f40c WebKit::WebsiteDataStore::setResourceLoadStatisticsEnabled(bool) + 168 /Library/Caches/com.apple.xbs/Sources/WebKit/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp:1605
 3  WebKit           	       0x1a42569e8 WebKit::WebProcessPool::createNewWebProcess(WebKit::WebsiteDataStore*, WebKit::WebProcessProxy::CaptivePortalMode, WebKit::WebProcessProxy::IsPrewarmed, WebCore::CrossOriginMode) + 92 /Library/Caches/com.apple.xbs/Sources/WebKit/Source/WebKit/UIProcess/WebProcessPool.cpp:629
 4  WebKit           	       0x1a4239648 WebKit::WebProcessPool::processForRegistrableDomain(WebKit::WebsiteDataStore&amp;, WebCore::RegistrableDomain const&amp;, WebKit::WebProcessProxy::CaptivePortalMode) + 888 /Library/Caches/com.apple.xbs/Sources/WebKit/Source/WebKit/UIProcess/WebProcessPool.cpp:1052
 5  WebKit           	       0x1a427239c WebKit::WebProcessPool::createWebPage(WebKit::PageClient&amp;, WTF::Ref&lt;API::PageConfiguration, WTF::RawPtrTraits&lt;API::PageConfiguration&gt; &gt;&amp;&amp;) + 276 /Library/Caches/com.apple.xbs/Sources/WebKit/Source/WebKit/UIProcess/WebProcessPool.cpp:1098
 6  WebKit           	       0x1a3c1a6a0 -[WKContentView _commonInitializationWithProcessPool:configuration:] + 68 /Library/Caches/com.apple.xbs/Sources/WebKit/Source/WebKit/UIProcess/ios/WKContentView.mm:172
 7  WebKit           	       0x1a3c1a630 -[WKContentView initWithFrame:processPool:configuration:webView:] + 164 /Library/Caches/com.apple.xbs/Sources/WebKit/Source/WebKit/UIProcess/ios/WKContentView.mm:297
 8  WebKit           	       0x1a3c18adc -[WKWebView _initializeWithConfiguration:] + 1096 /Library/Caches/com.apple.xbs/Sources/WebKit/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm:386
 9  WebKit           	       0x1a3c18680 -[WKWebView initWithFrame:configuration:] + 72 /Library/Caches/com.apple.xbs/Sources/WebKit/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm:586
 10  SafariSharedUI   	       0x1b18d0b70 __100-[WBSSiteMetadataManager siteMetadataProvider:getWebViewOfSize:withConfiguration:completionHandler:]_block_invoke + 56 /Library/Caches/com.apple.xbs/Sources/SafariShared/SafariShared/SiteMetadataManager/WBSSiteMetadataManager.m:784
 11  SafariSharedUI   	       0x1b18d0aec -[WBSSiteMetadataManager siteMetadataProvider:getWebViewOfSize:withConfiguration:completionHandler:] + 712 /Library/Caches/com.apple.xbs/Sources/SafariShared/SafariShared/SiteMetadataManager/WBSSiteMetadataManager.m:790
 12  SafariSharedUI   	       0x1b18e4818 -[WBSTouchIconCache webViewMetadataFetchOperation:getWebViewOfSize:withConfiguration:completionHandler:] + 100 /Library/Caches/com.apple.xbs/Sources/SafariShared/SafariShared/SiteMetadataManager/WBSTouchIconCache.mm:1008
 13  SafariSharedUI   	       0x1b190aeb8 -[WBSWebViewMetadataFetchOperation _setUpWebViewAndStartOffscreenFetching] + 216 /Library/Caches/com.apple.xbs/Sources/SafariShared/SafariShared/SiteMetadataManager/WBSWebViewMetadataFetchOperation.m:52
 14  libdispatch.dylib	       0x1980d14b4 _dispatch_call_block_and_release + 32 /Library/Caches/com.apple.xbs/Sources/libdispatch/src/init.c:1518
 15  libdispatch.dylib	       0x1980d2fdc _dispatch_client_callout + 20 /Library/Caches/com.apple.xbs/Sources/libdispatch/src/object.m:560
 16  libdispatch.dylib	       0x1980e17f4 _dispatch_main_queue_drain + 928 /Library/Caches/com.apple.xbs/Sources/libdispatch/src/inline_internal.h:2632
 17  libdispatch.dylib	       0x1980e1444 _dispatch_main_queue_callback_4CF + 44 /Library/Caches/com.apple.xbs/Sources/libdispatch/src/queue.c:7887
 18  CoreFoundation   	       0x190b566d8 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 16 /Library/Caches/com.apple.xbs/Sources/CoreFoundation/CoreFoundation/RunLoop.subproj/CFRunLoop.c:1780
 19  CoreFoundation   	       0x190b3803c __CFRunLoopRun + 2036 /Library/Caches/com.ap

The problem is that the WebProcessProxy for a crashing WebProcess doesn&apos;t have a WebsiteDataStore associated with it, so we can&apos;t get a SessionID for matching in sendToAllProcessesForSession().</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1909939</commentid>
    <comment_count>1</comment_count>
    <who name="Michael Saboff">msaboff</who>
    <bug_when>2022-11-02 17:21:50 -0700</bug_when>
    <thetext>&lt;rdar://101876374&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1909943</commentid>
    <comment_count>2</comment_count>
    <who name="Michael Saboff">msaboff</who>
    <bug_when>2022-11-02 17:32:55 -0700</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/6066</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1910946</commentid>
    <comment_count>3</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2022-11-07 17:20:32 -0800</bug_when>
    <thetext>Committed 256434@main (2fb42dcd321a): &lt;https://commits.webkit.org/256434@main&gt;

Reviewed commits have been landed. Closing PR #6066 and removing active labels.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>