Title: [282184] branches/safari-612.2.4.1-branch/Source/WebKit
Revision
282184
Author
repst...@apple.com
Date
2021-09-08 16:56:21 -0700 (Wed, 08 Sep 2021)

Log Message

Cherry-pick r282174. rdar://problem/82898503

    Remove responsiveness timer in NetworkProcessProxy::getNetworkProcessConnection
    https://bugs.webkit.org/show_bug.cgi?id=230016
    rdar://problem/80760179

    Reviewed by Chris Dumez.

    We've seen evidence that network process may be blocked in initializeNetworkProcess. Since we have a 3-second
    responsiveness timer in NetworkProcessProxy::getNetworkProcessConnection, blocked network process will be killed
    and a new network process will be launched for getting connection. However, the new network process may get
    stuck in initializeNetworkProcess too. In this case, web process will crash for not being able to get network
    process connection.

    * UIProcess/Network/NetworkProcessProxy.cpp:
    (WebKit::NetworkProcessProxy::getNetworkProcessConnection):
    * UIProcess/WebsiteData/WebsiteDataStore.cpp: change RELEASE_ASSERT_NOT_REACHED_WITH_MESSAGE to
    RELEASE_LOG_ERROR as the message is not printed in non-debug build.
    (WebKit::WebsiteDataStore::getNetworkProcessConnection):

    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@282174 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Modified Paths

Diff

Modified: branches/safari-612.2.4.1-branch/Source/WebKit/ChangeLog (282183 => 282184)


--- branches/safari-612.2.4.1-branch/Source/WebKit/ChangeLog	2021-09-08 23:53:18 UTC (rev 282183)
+++ branches/safari-612.2.4.1-branch/Source/WebKit/ChangeLog	2021-09-08 23:56:21 UTC (rev 282184)
@@ -1,3 +1,48 @@
+2021-09-08  Russell Epstein  <repst...@apple.com>
+
+        Cherry-pick r282174. rdar://problem/82898503
+
+    Remove responsiveness timer in NetworkProcessProxy::getNetworkProcessConnection
+    https://bugs.webkit.org/show_bug.cgi?id=230016
+    rdar://problem/80760179
+    
+    Reviewed by Chris Dumez.
+    
+    We've seen evidence that network process may be blocked in initializeNetworkProcess. Since we have a 3-second
+    responsiveness timer in NetworkProcessProxy::getNetworkProcessConnection, blocked network process will be killed
+    and a new network process will be launched for getting connection. However, the new network process may get
+    stuck in initializeNetworkProcess too. In this case, web process will crash for not being able to get network
+    process connection.
+    
+    * UIProcess/Network/NetworkProcessProxy.cpp:
+    (WebKit::NetworkProcessProxy::getNetworkProcessConnection):
+    * UIProcess/WebsiteData/WebsiteDataStore.cpp: change RELEASE_ASSERT_NOT_REACHED_WITH_MESSAGE to
+    RELEASE_LOG_ERROR as the message is not printed in non-debug build.
+    (WebKit::WebsiteDataStore::getNetworkProcessConnection):
+    
+    
+    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@282174 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+    2021-09-08  Sihui Liu  <sihui_...@apple.com>
+
+            Remove responsiveness timer in NetworkProcessProxy::getNetworkProcessConnection
+            https://bugs.webkit.org/show_bug.cgi?id=230016
+            rdar://problem/80760179
+
+            Reviewed by Chris Dumez.
+
+            We've seen evidence that network process may be blocked in initializeNetworkProcess. Since we have a 3-second
+            responsiveness timer in NetworkProcessProxy::getNetworkProcessConnection, blocked network process will be killed
+            and a new network process will be launched for getting connection. However, the new network process may get
+            stuck in initializeNetworkProcess too. In this case, web process will crash for not being able to get network
+            process connection.
+
+            * UIProcess/Network/NetworkProcessProxy.cpp:
+            (WebKit::NetworkProcessProxy::getNetworkProcessConnection):
+            * UIProcess/WebsiteData/WebsiteDataStore.cpp: change RELEASE_ASSERT_NOT_REACHED_WITH_MESSAGE to
+            RELEASE_LOG_ERROR as the message is not printed in non-debug build.
+            (WebKit::WebsiteDataStore::getNetworkProcessConnection):
+
 2021-09-01  Russell Epstein  <repst...@apple.com>
 
         Cherry-pick r281817. rdar://problem/82652467

Modified: branches/safari-612.2.4.1-branch/Source/WebKit/UIProcess/Network/NetworkProcessProxy.cpp (282183 => 282184)


--- branches/safari-612.2.4.1-branch/Source/WebKit/UIProcess/Network/NetworkProcessProxy.cpp	2021-09-08 23:53:18 UTC (rev 282183)
+++ branches/safari-612.2.4.1-branch/Source/WebKit/UIProcess/Network/NetworkProcessProxy.cpp	2021-09-08 23:56:21 UTC (rev 282184)
@@ -250,7 +250,8 @@
 void NetworkProcessProxy::getNetworkProcessConnection(WebProcessProxy& webProcessProxy, Messages::WebProcessProxy::GetNetworkProcessConnection::DelayedReply&& reply)
 {
     RELEASE_LOG(ProcessSuspension, "%p - NetworkProcessProxy is taking a background assertion because a web process is requesting a connection", this);
-    startResponsivenessTimer(UseLazyStop::No);
+    if (!isLaunching())
+        startResponsivenessTimer(UseLazyStop::No);
     sendWithAsyncReply(Messages::NetworkProcess::CreateNetworkConnectionToWebProcess { webProcessProxy.coreProcessIdentifier(), webProcessProxy.sessionID() }, [this, weakThis = makeWeakPtr(*this), reply = WTFMove(reply)](auto&& identifier, auto cookieAcceptPolicy) mutable {
         if (!weakThis) {
             RELEASE_LOG_ERROR(Process, "NetworkProcessProxy::getNetworkProcessConnection: NetworkProcessProxy deallocated during connection establishment");

Modified: branches/safari-612.2.4.1-branch/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp (282183 => 282184)


--- branches/safari-612.2.4.1-branch/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp	2021-09-08 23:53:18 UTC (rev 282183)
+++ branches/safari-612.2.4.1-branch/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp	2021-09-08 23:56:21 UTC (rev 282184)
@@ -1745,7 +1745,8 @@
                     networkProcessIdentifier = networkProcessProxy->processIdentifier();
                     networkProcessState = networkProcessProxy->stateString();
                 }
-                RELEASE_ASSERT_NOT_REACHED_WITH_MESSAGE("WebsiteDataStore::getNetworkProcessConnection: Failed to get connection - networkProcessProxy=%p, networkProcessIdentifier=%d, processState=%s, webProcessProxy=%p, webProcessIdentifier=%d", networkProcessProxy.get(), networkProcessIdentifier, networkProcessState.utf8().data(), webProcessProxy.get(), webProcessProxy->processIdentifier());
+                RELEASE_LOG_ERROR(Process, "WebsiteDataStore::getNetworkProcessConnection: Failed to get connection - networkProcessProxy=%p, networkProcessIdentifier=%d, processState=%s, webProcessProxy=%p, webProcessIdentifier=%d", networkProcessProxy.get(), networkProcessIdentifier, networkProcessState.utf8().data(), webProcessProxy.get(), webProcessProxy->processIdentifier());
+                RELEASE_ASSERT_NOT_REACHED();
 #endif
             };
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to