⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 282174 in webkit


Ignore:
Timestamp:
Sep 8, 2021, 2:56:20 PM (5 years ago)
Author:
sihui_liu@apple.com
Message:

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):

Location:
trunk/Source/WebKit
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/ChangeLog

    r282170 r282174  
     12021-09-08  Sihui Liu  <sihui_liu@apple.com>
     2
     3        Remove responsiveness timer in NetworkProcessProxy::getNetworkProcessConnection
     4        https://bugs.webkit.org/show_bug.cgi?id=230016
     5        rdar://problem/80760179
     6
     7        Reviewed by Chris Dumez.
     8
     9        We've seen evidence that network process may be blocked in initializeNetworkProcess. Since we have a 3-second
     10        responsiveness timer in NetworkProcessProxy::getNetworkProcessConnection, blocked network process will be killed
     11        and a new network process will be launched for getting connection. However, the new network process may get
     12        stuck in initializeNetworkProcess too. In this case, web process will crash for not being able to get network
     13        process connection.
     14
     15        * UIProcess/Network/NetworkProcessProxy.cpp:
     16        (WebKit::NetworkProcessProxy::getNetworkProcessConnection):
     17        * UIProcess/WebsiteData/WebsiteDataStore.cpp: change RELEASE_ASSERT_NOT_REACHED_WITH_MESSAGE to
     18        RELEASE_LOG_ERROR as the message is not printed in non-debug build.
     19        (WebKit::WebsiteDataStore::getNetworkProcessConnection):
     20
    1212021-09-08  Sihui Liu  <sihui_liu@apple.com>
    222
  • trunk/Source/WebKit/UIProcess/Network/NetworkProcessProxy.cpp

    r282170 r282174  
    251251{
    252252    RELEASE_LOG(ProcessSuspension, "%p - NetworkProcessProxy is taking a background assertion because a web process is requesting a connection", this);
    253     startResponsivenessTimer(UseLazyStop::No);
     253    if (!isLaunching())
     254        startResponsivenessTimer(UseLazyStop::No);
    254255    sendWithAsyncReply(Messages::NetworkProcess::CreateNetworkConnectionToWebProcess { webProcessProxy.coreProcessIdentifier(), webProcessProxy.sessionID() }, [this, weakThis = makeWeakPtr(*this), reply = WTFMove(reply)](auto&& identifier, auto cookieAcceptPolicy) mutable {
    255256        if (!weakThis) {
  • trunk/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp

    r282170 r282174  
    17491749                    networkProcessState = networkProcessProxy->stateString();
    17501750                }
    1751                 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());
     1751                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());
     1752                RELEASE_ASSERT_NOT_REACHED();
    17521753#endif
    17531754            };
Note: See TracChangeset for help on using the changeset viewer.