зеркало из https://github.com/mozilla/gecko-dev.git
Bug 606389 - when minidump_stack fails, show its error messages and/or exit code. r=ted, a=npotb
This commit is contained in:
Родитель
690c729115
Коммит
82fe1929dc
|
@ -115,10 +115,18 @@ def checkForCrashes(dumpDir, symbolsPath, testName=None):
|
||||||
for d in dumps:
|
for d in dumps:
|
||||||
log.info("PROCESS-CRASH | %s | application crashed (minidump found)", testName)
|
log.info("PROCESS-CRASH | %s | application crashed (minidump found)", testName)
|
||||||
if symbolsPath and stackwalkPath and os.path.exists(stackwalkPath):
|
if symbolsPath and stackwalkPath and os.path.exists(stackwalkPath):
|
||||||
nullfd = open(os.devnull, 'w')
|
p = subprocess.Popen([stackwalkPath, d, symbolsPath],
|
||||||
# eat minidump_stackwalk errors
|
stdout=subprocess.PIPE,
|
||||||
subprocess.call([stackwalkPath, d, symbolsPath], stderr=nullfd)
|
stderr=subprocess.PIPE)
|
||||||
nullfd.close()
|
(out, err) = p.communicate()
|
||||||
|
if len(out) > 3:
|
||||||
|
# minidump_stackwalk is chatty, so ignore stderr when it succeeds.
|
||||||
|
print out
|
||||||
|
else:
|
||||||
|
print "stderr from minidump_stackwalk:"
|
||||||
|
print err
|
||||||
|
if p.returncode != 0:
|
||||||
|
print "minidump_stackwalk exited with return code %d" % p.returncode
|
||||||
elif stackwalkCGI and symbolsPath and isURL(symbolsPath):
|
elif stackwalkCGI and symbolsPath and isURL(symbolsPath):
|
||||||
f = None
|
f = None
|
||||||
try:
|
try:
|
||||||
|
@ -131,7 +139,11 @@ def checkForCrashes(dumpDir, symbolsPath, testName=None):
|
||||||
datagen, headers = multipart_encode({"minidump": f,
|
datagen, headers = multipart_encode({"minidump": f,
|
||||||
"symbols": symbolsPath})
|
"symbols": symbolsPath})
|
||||||
request = urllib2.Request(stackwalkCGI, datagen, headers)
|
request = urllib2.Request(stackwalkCGI, datagen, headers)
|
||||||
print urllib2.urlopen(request).read()
|
result = urllib2.urlopen(request).read()
|
||||||
|
if len(result) > 3:
|
||||||
|
print result
|
||||||
|
else:
|
||||||
|
print "stackwalkCGI returned nothing."
|
||||||
finally:
|
finally:
|
||||||
if f:
|
if f:
|
||||||
f.close()
|
f.close()
|
||||||
|
|
Загрузка…
Ссылка в новой задаче