<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - ChildProcessProxy::shutDownProcess calls Connection::terminateSoon even on invalid connections, but shouldn’t"
   href="https://bugs.webkit.org/show_bug.cgi?id=166397">166397</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>ChildProcessProxy::shutDownProcess calls Connection::terminateSoon even on invalid connections, but shouldn’t
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>WebKit
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>Other
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>Unspecified
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Unspecified
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Keywords</th>
          <td>NeedsRadar
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>Normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P2
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>WebKit2
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>webkit-unassigned&#64;lists.webkit.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>mitz&#64;webkit.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>I noticed that Web Content process crashes are sometimes followed by this being logged:

Unable to acquire assertion for process 0

This happens because the ProcessAssertion constructor gets called with a 0 pid, which comes from the connection to the crashed process, which is no longer valid. In this backtrace:

#0    0x0000000195b0d300 in WebKit::ProcessAssertion::ProcessAssertion(int, WebKit::AssertionState, WTF::Function&lt;void ()&gt;&amp;&amp;) at WebKit2/UIProcess/ios/ProcessAssertionIOS.mm:167
#1    0x0000000195b0da40 in WebKit::ProcessAndUIAssertion::ProcessAndUIAssertion(int, WebKit::AssertionState) at WebKit2/UIProcess/ios/ProcessAssertionIOS.mm:228
#2    0x0000000195a83f34 in std::__1::__unique_if&lt;WebKit::ProcessAndUIAssertion&gt;::__unique_single std::__1::make_unique&lt;WebKit::ProcessAndUIAssertion, int, WebKit::AssertionState&gt;(int&amp;&amp;, WebKit::AssertionState&amp;&amp;) [inlined] at /usr/bin/../include/c++/v1/memory:3153
#3    0x0000000195a83f18 in IPC::ConnectionTerminationWatchdog::ConnectionTerminationWatchdog(WTF::OSObjectPtr&lt;NSObject&lt;OS_xpc_object&gt;*&gt;&amp;, double) at WebKit2/Platform/IPC/mac/ConnectionMac.mm:93
#4    0x0000000195a82ff0 in IPC::ConnectionTerminationWatchdog::ConnectionTerminationWatchdog(WTF::OSObjectPtr&lt;NSObject&lt;OS_xpc_object&gt;*&gt;&amp;, double) [inlined] at WebKit2/Platform/IPC/mac/ConnectionMac.mm:95
#5    0x0000000195a82fe4 in IPC::ConnectionTerminationWatchdog::createConnectionTerminationWatchdog(WTF::OSObjectPtr&lt;NSObject&lt;OS_xpc_object&gt;*&gt;&amp;, double) at WebKit2/Platform/IPC/mac/ConnectionMac.mm:85
#6    0x0000000195a7c2c0 in WebKit::ChildProcessProxy::shutDownProcess() at WebKit2/UIProcess/ChildProcessProxy.cpp:196
#7    0x0000000195c52298 in WebKit::WebProcessProxy::shutDown() at WebKit2/UIProcess/WebProcessProxy.cpp:165
#8    0x0000000195c53dd4 in WebKit::WebProcessProxy::didClose(IPC::Connection&amp;) at WebKit2/UIProcess/WebProcessProxy.cpp:523

shutDownProcess() should not call Connection::terminateSoon if the connection is already invalid.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>