[Webkit-unassigned] [Bug 75529] New: [Qt] SharedWorkers do not terminate after tests

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Jan 4 01:10:17 PST 2012


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

           Summary: [Qt] SharedWorkers do not terminate after tests
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: Unspecified
        OS/Version: Unspecified
            Status: UNCONFIRMED
          Severity: Normal
          Priority: P2
         Component: Layout and Rendering
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: Huszka.Nandor at stud.u-szeged.hu


Created an attachment (id=121079)
 --> (https://bugs.webkit.org/attachment.cgi?id=121079&action=review)
The fixing of the tests which use "normal" Workers and the checking in DumpRenderTreeQt.cpp

After a test is finished, DRT should check if there is a hanging worker and throw some error message.
I coded a checking in DumpRenderTree::dump in DumpRenderTreeQt.cpp. It tests the number of living workers in a loop, and if it is positive, calls the GC until there are stucked workers, but maximum five times. After all, DRT prints an error message with the number of workers, if they still live.
88 tests failed with this error. Essentially the cause of failing that they do not terminate the used workers. There is an attachment with the fixing (and the modification in DRT), it works well in 67 cases. An example:
...
var worker = new Worker(url);
...
function finishTest() {
    worker.terminate();
    // this function can be found in worker-util.js
    waitUntilWorkerThreadsExit(function() {
        if (window.layoutTestController)
            layoutTestController.notifyDone();
    });
}

SharedWorker does not have terminate method, it can only exits after there is no reference for it. I tried this when a test use a SharedWorker:
...
var worker = new SharedWorker(url);
...
function finishTest() {
    worker=null;
    // force a garbage collection
    gc();
    waitUntilWorkerThreadsExit(function() {
        if (window.layoutTestController)
            layoutTestController.notifyDone();
    });
}
In this case the test fails with timeout, because its worker does not terminate. Worker's reference was not passed, was not used any other place. Do yo have any idea why do not exit SharedWorkers?

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list