[Webkit-unassigned] [Bug 168126] [GTK] WebProcess should run cleanup on quit to release resources

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Feb 10 10:41:03 PST 2017


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

--- Comment #1 from Olivier Blin <olivier.blin at softathome.com> ---
We could catch SIGINT in the WebProcess, as discussed on IRC with Zan and Konstantin a few months ago, but there is no ideal method to call to run the WebProcess exit.

If we add a SIGINT handler and do nothing more, the IPC connection close will eventually be detected.
But in release mode, WebProcess::didClose() does not run the WebPage cleanup.

After enabling the code that runs WebPage::close() in WebProcess::didClose(), the WebProcess will exit even earlier because of extra IPC failure checks:

#0  __GI_exit (status=0) at exit.c:104
#1  0x00007f914bceda79 in IPC::Connection::sendSyncMessage(unsigned long, std::unique_ptr<IPC::Encoder, std::default_delete<IPC::Encoder> >, WTF::Seconds, WTF::OptionSet<IPC::SendSyncOption>) () from libwebkit2gtk-4.0.so.37
#2  0x00007f914bdf35fb in bool IPC::Connection::sendSync<Messages::WebProcessProxy::ShouldTerminate>(Messages::WebProcessProxy::ShouldTerminate&&, Messages::WebProcessProxy::ShouldTerminate::Reply&&, unsigned long, WTF::Seconds, WTF::OptionSet<IPC::SendSyncOption>) () from libwebkit2gtk-4.0.so.37
#3  0x00007f914bdedec8 in WebKit::WebProcess::shouldTerminate() () from libwebkit2gtk-4.0.so.37
#4  0x00007f914bcfc4e3 in WebKit::ChildProcess::enableTermination() () from libwebkit2gtk-4.0.so.37
#5  0x00007f914be76da0 in WebKit::WebPage::close() () from libwebkit2gtk-4.0.so.37
#6  0x00007f914bdee178 in WebKit::WebProcess::didClose(IPC::Connection&) () from libwebkit2gtk-4.0.so.37

And if we call WebProcess::singleton().parentProcessConnection()->setShouldExitOnSyncMessageSendFailure(false) in the SIGINT handler, this leads to different crashes later on.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20170210/e8d23271/attachment.html>


More information about the webkit-unassigned mailing list