Bug 696009 and bug 695947 - frequent linux-pgo intermittent oranges since Bug 615976 (WebGL AA) landed - no review, fix bustage
authorBenoit Jacob <bjacob@mozilla.com>
Sat, 22 Oct 2011 13:48:47 -0400
changeset 79118 a0784cecf9bdbf8cb6dd14d948da8a877124d86a
parent 79117 7ba4cea5382dda70acbc94ac91013958d8dfaad7
child 79119 9fa7d2c8ec2d458c2bc9395e5a89973d3db52d1a
push id247
push usertim.taubert@gmx.de
push dateSat, 22 Oct 2011 19:08:15 +0000
treeherderfx-team@72bb20c484a2 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs696009, 695947, 615976, 617453
milestone10.0a1
Bug 696009 and bug 695947 - frequent linux-pgo intermittent oranges since Bug 615976 (WebGL AA) landed - no review, fix bustage We've seen frequent intermittent failures in WebGL tests since WebGL AA landed. This turns out to be OOM conditions leading to failure to create WebGL contexts, due to the fact that the JS engine keeps too many unreferenced WebGL contexts around before it decides to GC (bug 617453). This patch makes us trigger the GC before every WebGL test page (there are 300 of them) which has proved to solve the problem on tryserver, with 18 green runs without any orange: https://tbpl.mozilla.org/?tree=Try&rev=789cf49fdc63 Failures occured most of the time on 32bit linux-pgo but have been observed on 64bit too, see bug 695947 comment 6.
content/canvas/test/webgl/test_webgl_conformance_test_suite.html
--- a/content/canvas/test/webgl/test_webgl_conformance_test_suite.html
+++ b/content/canvas/test/webgl/test_webgl_conformance_test_suite.html
@@ -33,16 +33,36 @@ Mochitest version of the WebGL Conforman
     if (request.readyState != 4) {
       throw error;
     }
     return request.responseText;
   };
 
 function start() {
 
+  var kIsWindows = false;
+  var kIsMac = false;
+  var kIsLinux = false;
+  if (navigator.platform.indexOf("Win") == 0)
+    kIsWindows = true;
+  else if (navigator.platform.indexOf("Linux") == 0)
+    kIsLinux = true;
+  else if (navigator.platform.indexOf("Mac") == 0)
+    kIsMac = true;
+
+  var kIsWindowsVistaOrHigher = false;
+  if (kIsWindows) {
+    // code borrowed from browser/components/wintaskbar/test/browser_taskbar_preview.js
+    netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
+    var version = Components.classes["@mozilla.org/system-info;1"]
+                            .getService(Components.interfaces.nsIPropertyBag2)
+                            .getProperty("version");
+    kIsWindowsVistaOrHigher = (parseFloat(version) >= 6.0);
+  }
+
   function getEnv(env) {
     netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
     var envsvc = Components.classes["@mozilla.org/process/environment;1"].getService(Components.interfaces.nsIEnvironment);
     var val = envsvc.get(env);
     if (val == "")
       return null;
     return val;
   }
@@ -186,16 +206,20 @@ function start() {
     this.currentPage = new Page(this, url, this.resultElem);
     this.resultElem.appendChild(this.currentPage.elem);
     ++this.totalPages;
     this.pagesByURL[url] = this.currentPage;
   };
 
   Reporter.prototype.startPage = function(url) {
     dump('WebGL mochitest: starting page ' + url + '\n');
+    if (kIsLinux != -1) {
+      dump('Calling garbageCollect()\n');
+      SpecialPowers.DOMWindowUtils.garbageCollect();
+    }
     var page = this.pagesByURL[url];
     this.currentPage = page;
     statusTextNode.textContent = 'Running URL: ' + url;
     expectedtofailTextNode.textContent = testsExpectedToFail.length +
                                          ' test pages are expected to fail out of ' +
                                          this.totalPages;
     ignoredtestsTextNode.textContent = testsToIgnore.length +
                                          ' test pages have their results ignored';
@@ -286,38 +310,16 @@ function start() {
         dump("WebGL mochitest failed: " + errmsg + "\n");
         reporter.finishedTestSuite();
     }
   };
 
   SimpleTest.waitForExplicitFinish();
   SimpleTest.requestLongerTimeout(3);
 
-  var kIsWindows = false;
-  var kIsMac = false;
-  var kIsLinux = false;
-  if (navigator.platform.indexOf("Win") == 0)
-    kIsWindows = true;
-  else if (navigator.platform.indexOf("Linux") == 0)
-    kIsLinux = true;
-  else if (navigator.platform.indexOf("Mac") == 0)
-    kIsMac = true;
-
-  var kIsWindowsVistaOrHigher = false;
-  // we currently disable this test on versions of Windows older than Windows Vista,
-  // due to failure to load ANGLE on win 2003 test slaves, see bug 582053.
-  if (kIsWindows) {
-    // code borrowed from browser/components/wintaskbar/test/browser_taskbar_preview.js
-    netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
-    var version = Components.classes["@mozilla.org/system-info;1"]
-                            .getService(Components.interfaces.nsIPropertyBag2)
-                            .getProperty("version");
-    kIsWindowsVistaOrHigher = (parseFloat(version) >= 6.0);
-  }
-
   // we currently disable this test on version of Mac OSX older than 10.6,
   // due to various weird failures, including one making getRenderbufferParameter tests
   // on DEPTH_STENCIL fail
   if (kIsMac) {
     // code borrowed from browser/components/wintaskbar/test/browser_taskbar_preview.js
     var is106orHigher = false;
     netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
     var version = Components.classes["@mozilla.org/system-info;1"]