Bug 158894 - DatabaseProcess doesn't handle WebProcesses going away uncleanly
Summary: DatabaseProcess doesn't handle WebProcesses going away uncleanly
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Alex Christensen
URL:
Keywords:
Depends on:
Blocks: 149117
  Show dependency treegraph
 
Reported: 2016-06-17 17:37 PDT by Alex Christensen
Modified: 2016-06-22 16:52 PDT (History)
5 users (show)

See Also:


Attachments
Patch (5.05 KB, patch)
2016-06-17 17:37 PDT, Alex Christensen
no flags Details | Formatted Diff | Diff
Patch (18.65 KB, patch)
2016-06-22 16:08 PDT, Brady Eidson
achristensen: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Christensen 2016-06-17 17:37:35 PDT
IDB won't open any databases
Comment 1 Alex Christensen 2016-06-17 17:37:58 PDT
Created attachment 281599 [details]
Patch
Comment 2 Brady Eidson 2016-06-17 19:31:02 PDT
Comment on attachment 281599 [details]
Patch

r- because what is this
Comment 3 Brady Eidson 2016-06-22 13:15:51 PDT
DatabaseProcess doesn't handle WebProcesses going away uncleanly

This code:
void DatabaseToWebProcessConnection::didClose(IPC::Connection&)
{
#if ENABLE(INDEXED_DATABASE)
    // FIXME: (Modern IDB) The WebProcess has disconnected, close all of the connections associated with it
#endif
}

Yikes!
Comment 4 Brady Eidson 2016-06-22 13:17:08 PDT
This test case exacerbates the issue because it opens a new database connection each time through the test.

When a tab is closed in Safari, sometimes we shut down a few of those connections, but most just disappear without a trace, forever clogging the database process.
Comment 5 Brady Eidson 2016-06-22 14:22:10 PDT
As is the common thread lately, I have a straightforward fix, and writing a test will take awhile.
Comment 6 Brady Eidson 2016-06-22 16:08:06 PDT
Created attachment 281880 [details]
Patch
Comment 7 Brady Eidson 2016-06-22 16:46:33 PDT
http://trac.webkit.org
Comment 8 Brady Eidson 2016-06-22 16:52:26 PDT
http://trac.webkit.org/changeset/202359