[Webkit-unassigned] [Bug 241583] Make sure WebPageProxy doesn't leak though strong references in async IPC callbacks

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Jun 14 05:22:48 PDT 2022


https://bugs.webkit.org/show_bug.cgi?id=241583

--- Comment #1 from Michael Catanzaro <mcatanzaro at gnome.org> ---
>From bug #241353:

(In reply to Yury Semikhatsky from comment #6)
> Another thing that may be worth implementing is killing stopped web
> processes if the UI process exits while some of the WebProcessProxy objects
> are still alive (intentionally due to the embedder logic or unintentionally
> due to bugs like this). As far as I understand, normally closing the UI
> process will close one end of the IPC connection and the Web process will
> exit as a result. However, if the WebProcess is stopped it will not react to
> the state changes of the IPC pipe and will keep hanging.

That's correct, the subprocesses terminate when they notice that their IPC connection to the UI process has closed. If the subprocess is stopped, that will (obviously) never happen. I think it would suffice to send all subprocesses SIGCONT when the UI process terminates, but that won't work if the UI process crashes.

I'm afraid that to manage this robustly, we've likely reached the point where we need a manager process that does nothing except check whether the UI process is alive and SIGCONT the subprocesses if it dies. Linux has prctl(SET_PDEATHSIG) that in theory could be used to send SIGCONT automatically, but last I checked it seems to be unreliable or broken in practice, and other Unix OSes don't have this. Not sure what's available on macOS/iOS.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20220614/94d4ec11/attachment-0001.htm>


More information about the webkit-unassigned mailing list