Bug 193097

Summary: IndexedDB: leak WebIDBConnectionToClient for retain cycle
Product: WebKit Reporter: Sihui Liu <sihui_liu>
Component: New BugsAssignee: Sihui Liu <sihui_liu>
Status: RESOLVED FIXED    
Severity: Normal CC: alecflett, beidson, commit-queue, ddkilzer, ews-watchlist, jsbell, tsavell, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch for landing
none
Patch none

Description Sihui Liu 2019-01-02 17:29:12 PST
WebIDBConnectionToClient and NetworkConnectionToWebProcess have reference to each other.
Comment 1 Sihui Liu 2019-01-02 17:29:57 PST
<rdar://problem/46899601>
Comment 2 Sihui Liu 2019-01-03 12:52:54 PST
Created attachment 358271 [details]
Patch
Comment 3 Sihui Liu 2019-01-11 12:38:36 PST
Created attachment 358930 [details]
Patch for landing
Comment 4 WebKit Commit Bot 2019-01-11 17:12:05 PST
Comment on attachment 358930 [details]
Patch for landing

Clearing flags on attachment: 358930

Committed r239887: <https://trac.webkit.org/changeset/239887>
Comment 5 WebKit Commit Bot 2019-01-11 17:12:06 PST
All reviewed patches have been landed.  Closing bug.
Comment 6 Truitt Savell 2019-01-14 15:25:21 PST
It appears that the changes in https://trac.webkit.org/changeset/239887/webkit
caused another API failure and Timeout. These are only present on Debug

TestWebKitAPI.IndexedDB.IndexedDBMultiProcess
        _RegisterApplication(), FAILED TO establish the default connection to the WindowServer, _CGSDefaultConnection() is NULL.
        _RegisterApplication(), FAILED TO establish the default connection to the WindowServer, _CGSDefaultConnection() is NULL.
        _RegisterApplication(), FAILED TO establish the default connection to the WindowServer, _CGSDefaultConnection() is NULL.

        /Volumes/Data/worker/liberty-debug-archive/build/OpenSource/Tools/TestWebKitAPI/Tests/WebKitCocoa/IndexedDBMultiProcess.mm:113
        Expected equality of these values:
          @"Deleted!"
            Which is: "Deleted!"
          string7.get()
            Which is: "Unexpected error opening database"

Timeout

    TestWebKitAPI.IndexedDB.WebProcessKillIDBCleanup

Log:
https://build.webkit.org/builders/Apple%20High%20Sierra%20Debug%20WK2%20%28Tests%29/builds/6187/steps/run-api-tests/logs/stdio

Confirmed using:
run-api-tests --no-build --debug --root debug-239887
Comment 7 Sihui Liu 2019-01-15 19:55:59 PST
Caused some API tests to fail.
Comment 8 Sihui Liu 2019-01-15 20:02:39 PST
Created attachment 359249 [details]
Patch
Comment 9 David Kilzer (:ddkilzer) 2019-01-16 01:31:57 PST
Comment on attachment 359249 [details]
Patch

r=me
Comment 10 WebKit Commit Bot 2019-01-16 09:11:53 PST
Comment on attachment 359249 [details]
Patch

Clearing flags on attachment: 359249

Committed r240039: <https://trac.webkit.org/changeset/240039>
Comment 11 WebKit Commit Bot 2019-01-16 09:11:55 PST
All reviewed patches have been landed.  Closing bug.