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

--HG--
extra : commitid : BYnLxAJBLMx
This commit is contained in:
Chris Manchester 2015-07-15 16:52:27 -07:00
Родитель 5d236ae788
Коммит 3b99269432
1 изменённых файлов: 9 добавлений и 20 удалений

Просмотреть файл

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