Bug 890026 - Use kill_and_get_minidump in place of crashinject.exe in mochitest so we can stacks from more hangs. r=ted

This commit is contained in:
Chris Manchester 2015-07-15 16:52:27 -07:00
parent 211fc2b935
commit 8b56298543

View File

@ -1577,26 +1577,15 @@ class Mochitest(MochitestUtilsMixin):
self.dumpScreen(utilityPath)
if mozinfo.info.get('crashreporter', True) and not debuggerInfo:
if mozinfo.isWin:
# We should have a "crashinject" program in our utility path
crashinject = os.path.normpath(
os.path.join(
utilityPath,
"crashinject.exe"))
if os.path.exists(crashinject):
status = subprocess.Popen(
[crashinject, str(processPID)]).wait()
printstatus(status, "crashinject")
if status == 0:
return
else:
try:
os.kill(processPID, signal.SIGABRT)
except OSError:
# https://bugzilla.mozilla.org/show_bug.cgi?id=921509
self.log.info(
"Can't trigger Breakpad, process no longer exists")
return
try:
minidump_path = os.path.join(self.profile.profile,
'minidumps')
mozcrash.kill_and_get_minidump(processPID, minidump_path)
except OSError:
# https://bugzilla.mozilla.org/show_bug.cgi?id=921509
self.log.info(
"Can't trigger Breakpad, process no longer exists")
return
self.log.info("Can't trigger Breakpad, just killing process")
killPid(processPID, self.log)