Bug 194870 - IndexedDB: leak UniqueIDBDatabase in layout tests
Summary: IndexedDB: leak UniqueIDBDatabase in layout tests
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Sihui Liu
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2019-02-20 14:10 PST by Sihui Liu
Modified: 2019-02-21 15:06 PST (History)
8 users (show)

See Also:


Attachments
Patch (2.09 KB, patch)
2019-02-20 14:34 PST, Sihui Liu
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Sihui Liu 2019-02-20 14:10:41 PST
Example leak:

STACK OF 4 INSTANCES OF 'ROOT CYCLE: malloc<16>':
[thread 0x1146ea5c0]:
20  libdyld.dylib                         0x1102dfca1 start + 1
19  com.apple.WebKit                      0x10d7d506d 0x10d6db000 + 1024109
18  libxpc.dylib                          0x1105c5ca7 xpc_main + 143
17  libxpc.dylib                          0x1105c37d2 _xpc_objc_main + 555
16  com.apple.Foundation                  0x10d195200 -[NSRunLoop(NSRunLoop) run] + 76
15  com.apple.Foundation                  0x10d194fe0 -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 211
14  com.apple.CoreFoundation              0x10f52c9f2 CFRunLoopRunSpecific + 626
13  com.apple.CoreFoundation              0x10f52d24f __CFRunLoopRun + 1295
12  com.apple.CoreFoundation              0x10f532bcf __CFRunLoopDoSources0 + 255
11  com.apple.CoreFoundation              0x10f533391 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
10  com.apple.Foundation                  0x10d1ab910 __NSThreadPerformPerform + 331
9   JavaScriptCore                        0x113308a49 WTF::dispatchFunctionsFromMainThread() + 249  memory:2633
8   JavaScriptCore                        0x1132ec0ef WTF::CrossThreadTaskHandler::handleTaskRepliesOnMainThread() + 239  memory:2633
7   com.apple.WebCore                     0x1153e5cb4 WebCore::IDBServer::UniqueIDBDatabase::executeNextDatabaseTaskReply() + 196  UniqueIDBDatabase.cpp:1783
6   com.apple.WebCore                     0x1153d8221 WebCore::IDBServer::UniqueIDBDatabase::handleDatabaseOperations() + 65  UniqueIDBDatabase.cpp:375
5   com.apple.WebCore                     0x1153d9b34 WebCore::IDBServer::UniqueIDBDatabase::handleCurrentOperation() + 36  UniqueIDBDatabase.cpp:0
4   com.apple.WebCore                     0x1153d861b WebCore::IDBServer::UniqueIDBDatabase::performCurrentOpenOperation() + 635  memory:2603
3   com.apple.WebCore                     0x1153e76be WebCore::IDBServer::UniqueIDBDatabaseConnection::UniqueIDBDatabaseConnection(WebCore::IDBServer::UniqueIDBDatabase&, WebCore::IDBServer::ServerOpenDBRequest&) + 62  atomic:985
2   JavaScriptCore                        0x1132fb6a1 WTF::fastMalloc(unsigned long) + 97  Allocator.h:0
1   JavaScriptCore                        0x11336ee1c bmalloc::DebugHeap::malloc(unsigned long) + 12  DebugHeap.cpp:49
0   libsystem_malloc.dylib                0x110526bf8 malloc_zone_malloc + 139 
====
    83 (14.5K) << TOTAL >>
      ----
      19 (3.86K) ROOT CYCLE: 0x7f85daf00e40 [16]
         18 (3.84K) ROOT CYCLE: 0x7f85daf0c020 [768]
            CYCLE BACK TO 0x7f85daf00e40 [16]
            1 (48 bytes) ROOT CYCLE: 0x7f85daf0c500 [48]
            1 (32 bytes) ROOT CYCLE: 0x7f85daf02c10 [32]
            3 (848 bytes) 0x7f85daf02540 [48]
               2 (800 bytes) 0x7f85de902610 [768]
                  1 (32 bytes) 0x7f85daf051e0 [32]
            1 (432 bytes) 0x7f85daf13a10 [432]
            1 (432 bytes) 0x7f85daf14360 [432]
            1 (432 bytes) 0x7f85de804710 [432]
            1 (192 bytes) 0x7f85dac01550 [192]
            1 (192 bytes) 0x7f85daf0c3e0 [192]
            1 (128 bytes) 0x7f85dac025f0 [128]
            1 (128 bytes) 0x7f85dac09670 [128]
            1 (128 bytes) 0x7f85dad01fd0 [128]
            1 (64 bytes) 0x7f85daf00220 [64]
            1 (48 bytes) 0x7f85daf01d70 [48]
            1 (32 bytes) 0x7f85daf02430 [32]
            1 (32 bytes) 0x7f85daf02bf0 [32]
Comment 1 Sihui Liu 2019-02-20 14:31:44 PST
<rdar://problem/48163812>
Comment 2 Sihui Liu 2019-02-20 14:34:53 PST
Created attachment 362543 [details]
Patch
Comment 3 Geoffrey Garen 2019-02-20 15:48:08 PST
Comment on attachment 362543 [details]
Patch

r=me
Comment 4 WebKit Commit Bot 2019-02-21 15:06:28 PST
Comment on attachment 362543 [details]
Patch

Clearing flags on attachment: 362543

Committed r241913: <https://trac.webkit.org/changeset/241913>
Comment 5 WebKit Commit Bot 2019-02-21 15:06:30 PST
All reviewed patches have been landed.  Closing bug.