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

ref(profiling) Fix electron crash #14216

Open
wants to merge 11 commits into
base: develop
Choose a base branch
from

Conversation

JonasBa
Copy link
Member

@JonasBa JonasBa commented Nov 8, 2024

This PR fixes the electron crash observed in #13978

I am not entirely sure as to why this causes a sigabrt, so I am working around the issue (obtaining a coredump out of electron did not seem trivial and my knowledge around electron isn't very extensive). The v8 options class and the constants are exposed correctly, I ruled that out, however the crash still seems to happen when they are used in this specific signature.

In order to have this running with electron, users will require to use the electron/rebuild package, which is the recommended approach by electron that rebuilds native node addons by providing the correct abi headers for the electron version the user is running. For now, we wont provide any prebuilt binaries and instead rely on the fallback mechanism to load the correct module. I will reevaluate this if it causes issues with bundling and look to add proper runtime electron detection.

@JonasBa JonasBa force-pushed the jb/profiling/electron-binaries branch from ed3d79d to c82add5 Compare November 8, 2024 22:11
profile_title,
{v8::CpuProfilingMode::kCallerLineNumbers,
v8::CpuProfilingOptions::kNoSampleLimit, kSamplingInterval});
profile_title, v8::CpuProfilingMode::kCallerLineNumbers, true,
Copy link
Member Author

Choose a reason for hiding this comment

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

Unclear why using the options signature causes this to sigabrt, but this will do too.

Copy link
Contributor

github-actions bot commented Nov 11, 2024

size-limit report 📦

Path Size % Change Change
@sentry/browser 22.77 KB - -
@sentry/browser - with treeshaking flags 21.53 KB - -
@sentry/browser (incl. Tracing) 35.26 KB - -
@sentry/browser (incl. Tracing, Replay) 71.98 KB - -
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 62.35 KB - -
@sentry/browser (incl. Tracing, Replay with Canvas) 76.31 KB - -
@sentry/browser (incl. Tracing, Replay, Feedback) 89.14 KB - -
@sentry/browser (incl. Feedback) 39.93 KB - -
@sentry/browser (incl. sendFeedback) 27.42 KB - -
@sentry/browser (incl. FeedbackAsync) 32.23 KB - -
@sentry/react 25.52 KB - -
@sentry/react (incl. Tracing) 38.22 KB - -
@sentry/vue 26.91 KB - -
@sentry/vue (incl. Tracing) 37.1 KB - -
@sentry/svelte 22.91 KB - -
CDN Bundle 24.13 KB - -
CDN Bundle (incl. Tracing) 37.04 KB - -
CDN Bundle (incl. Tracing, Replay) 71.7 KB - -
CDN Bundle (incl. Tracing, Replay, Feedback) 77.05 KB - -
CDN Bundle - uncompressed 70.73 KB - -
CDN Bundle (incl. Tracing) - uncompressed 109.9 KB - -
CDN Bundle (incl. Tracing, Replay) - uncompressed 222.42 KB - -
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 235.64 KB - -
@sentry/nextjs (client) 38.33 KB - -
@sentry/sveltekit (client) 35.84 KB - -
@sentry/node 133.5 KB - -
@sentry/node - without tracing 95.67 KB - -
@sentry/aws-serverless 105.93 KB - -

View base workflow run

@JonasBa JonasBa marked this pull request as ready for review November 11, 2024 16:37
Copy link
Collaborator

@timfish timfish left a comment

Choose a reason for hiding this comment

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

I haven't checked to see exactly what causes this but Electron applies a load of patches to v8/node which might cause something like this 🤔

@JonasBa
Copy link
Member Author

JonasBa commented Nov 11, 2024

I haven't checked to see exactly what causes this but Electron applies a load of patches to v8/node which might cause something like this 🤔

Hah, good to know! My knowledge of electron isn't great, but that gives me a lead to look at next, thank you!

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.

2 participants