Update symbolicate_dump to try debug_breakpad.tar.xz first.
If debug_breakpad.tar.xz does not exist for the build, fall back to debug.tgz.
BUG=chromium:623739
TEST=unittest, local run devserver
import common
from autotest_lib.client.common_lib.cros import dev_server
server = 'http://localhost:8080'
devserver = dev_server.CrashServer(server)
minidump_path = '205635.5298.dmp'
build = 'veyron-release/R55-8803.0.0'
trace_text = devserver.symbolicate_dump(minidump_path, build)
Change-Id: Ieb0d1eacc2876eb766f42066fb38c4e5ba34e331
Reviewed-on: https://chromium-review.googlesource.com/393228
Commit-Ready: Dan Shi <dshi@google.com>
Tested-by: Dan Shi <dshi@google.com>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
diff --git a/devserver.py b/devserver.py
index 39b4dfb..d06257c 100755
--- a/devserver.py
+++ b/devserver.py
@@ -1080,11 +1080,18 @@
archive_url: Google Storage URL for the build.
minidump: The binary minidump file to symbolicate.
"""
- kwargs['artifacts'] = 'symbols'
- dl = _get_downloader(kwargs)
-
# Ensure the symbols have been staged.
- if self.stage(**kwargs) != 'Success':
+ # Try debug.tar.xz first, then debug.tgz
+ for artifact in (artifact_info.SYMBOLS_ONLY, artifact_info.SYMBOLS):
+ kwargs['artifacts'] = artifact
+ dl = _get_downloader(kwargs)
+
+ try:
+ if self.stage(**kwargs) == 'Success':
+ break
+ except build_artifact.ArtifactDownloadError:
+ continue
+ else:
raise DevServerError('Failed to stage symbols for %s' %
dl.DescribeSource())