[Webkit-unassigned] [Bug 137139] New: Failed to run SunSpider 1.0.2 in Chrome

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Sep 25 22:31:30 PDT 2014


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

           Summary: Failed to run SunSpider 1.0.2 in Chrome
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: Unspecified
        OS/Version: Unspecified
            Status: NEW
          Severity: Major
          Priority: P1
         Component: Tools / Tests
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: yang.gu at intel.com


I tried both Chrome for Linux and Android, and it had high possibility I could not get the final result. The reason is though we should have 26 cases for each round, but actually I could not get the results of all the them. If some of them are "undefined", the results.html could not parse the result. The issue is very easy to reproduce if you directly (not using web server) run sunspider 1.0.2  in Chrome. 

The root cause as I think is below: 
Snippet of code in function next and recordResult

function next()
{
...
    testFrame.contentDocument.open();
    testFrame.contentDocument.write(testContents[testIndex]);
    testFrame.contentDocument.close();
    window.setTimeout(next, 0);
...
}

function recordResult(time)
{
    if (currentRepeat >= 0) // negative repeats are warmups
        output[currentRepeat][tests[testIndex]] = time;
}

Chrome uses standalone process to handle iframe. Thus there is a race condition here that before the recordResult is executed, function next is triggered in a new round and the iframe is filled with new content. The result from previous round gets no chance to be recorded. 

I changed the logic as below (will send out a patch), and everything recovers for me. 

function next()
{
...
    testFrame.contentDocument.open();
    testFrame.contentDocument.write(testContents[testIndex]);
    testFrame.contentDocument.close();
...
}

function recordResult(time)
{
    if (currentRepeat >= 0) // negative repeats are warmups
        output[currentRepeat][tests[testIndex]] = time;

    window.setTimeout(next, 0);
}

Please verify this issue.

-- 
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