Skip to content

Commit

Permalink
Add how_to_get_stack_trace_for_builders.md
Browse files Browse the repository at this point in the history
This is helpful for anyone wants to find stack trace
on skylab builders.

Bug: 1380885
Change-Id: I79daf2c40721a88bd0ca7b10bc46a3baf5e0ce54
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4811704
Commit-Queue: Sven Zheng <svenzheng@chromium.org>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1188035}
  • Loading branch information
Sven Zheng authored and Chromium LUCI CQ committed Aug 24, 2023
1 parent 45de13d commit 5d9efcb
Show file tree
Hide file tree
Showing 5 changed files with 60 additions and 0 deletions.
60 changes: 60 additions & 0 deletions docs/lacros/how_to_get_stack_trace_for_builders.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# How to get stack trace for Chrome crashes on DUT builders

This doc is helpful for getting stack trace for skylab builders. It should
be the same process for both Ash and Lacros. Also it should be the same process
for Tast tests, Crosier and gtests.

## From the builder page

It should look like this
![shard]
Then you click the shard link to get to the chromeos builder page.

## Get the binary

On this page, on the right side 'Input properties', you should see the
'lacrosGcsPath'.
![gcs_path]
That path contains all the Chrome files that needed to run the test.

Note: For ash builders, the path name is still 'lacrosGcsPath'.

Download the files locally:
```
$ gsutil cp -r <lacros_gcs_path> ~/
```

## Get the dmp file
Click the testhaus link
![testhaus]
you should see the testhaus page which contains all the logs.
![dmp_file]
You need to find out the right dmp file. Usually if you're only debugging
1 test failure, you will see 2 dmp files due to test retries. You can randomly
select one to download.

## Get stack trace
This is the example commandline:
```
$ sudo mount lacros_compressed.squash /mnt
$ lldb /mnt/out/Release/chromeos_integration_tests -c ~/Downloads/<some_name>.dmp
(lldb) bt
```

For Tast test, replace the target from chromeos_integration_tests to chrome.

Note: Make sure you use the matching binary and dmp file. e.g. You don't want
to use the Ash chrome binary with a Lacros dmp file.

Final note: This doc is only for getting stack trace for the component under
test. That means if your builder build Lacros and lacros crashes, or build Ash
and Ash crashes, this workflow is helpful. But if your builder build Lacros and
causes Ash crashes, the workflow need to change. In theory you can get the
binary from the OS image under test, and dmp file in the same way and then get
stack trace. The author of this doc have not tried this so please help improve
this doc if you have information on this.

[shard]: images/shard.png
[testhaus]: images/testhaus.png
[dmp_file]: images/dmp_file.png
[gcs_path]: images/gcs_path.png
Binary file added docs/lacros/images/dmp_file.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/lacros/images/gcs_path.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/lacros/images/shard.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/lacros/images/testhaus.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 5d9efcb

Please sign in to comment.