Bug 934641 - Switch ASan tests to using the low-memory config instead of the mid-memory config, to work around intermittent OOM failures, r=philor

This commit is contained in:
Christian Holler 2013-11-14 01:44:41 +01:00
parent 931cb49886
commit 2ec98848e2
2 changed files with 6 additions and 20 deletions

View File

@ -521,19 +521,12 @@ class Automation(object):
try: try:
totalMemory = int(os.popen("free").readlines()[1].split()[1]) totalMemory = int(os.popen("free").readlines()[1].split()[1])
# Only 2 GB RAM or less available? Use custom ASan options to reduce # Only 4 GB RAM or less available? Use custom ASan options to reduce
# the amount of resources required to do the tests. Standard options # the amount of resources required to do the tests. Standard options
# will otherwise lead to OOM conditions on the current test slaves. # will otherwise lead to OOM conditions on the current test slaves.
# if totalMemory <= 1024 * 1024 * 4:
# 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") self.log.info("INFO | automation.py | ASan running in low-memory configuration")
env["ASAN_OPTIONS"] = "quarantine_size=50331648:redzone=64" env["ASAN_OPTIONS"] = "quarantine_size=50331648"
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: else:
self.log.info("INFO | automation.py | ASan running in default memory configuration") self.log.info("INFO | automation.py | ASan running in default memory configuration")
except OSError,err: except OSError,err:

View File

@ -457,20 +457,13 @@ def environment(xrePath, env=None, crashreporter=True):
totalMemory = systemMemory() totalMemory = systemMemory()
# Only 2 GB RAM or less available? Use custom ASan options to reduce # Only 4 GB RAM or less available? Use custom ASan options to reduce
# the amount of resources required to do the tests. Standard options # the amount of resources required to do the tests. Standard options
# will otherwise lead to OOM conditions on the current test slaves. # 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.
message = "INFO | runtests.py | ASan running in %s configuration" message = "INFO | runtests.py | ASan running in %s configuration"
if totalMemory <= 1024 * 1024 * 2: if totalMemory <= 1024 * 1024 * 4:
message = message % 'low-memory' message = message % 'low-memory'
env["ASAN_OPTIONS"] = "quarantine_size=50331648:redzone=64" env["ASAN_OPTIONS"] = "quarantine_size=50331648"
elif totalMemory <= 1024 * 1024 * 4:
message = message % 'mid-memory'
env["ASAN_OPTIONS"] = "quarantine_size=80530636:redzone=64"
else: else:
message = message % 'default memory' message = message % 'default memory'
except OSError,err: except OSError,err: