sentry-native icon indicating copy to clipboard operation
sentry-native copied to clipboard

Adapt the breakpad backend to send crash events immediately

Open n08i40k opened this issue 3 years ago • 4 comments

I use sentry-native with breakpad as a backend. Upon departure, the crash log is not sent immediately to the server, but is saved to disk and only the next time the application is launched, the crash log will be sent to the server.

Moreover, if you do not use sentry-native, but only breakpad, then you can immediately send a minidump to the server.

  • [ ] During build
  • [ ] During run-time
  • [x] When capturing a hard crash

Environment

  • OS: Windows 10.0.19044 x64
  • Compiler: MSVC 19.34.31937
  • CMake version and config: 3.23.2, SENTRY_BACKEND=breakpad

Steps To Reproduce

Build a test application and cause a crash.

n08i40k avatar Jan 03 '23 23:01 n08i40k

@N08I40K, the decision to persist breakpad crash-dumps to disk and not send them immediately is primarily historic. There are currently some organizational changes in progress regarding the Native SDK. At this point, I cannot tell you how this change will be prioritized down the road, especially since breakpad is mostly there as a fallback to support use cases that cannot use crashpad (for whatever reason).

Can I ask why you are not using crashpad on Windows?

supervacuus avatar Jan 05 '23 12:01 supervacuus

@supervacuus: I can provide some context regarding situations in which crashpad currently isn't used (on projects I'm involved with):

  • ARM64 Windows builds (especially ARM64 builds with mingw, which need extra additional fixes - I have not yet had a chance to dig into the best way to fix these compilation issues)
    • x64 builds, of course, work fine now 🥳
  • When packaging a single-binary Windows .EXE is needed (for example, self-contained "portable" builds)
  • In Linux builds packaged as Flatpaks / Snaps:
    • The Flatpak sandbox blocks ptrace completely, and hence neither crashpad nor breakpad currently work. Mozilla supposedly helped implement a workaround for the Snap sandbox (but this is only available for trusted web browsers - not every package), and may be suggesting something similar to Flatpak - but that isn’t available right now.
    • Reference: https://bugzilla.mozilla.org/show_bug.cgi?id=1653852
  • In macOS builds (due to an unrelated packaging issue), but we hope to have this switched over to crashpad properly soon

past-due avatar Feb 07 '23 19:02 past-due

Thanks for your input, @past-due!

supervacuus avatar Feb 27 '23 18:02 supervacuus

To follow-up on my last comment:

  • crashpad also doesn't work with sandboxed macOS apps (but breakpad does work)

past-due avatar Oct 12 '23 23:10 past-due