New issue
Advanced search Search tips

Issue 755016 link

Starred by 4 users

Issue metadata

Status: Fixed
Owner:
Closed: Aug 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Fuchsia
Pri: 2
Type: Bug



Sign in to add a comment

runner_common.py symbolization is fragile and mis-attributes stack entries

Project Member Reported by w...@chromium.org, Aug 13 2017

Issue description

Our host-side symbolization has some issues which make working with the symbolized stacks more difficult, and tests slower than is necessary.

- Regardless of the guest-side binary a frame is from, the running exe is assumed, and listed.
- Only the main executable is stripped; auxiliary executables remain humongous.
- Backtrace regex does not catch the special-case of zero pc or sp, which are expressed without the 0x hex prefix.
- When a symbol cannot be resolved, we re-synthesize the backtrace output.

 

Comment 1 by w...@chromium.org, Aug 13 2017

Cc: scottmg@chromium.org

Comment 2 Deleted

Comment 3 by w...@chromium.org, Aug 14 2017

Components: Test Internals>PlatformIntegration
Project Member

Comment 4 by bugdroid1@chromium.org, Aug 15 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/af464a96f07d7b7cc1d82a6d2c8b3a7eab48815e

commit af464a96f07d7b7cc1d82a6d2c8b3a7eab48815e
Author: Wez <wez@chromium.org>
Date: Tue Aug 15 01:33:01 2017

Improve symbolization to find symbols based on the guest-side file path.

- Update base::StackTrace output to more closely match crashlogger's.
- Separates file-gathering, stripping and manifest-writing steps.
- BuildBootfs() now returns both the bootfs and a file-mapping from
  target paths to the un-stripped binaries, to use in symbolization.
- Symbolization works for all binaries in the file-mapping, and copes
  with filename truncation, provided the truncated name is still unique.
- Strips all x-sharedlib binaries encountered, not just the main one.
- Reworks the line processing to simplify the regex's, including using
  named groups for clarity.
- If backtrace parsing or symbolization fail then the unsymbolized line
  is output instead, for ease in spotting when things fail.

Bug:  755016 
Change-Id: I51f68ae83a123ac17c870d849da94ca87294ebcb
Reviewed-on: https://chromium-review.googlesource.com/613843
Commit-Queue: Wez <wez@chromium.org>
Reviewed-by: Kevin Marshall <kmarshall@chromium.org>
Reviewed-by: Scott Graham <scottmg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#494295}
[modify] https://crrev.com/af464a96f07d7b7cc1d82a6d2c8b3a7eab48815e/base/debug/stack_trace_fuchsia.cc
[modify] https://crrev.com/af464a96f07d7b7cc1d82a6d2c8b3a7eab48815e/build/fuchsia/exe_runner.py
[modify] https://crrev.com/af464a96f07d7b7cc1d82a6d2c8b3a7eab48815e/build/fuchsia/runner_common.py
[modify] https://crrev.com/af464a96f07d7b7cc1d82a6d2c8b3a7eab48815e/build/fuchsia/test_runner.py

Project Member

Comment 5 by bugdroid1@chromium.org, Aug 15 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/fa6c47d85571e0a3825688c7f670410cced04e71

commit fa6c47d85571e0a3825688c7f670410cced04e71
Author: Wez <wez@chromium.org>
Date: Tue Aug 15 02:21:32 2017

Revert "Improve symbolization to find symbols based on the guest-side file path."

This reverts commit af464a96f07d7b7cc1d82a6d2c8b3a7eab48815e.

Reason for revert: Our bots do not have the "magic" module for file-typing, so this breaks them.

Original change's description:
> Improve symbolization to find symbols based on the guest-side file path.
> 
> - Update base::StackTrace output to more closely match crashlogger's.
> - Separates file-gathering, stripping and manifest-writing steps.
> - BuildBootfs() now returns both the bootfs and a file-mapping from
>   target paths to the un-stripped binaries, to use in symbolization.
> - Symbolization works for all binaries in the file-mapping, and copes
>   with filename truncation, provided the truncated name is still unique.
> - Strips all x-sharedlib binaries encountered, not just the main one.
> - Reworks the line processing to simplify the regex's, including using
>   named groups for clarity.
> - If backtrace parsing or symbolization fail then the unsymbolized line
>   is output instead, for ease in spotting when things fail.
> 
> Bug:  755016 
> Change-Id: I51f68ae83a123ac17c870d849da94ca87294ebcb
> Reviewed-on: https://chromium-review.googlesource.com/613843
> Commit-Queue: Wez <wez@chromium.org>
> Reviewed-by: Kevin Marshall <kmarshall@chromium.org>
> Reviewed-by: Scott Graham <scottmg@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#494295}

TBR=wez@chromium.org,kmarshall@chromium.org,scottmg@chromium.org

Change-Id: Ibbfc073e213637f7fb0fb0a2e4be548fae62aa17
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug:  755016 
Reviewed-on: https://chromium-review.googlesource.com/615100
Reviewed-by: Wez <wez@chromium.org>
Commit-Queue: Wez <wez@chromium.org>
Cr-Commit-Position: refs/heads/master@{#494304}
[modify] https://crrev.com/fa6c47d85571e0a3825688c7f670410cced04e71/base/debug/stack_trace_fuchsia.cc
[modify] https://crrev.com/fa6c47d85571e0a3825688c7f670410cced04e71/build/fuchsia/exe_runner.py
[modify] https://crrev.com/fa6c47d85571e0a3825688c7f670410cced04e71/build/fuchsia/runner_common.py
[modify] https://crrev.com/fa6c47d85571e0a3825688c7f670410cced04e71/build/fuchsia/test_runner.py

Project Member

Comment 6 by bugdroid1@chromium.org, Aug 15 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/ebb64f8e585ffb3923eee174c080f5ead800e6fb

commit ebb64f8e585ffb3923eee174c080f5ead800e6fb
Author: Wez <wez@chromium.org>
Date: Tue Aug 15 15:51:33 2017

Reland "Improve symbolization to find symbols based on the guest-side file path."

This is a reland of af464a96f07d7b7cc1d82a6d2c8b3a7eab48815e, replacing the
magic ELF detection with something less arcane.

Original change's description:
> Improve symbolization to find symbols based on the guest-side file path.
> 
> - Update base::StackTrace output to more closely match crashlogger's.
> - Separates file-gathering, stripping and manifest-writing steps.
> - BuildBootfs() now returns both the bootfs and a file-mapping from
>   target paths to the un-stripped binaries, to use in symbolization.
> - Symbolization works for all binaries in the file-mapping, and copes
>   with filename truncation, provided the truncated name is still unique.
> - Strips all x-sharedlib binaries encountered, not just the main one.
> - Reworks the line processing to simplify the regex's, including using
>   named groups for clarity.
> - If backtrace parsing or symbolization fail then the unsymbolized line
>   is output instead, for ease in spotting when things fail.
> 
> Bug:  755016 
> Change-Id: I51f68ae83a123ac17c870d849da94ca87294ebcb
> Reviewed-on: https://chromium-review.googlesource.com/613843
> Commit-Queue: Wez <wez@chromium.org>
> Reviewed-by: Kevin Marshall <kmarshall@chromium.org>
> Reviewed-by: Scott Graham <scottmg@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#494295}

TBR: kmarshall, scottmg
Bug:  755016 
Change-Id: If72665761db2a8faa92ee9f8e493592f713c4ce9
Reviewed-on: https://chromium-review.googlesource.com/615101
Reviewed-by: Wez <wez@chromium.org>
Commit-Queue: Wez <wez@chromium.org>
Cr-Commit-Position: refs/heads/master@{#494391}
[modify] https://crrev.com/ebb64f8e585ffb3923eee174c080f5ead800e6fb/base/debug/stack_trace_fuchsia.cc
[modify] https://crrev.com/ebb64f8e585ffb3923eee174c080f5ead800e6fb/build/fuchsia/exe_runner.py
[modify] https://crrev.com/ebb64f8e585ffb3923eee174c080f5ead800e6fb/build/fuchsia/runner_common.py
[modify] https://crrev.com/ebb64f8e585ffb3923eee174c080f5ead800e6fb/build/fuchsia/test_runner.py

Project Member

Comment 7 by bugdroid1@chromium.org, Aug 15 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/6ceb172df387f90609dbe27c59c3d40c8c7af8cc

commit 6ceb172df387f90609dbe27c59c3d40c8c7af8cc
Author: Wez <wez@chromium.org>
Date: Tue Aug 15 16:58:02 2017

Scope file-open when looking for ELF tag.

Bug:  755016 
Change-Id: Ia8c0293bd84cc74e5542601aec26435aa4fa011b
Reviewed-on: https://chromium-review.googlesource.com/615227
Commit-Queue: Scott Graham <scottmg@chromium.org>
Reviewed-by: Scott Graham <scottmg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#494416}
[modify] https://crrev.com/6ceb172df387f90609dbe27c59c3d40c8c7af8cc/build/fuchsia/runner_common.py

Project Member

Comment 8 by bugdroid1@chromium.org, Aug 15 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/d92d6e30ca54d4f4c32fcfced4dd6803ac034486

commit d92d6e30ca54d4f4c32fcfced4dd6803ac034486
Author: Scott Graham <scottmg@chromium.org>
Date: Tue Aug 15 17:36:34 2017

fuchsia: fix --dry-run in runner_common.py

After https://chromium.googlesource.com/chromium/src.git/+/ebb64f8e585ffb3923eee174c080f5ead800e6fb

Bug: 706592,  755016 
Change-Id: I68e582dee653be32d4217ba1a9e07946c4ec9885
Reviewed-on: https://chromium-review.googlesource.com/614870
Reviewed-by: Wez <wez@chromium.org>
Commit-Queue: Wez <wez@chromium.org>
Cr-Commit-Position: refs/heads/master@{#494430}
[modify] https://crrev.com/d92d6e30ca54d4f4c32fcfced4dd6803ac034486/build/fuchsia/runner_common.py

Project Member

Comment 9 by bugdroid1@chromium.org, Aug 15 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/628d447f11cddbefb6d4447dcbe67da5e3ae14c9

commit 628d447f11cddbefb6d4447dcbe67da5e3ae14c9
Author: Scott Graham <scottmg@chromium.org>
Date: Tue Aug 15 20:31:18 2017

fuchsia: Restore path filename in backtrace, output relative to source root

Not being able to copy-paste the filename bugs me (i.e. having only
basename), do you think this is a reasonable middle ground?

Bug:  755016 
Change-Id: I9b09c614bf4f6c97aa7f1d3423082becfdb18f35
Reviewed-on: https://chromium-review.googlesource.com/615821
Reviewed-by: Wez <wez@chromium.org>
Commit-Queue: Scott Graham <scottmg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#494523}
[modify] https://crrev.com/628d447f11cddbefb6d4447dcbe67da5e3ae14c9/build/fuchsia/runner_common.py

Comment 10 by w...@chromium.org, Aug 15 2017

Status: Fixed (was: Started)

Sign in to add a comment