docs: Add instructions on how to symbolize Chrome crashes from Tast.
These instructions should let folks manually symbolize any Chrome
crash dumps generated during Tast tests on bots, which will make
test debugging a bit easier.
Bug: 1155738
Change-Id: I5cd9f11d53721b82fd23003d1f89c6e921a0a122
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2587583
Reviewed-by: Brian Sheedy <[email protected]>
Commit-Queue: Ben Pastene <[email protected]>
Cr-Commit-Position: refs/heads/master@{#836342}
diff --git a/docs/testing/chromeos_debugging_tips.md b/docs/testing/chromeos_debugging_tips.md
index afe581c..49bcbd25 100644
--- a/docs/testing/chromeos_debugging_tips.md
+++ b/docs/testing/chromeos_debugging_tips.md
@@ -35,6 +35,8 @@
matches the [system_logs/chrome/chrome_20201029-195153] browser log, which
contains the culprit Chrome crash and backtrace.
+- **Symbolizing a browser crash dump**: See [below](#symbolizing-a-crash-dump).
+
### Disabling a test
There a couple ways to disable a test on Chrome's builders:
@@ -50,6 +52,40 @@
In both cases, please make sure a bug is filed for the test, and route it to
the appropriate owners.
+### Symbolizing a crash dump
+
+If a test fails due to a browser crash, there should be a Minidump crash report
+present in the test's isolated out under the prefix `crashes/chrome...`. These
+reports aren't very useful by themselves, but with a few commands you can
+symbolize the report locally to get insight into what conditions caused Chrome
+to crash.
+
+To do so, first download both the task's input isolate (this provides the
+symbols and the symbolzing tools) as well as the task's output isolate (this
+provides the crash reports). See the commands listed under the *Reproducing the
+task locally* section on the task page. For example, to download them for
+[this task](https://chrome-swarming.appspot.com/task?id=506a01dd12c8a610), `cd`
+into a tmp directory and run:
+```
+$CHROME_DIR/tools/luci-go/isolated download -I https://chrome-isolated.appspot.com --namespace default-gzip -isolated 64919fee8b02d826df2401544a9dc0f7dfa2172d -output-dir input
+python $CHROME_DIR/tools/swarming_client/swarming.py collect -S chrome-swarming.appspot.com 506a01dd12c8a610 --task-output-dir output
+```
+
+Once both isolates have been fetched you must then generate the breakpad
+symbols by pointing the `generate_breakpad_symbols.py` script to the input's
+build dir:
+```
+python input/components/crash/content/tools/generate_breakpad_symbols.py --symbols-dir symbols --build-dir input/out/Release/ --binary input/out/Release/chrome
+```
+
+That will generate the symbols in the `symbols/` dir. Then to symbolize a Chrome
+crash report present in the task's output (such as
+`chrome.20201211.041043.31022.5747.dmp`):
+```
+./input/out/Release/minidump_stackwalk output/0/crashes/chrome.20201211.041043.31022.5747.dmp symbols/
+```
+
+
### Running a test locally
To run a Tast test the same way it's ran on Chrome's builders: