WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
144971
Networking process on iOS can be suspended and never exit
https://bugs.webkit.org/show_bug.cgi?id=144971
Summary
Networking process on iOS can be suspended and never exit
Brady Eidson
Reported
2015-05-13 14:23:44 PDT
Networking process on iOS can be suspended and never exit This is for apps that use multiple WKProcessPools and sometimes deallocate a WKProcessPool that had an active Networking process. In those cases, the Networking process can be suspended instead of terminated, and once suspended it can no longer respond to further messages. Furthermore, calling RunLoop::main().stop() is not aggressive enough to actually terminate the process - _exit is bulletproof.
rdar://problem/20368630
Attachments
Patch v1
(12.36 KB, patch)
2015-05-13 14:32 PDT
,
Brady Eidson
no flags
Details
Formatted Diff
Diff
Patch v2
(12.28 KB, patch)
2015-05-13 15:15 PDT
,
Brady Eidson
no flags
Details
Formatted Diff
Diff
Patch v3
(12.34 KB, patch)
2015-05-13 15:32 PDT
,
Brady Eidson
no flags
Details
Formatted Diff
Diff
New patch v1
(18.46 KB, patch)
2015-05-15 16:11 PDT
,
Brady Eidson
darin
: review+
Details
Formatted Diff
Diff
Show Obsolete
(3)
View All
Add attachment
proposed patch, testcase, etc.
Brady Eidson
Comment 1
2015-05-13 14:24:40 PDT
Note: The bug exists on iOS, but the fix of having the Networking process explicitly kill itself instead of implicitly noticing an IPC::Connection close is reasonable to implement cross-platform
Brady Eidson
Comment 2
2015-05-13 14:32:55 PDT
Created
attachment 253060
[details]
Patch v1
Brady Eidson
Comment 3
2015-05-13 14:38:27 PDT
Apparently big changes to ProcessThrottler in the last couple of days. Updating and fixing the build.
Brady Eidson
Comment 4
2015-05-13 15:15:36 PDT
Created
attachment 253063
[details]
Patch v2
Brady Eidson
Comment 5
2015-05-13 15:32:59 PDT
Created
attachment 253067
[details]
Patch v3
Brady Eidson
Comment 6
2015-05-14 11:37:36 PDT
Comment on
attachment 253067
[details]
Patch v3 Sam, Gavin, and I looked at this in person and came up with a plan for even more changes. Removing r?
Brady Eidson
Comment 7
2015-05-15 16:11:05 PDT
Created
attachment 253235
[details]
New patch v1
Darin Adler
Comment 8
2015-05-17 10:03:15 PDT
Comment on
attachment 253235
[details]
New patch v1 View in context:
https://bugs.webkit.org/attachment.cgi?id=253235&action=review
r=me assuming you have a good way to test the new behavior
> Source/WebKit2/Shared/ChildProcess.cpp:166 > + // FIXME: Subclasses of ChildProcess should all have a chance to do some explicit cleanup > + // before the process is terminated.
I think this FIXME is too vague. What kinds of cleanup specifically are you thinking about? While this comment may be correct, I’m not sure we should have a FIXME here unless we know of some specific cleanup that is not being done at this time. We don’t need a FIXME about having a hook that we wouldn’t have a reason to do at this time.
> Source/WebKit2/Shared/ChildProcess.h:100 > + virtual void didReceiveMessage(IPC::Connection&, IPC::MessageDecoder&) override;
Can this override be private instead of protected?
Brady Eidson
Comment 9
2015-05-18 09:26:01 PDT
(In reply to
comment #8
)
> Comment on
attachment 253235
[details]
> New patch v1 > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=253235&action=review
> > r=me assuming you have a good way to test the new behavior
Indeed.
> > > Source/WebKit2/Shared/ChildProcess.cpp:166 > > + // FIXME: Subclasses of ChildProcess should all have a chance to do some explicit cleanup > > + // before the process is terminated. > > I think this FIXME is too vague. What kinds of cleanup specifically are you > thinking about? While this comment may be correct, I’m not sure we should > have a FIXME here unless we know of some specific cleanup that is not being > done at this time. We don’t need a FIXME about having a hook that we > wouldn’t have a reason to do at this time.
Fair enough.
> > Source/WebKit2/Shared/ChildProcess.h:100 > > + virtual void didReceiveMessage(IPC::Connection&, IPC::MessageDecoder&) override; > > Can this override be private instead of protected?
Nope - For now, the subclasses NetworkProcess and WebProcess call it directly from within their didReceiveMessage. We'll be working on a way to make that unnecessary in the future, at which point it can be private.
Brady Eidson
Comment 10
2015-05-18 10:55:08 PDT
http://trac.webkit.org/changeset/184503
Brady Eidson
Comment 11
2015-05-18 15:10:23 PDT
Fixed broken API tests in followup:
http://trac.webkit.org/changeset/184514
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug