Bug 902157 - ASan: Add memory configuration for 4 GB test slaves. r=jmaher
authorChristian Holler <choller@mozilla.com>
Tue, 06 Aug 2013 23:02:07 +0200
changeset 154613 a3e34b989ebe56661a6a29efb57d7084f6099f55
parent 154612 8427bf2c4652adbdc8a72f75ced906a93a8e047b
child 154614 afb4118f44792942d6661e7187f8599029c980ce
push id2961
push userlsblakk@mozilla.com
push dateMon, 28 Oct 2013 21:59:28 +0000
treeherdermozilla-beta@73ef4f13486f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjmaher
bugs902157
milestone26.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 902157 - ASan: Add memory configuration for 4 GB test slaves. r=jmaher
build/automation.py.in
--- a/build/automation.py.in
+++ b/build/automation.py.in
@@ -513,19 +513,28 @@ class Automation(object):
     # ASan specific environment stuff
     if self.IS_ASAN and (self.IS_LINUX or self.IS_MAC):
       try:
         totalMemory = int(os.popen("free").readlines()[1].split()[1])
 
         # Only 2 GB RAM or less available? Use custom ASan options to reduce
         # the amount of resources required to do the tests. Standard options 
         # will otherwise lead to OOM conditions on the current test slaves.
+        # 
+        # If we have more than 2 GB or RAM but still less than 4 GB, we need
+        # another set of options to prevent OOM in some memory-intensive
+        # tests.
         if totalMemory <= 1024 * 1024 * 2:
           self.log.info("INFO | automation.py | ASan running in low-memory configuration")
           env["ASAN_OPTIONS"] = "quarantine_size=50331648:redzone=64"
+        elif totalMemory <= 1024 * 1024 * 4:
+          self.log.info("INFO | automation.py | ASan running in mid-memory configuration")
+          env["ASAN_OPTIONS"] = "quarantine_size=100663296:redzone=64"
+        else:
+          self.log.info("INFO | automation.py | ASan running in default memory configuration")
       except OSError,err:
         self.log.info("Failed determine available memory, disabling ASan low-memory configuration: %s", err.strerror)
       except:
         self.log.info("Failed determine available memory, disabling ASan low-memory configuration")
 
     return env
 
   if IS_WIN32: