Android GN builds not including build id section in binary |
||||||||||||
Issue descriptionWhen building with GN, the -Wl,--build-id=sha1 flag is not passed to the linker (added to gyp in issue 498311). This means that GN builds can have build ID collisions making it impossible to decode crashes sensibly. See issue 594611 for an example where this happens in WebView M49.
,
Mar 15 2016
Primiano, is there anything we can do in breakpad/anywhere to call out when a binary doesn't have a proper build ID to prevent us making a similar mistake in future?
,
Mar 15 2016
Two possible ways: Get b/22628107 (not allowing duplicate GUIDs uploads server-side) fixed. In alternative, we could have a test that runs on release bots to check that the .gnu build-id section is present.
,
Mar 15 2016
cc'ing current stability sheriff as fyi
,
Mar 15 2016
hmm, While I fixed another bug, I got something like sha by head -n1 sym_file, and thought that the build ID. Currently, we can generate crash stack manually.
,
Mar 15 2016
The build ID has to be embedded in the binary for breakpad to find it and report it to the crash server. Yes, it will symbolise correctly if you manually download the symbols for the correct WebView version, convert them to breakpad format, and run microdump_stackwalk, but that doesn't work for crash or for the automated decoding tool :/
,
Mar 15 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/e67cbae553e592e7683aefc74c775f1e4a99296a commit e67cbae553e592e7683aefc74c775f1e4a99296a Author: Torne (Richard Coles) <torne@chromium.org> Date: Tue Mar 15 17:35:14 2016 Add gnu.build.id to shared libraries in GN. We were doing this in gyp builds but not GN; add this in the GN config too so that we can be sure crash symbols match. BUG= 594975 R=agrieve@chromium.org Review URL: https://codereview.chromium.org/1801073002 . Cr-Commit-Position: refs/heads/master@{#381242} [modify] https://crrev.com/e67cbae553e592e7683aefc74c775f1e4a99296a/build/config/android/BUILD.gn
,
Mar 15 2016
Requesting merge to M49 and M50. Should be a very simple safe change with no functional effects; just causes the linker to add an extra section that is only read by Breakpad during a crash, and matches what we already do in gyp builds.
,
Mar 15 2016
[Automated comment] Request affecting a post-stable build (M49), manual review required.
,
Mar 15 2016
Your change meets the bar and is auto-approved for M50 (branch: 2661)
,
Mar 15 2016
[Automated comment] Request affecting a post-stable build (M49), manual review required.
,
Mar 15 2016
Merge approved for M49 branch 2623.
,
Mar 15 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/d4c1f36bc7c8ec64fbc0507176fc3ce51adf38d1 commit d4c1f36bc7c8ec64fbc0507176fc3ce51adf38d1 Author: Torne (Richard Coles) <torne@chromium.org> Date: Tue Mar 15 18:24:54 2016 Add gnu.build.id to shared libraries in GN. We were doing this in gyp builds but not GN; add this in the GN config too so that we can be sure crash symbols match. BUG= 594975 R=agrieve@chromium.org Review URL: https://codereview.chromium.org/1801073002 . Cr-Commit-Position: refs/heads/master@{#381242} (cherry picked from commit e67cbae553e592e7683aefc74c775f1e4a99296a) Review URL: https://codereview.chromium.org/1801223002 . Cr-Commit-Position: refs/branch-heads/2661@{#243} Cr-Branched-From: ef6f6ae5e4c96622286b563658d5cd62a6cf1197-refs/heads/master@{#378081} [modify] https://crrev.com/d4c1f36bc7c8ec64fbc0507176fc3ce51adf38d1/build/config/android/BUILD.gn
,
Mar 15 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/4ab45db88c1cf6b88fac6c422e27d44f2ad942e0 commit 4ab45db88c1cf6b88fac6c422e27d44f2ad942e0 Author: Torne (Richard Coles) <torne@chromium.org> Date: Tue Mar 15 18:31:26 2016 Add gnu.build.id to shared libraries in GN. We were doing this in gyp builds but not GN; add this in the GN config too so that we can be sure crash symbols match. BUG= 594975 R=agrieve@chromium.org Review URL: https://codereview.chromium.org/1801073002 . Cr-Commit-Position: refs/heads/master@{#381242} (cherry picked from commit e67cbae553e592e7683aefc74c775f1e4a99296a) Review URL: https://codereview.chromium.org/1801243002 . Cr-Commit-Position: refs/branch-heads/2623@{#624} Cr-Branched-From: 92d77538a86529ca35f9220bd3cd512cbea1f086-refs/heads/master@{#369907} [modify] https://crrev.com/4ab45db88c1cf6b88fac6c422e27d44f2ad942e0/build/config/android/BUILD.gn
,
Mar 15 2016
Landed on trunk, M49 and M50. |
||||||||||||
►
Sign in to add a comment |
||||||||||||
Comment 1 by torne@chromium.org
, Mar 15 2016