You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/platforms/native/advanced-usage/backend-tradeoffs/index.mdx
+9-8
Original file line number
Diff line number
Diff line change
@@ -14,6 +14,7 @@ Currently, `crashpad` is the default on all desktop platforms because it
14
14
* has an external `handler` process that allows for external snapshots and sending crash reports immediately (instead of on the next successful start of your application)
15
15
* further, snapshotting, report management, and uploading outside the crashed process are safer because the `crashpad_handler` is not affected by any corruptions that led to a crash
16
16
* supports more error types on [Linux](/platforms/native/advanced-usage/signal-handling/#signals-of-interest) and Windows (`abort()` and other `fast-fail` crashes, handling of heap corruptions)
17
+
* on macOS, the `crashpad_handler` will receive `EXC_CRASH` Mach exceptions, which the kernel generates during process exit if a terminal POSIX signal hasn't been handled. None of the two other backends will catch this exception.
17
18
* is more maintained upstream (although most changes affect new platforms like Fuchsia)
18
19
* is the primary target for Sentry-developed extensions to the upstream implementation of backend handlers (most of which aren't a particular upside vs. the other backends, but changes to reach parity), including
19
20
* client-side stack traces (this is currently not available on `breakpad`)
@@ -22,12 +23,12 @@ Currently, `crashpad` is the default on all desktop platforms because it
22
23
* HTTP proxy support
23
24
* GCC and MinGW support
24
25
*`FirstChanceHandler` on Windows and extension of its synchronization to support Sentry hooks
25
-
* cooperation with Epic's Easy AntiCheat
26
+
* cooperation with Epic's Easy Anti-Cheat
26
27
* CMake build scripts (some users use our backend handler forks solely because of this reason)
27
28
28
29
### When shouldn't I use the `crashpad` backend?
29
30
30
-
Sentry decided on `crashpad` as the default on all platforms because there are a lot of upsides. However, there are use cases where `crashpad` cannot be used or makes distribution or deployment much harder. We provide other backends for situations when
31
+
Sentry decided on `crashpad` as the default on all platforms because it offers numerous advantages. However, there are use cases where `crashpad` cannot be used or makes distribution or deployment much harder. We provide other backends for situations when
31
32
32
33
* you cannot package or deploy an additional executable (the `crashpad_handler`)
33
34
* you cannot allow a secondary process to connect via `ptrace` to your application (AWS Lambda, Flatpak-, Snap-Sandboxes)
@@ -44,15 +45,15 @@ When your deployment scenario should wait for the `crashpad_handler` to finish i
44
45
Both backends are comparable in how they differ from `crashpad`. However, there are also considerable differences between the two:
45
46
46
47
*`inproc` only provides the backtrace of the crashing thread. `breakpad` records all threads in the minidump.
47
-
* similar to `crashpad`, `breakpad` uses the lowest level error handling mechanism on each platform (macOS: mach exception ports, Windows: `UnhandledExceptionFilter`, Linux: signal handlers), it does cover a smaller range of errors, though as mentioned above.
48
-
*`inproc` uses signal handling on macOS, meaning you only get a `POSIX` compatibility layer over mach exception ports. It relies on the same mechanisms as `breakpad` on Windows and Linux.
48
+
* similar to `crashpad`, `breakpad` uses the lowest level error handling mechanism on each platform (macOS: mach exception ports, Windows: `UnhandledExceptionFilter`, Linux: signal handlers), it does cover a smaller range of errors, though, as mentioned above.
49
+
*`inproc` uses signal handling on macOS, meaning you only get a `POSIX` compatibility layer over Mach exception ports. It relies on the same mechanisms as `breakpad` on Windows and Linux.
49
50
* as a result of choosing signal handling on macOS, `inproc` is currently broken on macOS since Apple eliminated unwinding from signal handlers
50
51
*`inproc` is exceptionally lightweight and written entirely in C, meaning it does not rely on a weighty C++ runtime library, which is also more often affected by ABI incompatibilities
51
-
*`breakpad` generates minidumps (like `crashpad` does), whereas `inproc` follows the Sentry event structure and primarily defers to the OS-provided unwinder and symbolication capabilities. Sentry processing infrastructure can - potentially - extract more information from the provided minidump than from only a stack trace and registers. However, it also means that the crash context inside the minidump will be opaque until processed in the backend. In contrast, if required, a local `relay` instance (or another application-level proxy) could process an entire `inproc` event with only JSON parsing capabilities.
52
+
*`breakpad` generates minidumps (like `crashpad` does), whereas `inproc` follows the Sentry event structure and primarily defers to the OS-provided unwinder and symbolication capabilities. Sentry processing infrastructure can extract more information from the provided minidump than from just a stack trace and registers. However, it also means that the crash context inside the minidump will remain opaque until it is processed in the backend. In contrast, if required, a local `relay` instance (or another application-level proxy) could process an entire `inproc` event with only JSON parsing capabilities.
52
53
53
54
### So when do I choose `inproc`?
54
55
55
-
`inproc` is currently the backend of choice for `Android` because it allows us to bundle it with our fork of the platform unwinder `libunwindstack` that provides a complete interface for unwinding and symbolication (rather than relying on the minimal user-space interface). This enables us to support a broad range of Android versions. In addition, stack walking on-device on Android is preferred since we don't have all system symbols available for server-side symbolication. A [best-effort symbol collection exists](https://github.com/getsentry/symbol-collector), but that'll never be as reliable as stackwalking on-device.
56
+
`inproc` is currently the backend of choice for Android because it allows us to bundle it with our fork of the platform unwinder,`libunwindstack`, which provides a complete interface for unwinding and symbolication (rather than relying on the minimal user-space interface). This enables us to support a broad range of Android versions. Additionally, stack walking on-device on Android is preferred since we do not have access to all system symbols for server-side symbolication. A [best-effort symbol collection exists](https://github.com/getsentry/symbol-collector), but that'll never be as reliable as stackwalking on-device.
56
57
57
58
`inproc` is the right choice if you
58
59
@@ -63,12 +64,12 @@ Both backends are comparable in how they differ from `crashpad`. However, there
63
64
64
65
### Summary
65
66
66
-
If you dive into the details, you will find many trade-offs in the selection of backends. The above merely provides a first overview. Further, the above is only a snapshot of the current capabilities, where some trade-offs are incidental and do not follow a particular strategy or technological necessity. The primary reason for providing multiple backends is to cover as many user scenarios as possible, which requires a bit of insight if you decide to deviate from the defaults.
67
+
If you dive into the details, you will find many trade-offs in the selection of backends. The above provides only a preliminary overview. Further, the above is only a snapshot of the current capabilities, where some trade-offs are incidental and do not follow a particular strategy or technological necessity. The primary reason for providing multiple backends is to cover as many user scenarios as possible, which requires some insight if you decide to deviate from the defaults.
67
68
68
69
Sentry suggests the following sequence for your backend evaluations:
69
70
70
71
*`crashpad` (default)
71
72
*`breakpad`
72
73
*`inproc`
73
74
74
-
from most feature-complete to least, where a step down should only be triggered by environmental inhibitors. With the above, you now have exemplary decision points that can help you before you start the evaluation of your error reporting scenario.
75
+
from most feature-complete to least, where a step down should only be triggered by environmental inhibitors. With the above, you now have exemplary decision points to help guide you before you start evaluating your error reporting scenario.
0 commit comments