Skip to content

fix: dump correct breakpad symbols on macOS - #19042

Merged
jkleinsc merged 11 commits into
masterfrom
mac-dump-syms
Jul 5, 2019
Merged

jkleinsc merged 11 commits into
masterfrom
mac-dump-syms

Conversation

@nornagon

@nornagon nornagon commented Jun 28, 2019 •

Copy link
Copy Markdown
Contributor

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 recently label Jun 28, 2019
@nornagon

Copy link
Copy Markdown
Contributor 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 recently 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

nornagon commented Jul 1, 2019

Copy link
Copy Markdown
Contributor Author

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.

@jkleinsc jkleinsc left a comment

Copy link
Copy Markdown
Member

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

jkleinsc commented Jul 2, 2019

Copy link
Copy Markdown
Member

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

Comment thread BUILD.gn
]
}

if (enable_dsyms) {

Copy link
Copy Markdown
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
Copy Markdown
Contributor 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

nornagon commented Jul 2, 2019

Copy link
Copy Markdown
Contributor Author

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
Copy Markdown
Member

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

@nornagon

nornagon commented Jul 2, 2019

Copy link
Copy Markdown
Contributor Author

@deepak1556 probably, yeah.

@jkleinsc jkleinsc left a comment

Copy link
Copy Markdown
Member

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

Comment thread script/release/uploaders/upload.py Outdated
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
Copy Markdown
Member

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
Copy Markdown
Contributor 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

jkleinsc commented Jul 2, 2019

Copy link
Copy Markdown
Member

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

jkleinsc commented Jul 2, 2019 •

Copy link
Copy Markdown
Member

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

jkleinsc commented Jul 2, 2019

Copy link
Copy Markdown
Member

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

jkleinsc commented Jul 3, 2019

Copy link
Copy Markdown
Member

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

trop Bot commented Jul 5, 2019

Copy link
Copy Markdown
Contributor

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

jkleinsc commented Jul 5, 2019

Copy link
Copy Markdown
Member

/trop run backport-to 6-0-x

@trop

trop Bot commented Jul 5, 2019

Copy link
Copy Markdown
Contributor

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

trop Bot commented Jul 5, 2019

Copy link
Copy Markdown
Contributor

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

@trop

trop Bot commented Jul 5, 2019

Copy link
Copy Markdown
Contributor

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

@trop

trop Bot commented Jul 8, 2019

Copy link
Copy Markdown
Contributor

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

@trop

trop Bot commented Jul 8, 2019

Copy link
Copy Markdown
Contributor

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

@trop

trop Bot commented Jul 8, 2019

Copy link
Copy Markdown
Contributor

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

Comment thread BUILD.gn

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

Copy link
Copy Markdown
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?

MarshallOfSound pushed a commit that referenced this pull request Sep 7, 2026
* chore: remove dump_syms.patch

It patches generate_breakpad_symbols.py, which Electron has not invoked
since #19042.

* chore: remove crashpad_pid_check.patch

Its removal condition (crashpad initialized before the sandbox) was met in
#23265; what remained disabled is crashpad's client PID verification on
Windows.

* chore: remove disable_compositor_recycling.patch

Since #44628 macOS uses the views WebContentsView with a parent
ui::Compositor, so the recyclable-compositor path this targeted is not taken;
its remaining effect was suppressing DelegatedFrameHost::WasHidden.

* chore: remove chore_provide_iswebcontentscreationoverridden_with_full_params.patch

Nothing overrides IsWebContentsCreationOverridden or CreateCustomWebContents
since #52472.

* chore: remove fix_select_the_first_menu_item_when_opened_via_keyboard.patch

Upstream selects the first item for keyboard-opened menus on Windows since
M133 (https://chromium-review.googlesource.com/c/chromium/src/+/5868220)
behind PlatformStyle::kAutoSelectFirstMenuItemFromKeyboard.

* chore: remove revert_remove_the_allowaggressivethrottlingwithwebsocket_feature.patch

Nothing in Electron references the feature; backgroundThrottling: false and
--disable-background-timer-throttling cover the use case.

* chore: remove fix_fire_menu_popup_start_for_dynamically_created_aria_menus.patch

Upstream fires the popup events for dynamically created menus since M150
(https://chromium-review.googlesource.com/c/chromium/src/+/7804599), and the
hunk here was gated on a feature nothing enabled.

* chore: remove build_disable_llvm_unroll-add-parallel-reductions_on_apple_targets.patch

The miscompile was fixed by llvm/llvm-project#210957, which is in the bundled
clang (llvmorg-24-init-3796).

* chore: remove refactor_unfilter_unresponsive_events.patch

web-contents.ts re-applied the same three conditions (not ignored, visible,
renderer initialized) before emitting 'unresponsive', so the unfiltered
notification was never observable. Let Chromium filter and emit directly.

* chore: remove fix_disable_enable_resource_allowlist_generation_on_windows.patch

The siso-incompatible link wrapper it worked around was reverted upstream
(https://chromium-review.googlesource.com/c/chromium/src/+/8275653, in this
Chromium), so set enable_resource_allowlist_generation from all.gn as intended.

* chore: remove nan test_use_v8_version_check_instead_of_node_version_check.patch

With Node 24 the upstream nodeVersion > 22 check already selects the same
expectations, so the V8-version check changes nothing.

* chore: remove nan fix_remove_deprecated_propertycallbackinfo_holder.patch

V8 re-added PropertyCallbackInfo::Holder(), so nan's tests compile unchanged.

* chore: remove reclient-configs fix_disable_compression_threshold.patch

reproxy.cfg is not read under siso.

* chore: remove reclient-configs build_on_windows_provide_clang_wrapper_as_toolchain_input.patch

siso merges inputs and toolchain_inputs from the rewrapper cfg and passes the
remote_wrapper itself, so the distinction no longer matters.

* chore: remove reclient-configs fix_temporarily_use_toolchain_inputs_exclusively_instead_of_inputs.patch

Same as the Windows one: a no-op under siso's merged input list, and the python
cfgs it also touched have no consumer since Chromium dropped python remote
actions.

* chore: remove reclient-configs reland_mojo_use_large_worker_for_mojom_parser_action.patch

The rewrapper_<os>_large.cfg consumer was removed upstream in
https://chromium-review.googlesource.com/c/chromium/src/+/6325750.

* chore: reduce fix_add_python_remote_wrapper.patch to the clang wrapper chmod

Chromium removed python remote actions
(https://chromium-review.googlesource.com/c/chromium/src/+/6289606), so the
python wrapper and cfg hunks have no consumer; the exec bit on the generated
clang_remote_wrapper is the part siso still relies on from macOS hosts.

* chore: trim dead hunks from render_widget_host_view_mac.patch

Nothing has implemented shouldIgnoreMouseEvent since #38404.

* chore: trim dead hunks from desktop_media_list.patch

The Update(callback, refresh_thumbnails) signature change is unused since
#50960 moved DesktopCapturer to StartUpdating().

* chore: trim dead hunks from allow_in-process_windows_to_have_different_web_prefs.patch

enable_websql has no reader (WebSQL is gone from Blink) and none of the
added fields use base::FilePath, so drop the field and the three file_path
includes/imports.

* chore: trim dead hunks from chore_restore_some_deprecated_wrapper_utility_in_gin.patch

gin::DeprecatedWrappable(Base), its Converter, internal::FromV8Impl and
gin/wrapper_info.cc duplicate what shell/common/gin_helper already defines
(including gin::DeprecatedWrapperInfo::From) and are not referenced; keep the
DeprecatedWrapperInfo struct, the per-isolate template maps and the internal
field setup that gin_helper relies on.

* chore: trim dead hunks from refactor_expose_file_system_access_blocklist.patch

Electron does not compile chrome_file_system_access_permission_context.cc,
so the #if 0 blocks in it did nothing; keep the header refactor.

* chore: trim dead hunks from feat_add_support_for_missing_dialog_features_to_shell_dialogs.patch

The show-hidden plumbing has had no caller since #51704 (showHiddenFiles is
macOS/Windows only), and the portal file carried two unused includes, one of
them into electron/.

* chore: trim dead hunks from support_mixed_sandbox_with_zygote.patch

The RendererSandboxedProcessLauncherDelegateWin hunk was guarded by
USE_ZYGOTE, which is never set on Windows.

* chore: trim dead hunks from chore_grandfather_in_electron_views_and_delegates.patch

MenuBar and InspectableWebContentsView never construct the passkeys
themselves (RootView and DevToolsWindowDelegate do it for them).

* chore: trim dead hunks from web_contents.patch

The RenderWidgetHostViewBase forward declaration was unused.

* chore: trim dead hunks from boringssl feat_expose_several_extra_cipher_functions.patch

cipher.h already declares EVP_aes_256_cfb128.

* chore: trim dead hunks from the webrtc pipewire patch

The capturer_failed_ assignment inside the if duplicated the unconditional
one upstream added below it, and the description still listed two items that
no longer correspond to any hunk; what remains is the X11 fallback, so name
it that.

* chore: update patches

* chore: gn format build/args/all.gn

* Revert "chore: remove refactor_unfilter_unresponsive_events.patch"

This reverts commit 03a3bd1.

* Revert "chore: remove revert_remove_the_allowaggressivethrottlingwithwebsocket_feature.patch"

This reverts commit 9db932e.

* Revert "chore: remove disable_compositor_recycling.patch"

This reverts commit 9d53659.

* chore: update patches

* chore: make refactor_expose_file_system_access_blocklist.patch header-only

The earlier trim restored the .cc from Chromium trunk rather than the pinned
revision, which pulled unrelated upstream lines into the export.

* Revert "chore: remove fix_select_the_first_menu_item_when_opened_via_keyboard.patch"

This reverts commit 1fe5f4e.

* chore: keep first-menu-item selection for keyboard-opened menus off Windows

Upstream only auto-selects behind PlatformStyle::kAutoSelectFirstMenuItemFromKeyboard,
which is Windows-only, so keep the patch for the other views platforms and
skip it on Windows where upstream now handles it.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants