Bug 285947
| Summary: | NetworkProcess does not always terminate properly on macOS | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Ben Nham <nham> |
| Component: | WebKit Process Model | Assignee: | Ben Nham <nham> |
| Status: | RESOLVED FIXED | ||
| Severity: | Normal | CC: | nham, webkit-bug-importer |
| Priority: | P2 | Keywords: | InRadar |
| Version: | WebKit Nightly Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
Ben Nham
NetworkProcess does not always terminate on macOS. The reason for this is that NetworkProcess can suspend in the middle of termination. NetworkProcess drops its "m_backgroundActivityToPreventSuspension" as part of the NetworkProcessProxy destructor, which allows it to suspend. Then, the AuxiliaryProcessProxy destructor runs and starts termination by invalidating via IPC::Connection::invalidate. However, the remote side of the connection invalidation in NetworkProcess (in NetworkProcess::didClose) might never run if the process is already suspended, which then leaves the process in a permanently suspended state. To fix this, we should use XPCConnectionTerminationWatchdog to resume the network process and allow it to gracefully exit, or forcefully terminate it after 30 seconds.
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Ben Nham
<rdar://problem/142838090>
Ben Nham
Pull request: https://github.com/WebKit/WebKit/pull/39026
EWS
Committed 289075@main (861148b958c3): <https://commits.webkit.org/289075@main>
Reviewed commits have been landed. Closing PR #39026 and removing active labels.