Bug 145291 - Networking process sometimes suspended while WebContent runnable
Summary: Networking process sometimes suspended while WebContent runnable
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Gavin Barraclough
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2015-05-21 20:06 PDT by Gavin Barraclough
Modified: 2015-05-23 04:56 PDT (History)
1 user (show)

See Also:


Attachments
Fix (9.91 KB, patch)
2015-05-21 20:14 PDT, Gavin Barraclough
kling: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Gavin Barraclough 2015-05-21 20:06:49 PDT
There is an asymetry is how the Networking process suspension is managed. We drop the assertion (& suspend the process) whenever the WebProcess says it is ready to suspend, but we only take the assertion (& resume execution) when the WebContent process is actually resumed. This leaves a race – where the WebContent process was willing to be suspended, but the UI app cahnged its mind suspending it. Since the WebContent process never actually suspended (we only prepared it to), we never send a resume, and since we never resume, we never wake the Networking process.
Comment 1 Gavin Barraclough 2015-05-21 20:14:31 PDT
Created attachment 253574 [details]
Fix
Comment 2 Andreas Kling 2015-05-21 21:15:34 PDT
Comment on attachment 253574 [details]
Fix

View in context: https://bugs.webkit.org/attachment.cgi?id=253574&action=review

r=me

> Source/WebKit2/ChangeLog:9
> +        There is an asymetry is how the Networking process suspension is managed.

asymmetry is -> asymmetry in

> Source/WebKit2/ChangeLog:13
> +        the WebContent process was willing to be suspended, but the UI app cahnged

cahnged -> changed

> Source/WebKit2/UIProcess/WebProcessProxy.cpp:918
> +void WebProcessProxy::didSetAssertionState(AssertionState state)

I feel like some build will break because "state" is unused unless PLATFORM(IOS) && ENABLE(NETWORK_PROCESS).
Comment 3 Gavin Barraclough 2015-05-22 10:19:56 PDT
Committed revision 184774.
Comment 4 David Kilzer (:ddkilzer) 2015-05-23 04:56:34 PDT
<rdar://problem/21033029>