[Webkit-unassigned] [Bug 256935] New: WebKitTestRunner --world-leaks reports false positives

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed May 17 17:44:34 PDT 2023


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

            Bug ID: 256935
           Summary: WebKitTestRunner --world-leaks reports false positives
           Product: WebKit
           Version: WebKit Nightly Build
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: Tools / Tests
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: rreno at apple.com
                CC: webkit-bug-importer at group.apple.com

> run-webkit-tests --world-leaks fast/canvas/webgl/webgl2/bindings.html
> run-webkit-tests --world-leaks fast/canvas/webgl/webgl-reload-crash.html

These canvas tests will report a leaked document but it is not reproducible from MiniBrowser. If you navigate to the test then go to about:blank and issue a low memory warning followed by showAllDocuments, only the about:blank document and page are live.


I tried disabling the BackForwardCache and setting the CacheModel to DocumentBrowser in MiniBrowser to match WKTR but still cannot reproduce the leak. It appears the false positive is indeed due to a leaked document but I think there's something else going on. If you pause the test runner after it gets the list of live documents but before it finishes the test (TestController::didReceiveLiveDocumentsList) then ask for a GC heap dump the leaked document will be collected. Put a breakpoint in Document::~Document and issue the following command:

> notifyutil -p com.apple.WebKit.dumpGCHeap

While the WKTR process is paused the WebContent process will start a GC in response to the notification which will lead to the last JSEventTarget wrapper to be GC'd which will allow the Document to be destroyed. Something specific to WKTR must be keeping documents alive in some layout tests.

-- 
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/20230518/e90668a4/attachment.htm>


More information about the webkit-unassigned mailing list