Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: dump correct breakpad symbols on macOS #19042

Merged
merged 11 commits into from Jul 5, 2019
Merged

fix: dump correct breakpad symbols on macOS #19042

merged 11 commits into from Jul 5, 2019

Conversation

nornagon
Copy link
Member

@nornagon nornagon commented Jun 28, 2019

Description of Change

The breakpad symbols we're currently generating on macOS only include exported symbols, which makes them approximately useless for symbolication. This mimics how Chromium generates breakpad symbols.

Checklist

Release Notes

Notes: Fixed macOS breakpad symbol files to include non-public symbols.

@electron-cation electron-cation bot added the new-pr 🌱 PR opened in the last 24 hours label Jun 28, 2019
@nornagon
Copy link
Member Author

(Draft state because I haven't yet integrated this into CI / release. But I've tested the GN targets and they work 👍)

@electron-cation electron-cation bot removed the new-pr 🌱 PR opened in the last 24 hours label Jun 29, 2019
@nornagon nornagon marked this pull request as ready for review July 1, 2019 23:57
@nornagon nornagon requested a review from a team as a code owner July 1, 2019 23:57
@nornagon
Copy link
Member Author

nornagon commented Jul 1, 2019

This is ready for review now. I've refactored how symbol generation works to avoid using the not-very-well-maintained generate_breakpad_symbols.py from Chromium, and to reduce the number of possible code paths. Now we just call dump_syms directly. Some logic was borrowed from generate_breakpad_symbols.py to generate the directory layout. And ninja now drives the invocation of dump_syms, allowing parallel execution.

Copy link
Contributor

@jkleinsc jkleinsc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The title of the PR says it is for macOS, but you are refactoring all of our symbol generation right?

@jkleinsc
Copy link
Contributor

jkleinsc commented Jul 2, 2019

Test release builds running here:
CircleCI release build request for mas-publish successful. Check https://circleci.com/gh/electron/electron/249751 for status.
CircleCI release build request for linux-ia32-publish successful. Check https://circleci.com/gh/electron/electron/249753 for status.
CircleCI release build request for linux-arm64-publish successful. Check https://circleci.com/gh/electron/electron/249755 for status.
CircleCI release build request for linux-x64-publish successful. Check https://circleci.com/gh/electron/electron/249756 for status.
CircleCI release build request for linux-arm-publish successful. Check https://circleci.com/gh/electron/electron/249752 for status.
CircleCI release build request for osx-publish successful. Check https://circleci.com/gh/electron/electron/249754 for status.
AppVeyor release build request for electron-x64 successful. Check build status at https://ci.appveyor.com/project/electron-bot/electron-x64-release/build/1.0.90
AppVeyor release build request for electron-ia32 successful. Check build status at https://ci.appveyor.com/project/electron-bot/electron-ia32-release/build/1.0.63

@@ -937,6 +937,76 @@ if (is_mac) {
"@executable_path/../Frameworks",
]
}

if (enable_dsyms) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This never appears to be set? Unless I'm missing a thing?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's set in Chromium's GN files.

@nornagon
Copy link
Member Author

nornagon commented Jul 2, 2019

The title of the PR says it is for macOS, but you are refactoring all of our symbol generation right?

It refactors all platforms, but only fixes macOS. Windows (and Linux I think? haven't checked) were already working

@deepak1556
Copy link
Member

@nornagon Should we backport this ? Seems like this must go all the way back to 4 ?

@nornagon
Copy link
Member Author

nornagon commented Jul 2, 2019

@deepak1556 probably, yeah.

Copy link
Contributor

@jkleinsc jkleinsc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like Windows is failing on:

loadDataForPdb and loadDataFromExe failed for -i
Open failed

See https://ci.appveyor.com/project/electron-bot/electron-ia32-release/builds/25699648
And

C:/Python27/python.exe ../../electron/build/dump_syms.py ./dump_syms.exe electron.exe breakpad_symbols gen/electron/electron_app_symbols.stamp
CoCreateInstance CLSID_DiaSource {E6756135-1E65-4D17-8576-610761398C3C} failed (msdia*.dll unregistered?)
Open failed
Traceback (most recent call last):
  File "../../electron/build/dump_syms.py", line 49, in <module>

See https://ci.appveyor.com/project/electron-bot/electron-x64-release/builds/25699649

Linux release builds are failing with a missing breakpad_symbols.zip, eg see: https://circleci.com/gh/electron/electron/249756

@@ -68,7 +68,7 @@ def main():
upload_electron(release, electron_zip, args)
if get_target_arch() != 'mips64el':
symbols_zip = os.path.join(OUT_DIR, SYMBOLS_NAME)
shutil.copy2(os.path.join(OUT_DIR, 'symbols.zip'), symbols_zip)
shutil.copy2(os.path.join(OUT_DIR, 'breakpad_symbols.zip'), symbols_zip)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where does this file actually get created?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oops, i started down a path of getting gn to make the zip file too but then half-undid it. i'll revert this to symbols.zip, which is what zip-symbols.py creates.

@jkleinsc
Copy link
Contributor

jkleinsc commented Jul 2, 2019

Release builds for testing:
CircleCI release build request for linux-arm-publish successful. Check https://circleci.com/gh/electron/electron/250205 for status.
CircleCI release build request for linux-x64-publish successful. Check https://circleci.com/gh/electron/electron/250207 for status.
CircleCI release build request for linux-ia32-publish successful. Check https://circleci.com/gh/electron/electron/250206 for status.
CircleCI release build request for mas-publish successful. Check https://circleci.com/gh/electron/electron/250204 for status.
CircleCI release build request for osx-publish successful. Check https://circleci.com/gh/electron/electron/250209 for status.
AppVeyor release build request for electron-x64 successful. Check build status at https://ci.appveyor.com/project/electron-bot/electron-x64-release/build/1.0.92
CircleCI release build request for linux-arm64-publish successful. Check https://circleci.com/gh/electron/electron/250208 for status.
AppVeyor release build request for electron-ia32 successful. Check build status at https://ci.appveyor.com/project/electron-bot/electron-ia32-release/build/1.0.65

@jkleinsc
Copy link
Contributor

jkleinsc commented Jul 2, 2019

Release builds here:
CircleCI release build request for linux-arm64-publish successful. Check https://circleci.com/gh/electron/electron/250481 for status.
CircleCI release build request for mas-publish successful. Check https://circleci.com/gh/electron/electron/250477 for status.
CircleCI release build request for linux-arm-publish successful. Check https://circleci.com/gh/electron/electron/250480 for status.
CircleCI release build request for linux-x64-publish successful. Check https://circleci.com/gh/electron/electron/250482 for status.
CircleCI release build request for linux-ia32-publish successful. Check https://circleci.com/gh/electron/electron/250479 for status.
CircleCI release build request for osx-publish successful. Check https://circleci.com/gh/electron/electron/250478 for status.
AppVeyor release build request for electron-ia32 successful. Check build status at https://ci.appveyor.com/project/electron-bot/electron-ia32-release/build/1.0.66
AppVeyor release build request for electron-x64 successful. Check build status at https://ci.appveyor.com/project/electron-bot/electron-x64-release/build/1.0.93

@jkleinsc
Copy link
Contributor

jkleinsc commented Jul 2, 2019

Release builds:
CircleCI release build request for linux-ia32-publish successful. Check https://circleci.com/gh/electron/electron/250690 for status.
CircleCI release build request for linux-x64-publish successful. Check https://circleci.com/gh/electron/electron/250687 for status.
CircleCI release build request for mas-publish successful. Check https://circleci.com/gh/electron/electron/250689 for status.
CircleCI release build request for linux-arm-publish successful. Check https://circleci.com/gh/electron/electron/250691 for status.
CircleCI release build request for linux-arm64-publish successful. Check https://circleci.com/gh/electron/electron/250688 for status.
CircleCI release build request for osx-publish successful. Check https://circleci.com/gh/electron/electron/250692 for status.
AppVeyor release build request for electron-ia32 successful. Check build status at https://ci.appveyor.com/project/electron-bot/electron-ia32-release/build/1.0.67
AppVeyor release build request for electron-x64 successful. Check build status at https://ci.appveyor.com/project/electron-bot/electron-x64-release/build/1.0.94

@jkleinsc
Copy link
Contributor

jkleinsc commented Jul 3, 2019

Release builds:
CircleCI release build request for linux-arm-publish successful. Check https://circleci.com/gh/electron/electron/251673 for status.
CircleCI release build request for linux-x64-publish successful. Check https://circleci.com/gh/electron/electron/251669 for status.
CircleCI release build request for linux-arm64-publish successful. Check https://circleci.com/gh/electron/electron/251674 for status.
CircleCI release build request for linux-ia32-publish successful. Check https://circleci.com/gh/electron/electron/251672 for status.
CircleCI release build request for osx-publish successful. Check https://circleci.com/gh/electron/electron/251670 for status.
CircleCI release build request for mas-publish successful. Check https://circleci.com/gh/electron/electron/251671 for status.
AppVeyor release build request for electron-ia32 successful. Check build status at https://ci.appveyor.com/project/electron-bot/electron-ia32-release/build/1.0.69
AppVeyor release build request for electron-x64 successful. Check build status at https://ci.appveyor.com/project/electron-bot/electron-x64-release/build/1.0.96

@trop
Copy link
Contributor

trop bot commented Jul 5, 2019

The backport process for this PR has been manually initiated,
sending your 1's and 0's to "5-0-x" here we go! :D

@jkleinsc
Copy link
Contributor

jkleinsc commented Jul 5, 2019

/trop run backport-to 6-0-x

@trop
Copy link
Contributor

trop bot commented Jul 5, 2019

The backport process for this PR has been manually initiated,
sending your 1's and 0's to "6-0-x" here we go! :D

@trop
Copy link
Contributor

trop bot commented Jul 5, 2019

I was unable to backport this PR to "5-0-x" cleanly;
you will need to perform this backport manually.

@trop
Copy link
Contributor

trop bot commented Jul 5, 2019

I was unable to backport this PR to "6-0-x" cleanly;
you will need to perform this backport manually.

@trop
Copy link
Contributor

trop bot commented Jul 8, 2019

A maintainer has manually backported this PR to "6-0-x", please check out #19155

@trop
Copy link
Contributor

trop bot commented Jul 8, 2019

A maintainer has manually backported this PR to "5-0-x", please check out #19157

@trop
Copy link
Contributor

trop bot commented Jul 8, 2019

A maintainer has manually backported this PR to "4-2-x", please check out #19158

@sofianguy sofianguy added this to Fixed in 6.0.0-beta.13 in 6.1.x Jul 10, 2019
@sofianguy sofianguy added this to Fixed in 5.0.7 in 5.0.x Jul 16, 2019

extract_symbols("swiftshader_gles_symbols") {
binary =
"$root_out_dir/swiftshader/libGLESv2$_target_shared_library_suffix"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nornagon The symbols for libGLESv2.dll are not present in Sentry even though the other Electron symbols are there. See: https://sentry.io/share/issue/d07971e24b74434f9d3bbfa520b47e0a/

Do you know why that may be? Are we failing to package libGLESv2.dll.pdb on Windows?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
5.0.x
Fixed in 5.0.7
6.1.x
Fixed in 6.0.0-beta.13
Development

Successfully merging this pull request may close these issues.

None yet

5 participants