Repository navigation
feat(android): Add experimental out-of-process crash reporting #6347
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
Open
jpnurmi
wants to merge
31
commits into
main
Choose a base branch
from
jpnurmi/feat/native-android
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
31 commits
Select commit
Hold shift + click to select a range
507da9a
feat(android): Add service-managed NDK crash daemon
jpnurmi 54dea34
Update CHANGELOG.md
jpnurmi d34d408
fix(android): Narrow exception handling in the NDK crash service
jpnurmi c47c86c
fix(android): Stop the NDK crash service when its daemon exits
jpnurmi a60a8e9
fix(android): Match the NDK crash service stop to its own start
jpnurmi f5dc791
fix(android): Write the NDK tombstone marker after a successful send
jpnurmi 919eb5a
fix(android): Bind the NDK crash service for the app's lifetime
jpnurmi ae47d7b
fix(android): Match NDK tombstones by the app's pid
jpnurmi 05e75eb
fix(android): Start an NDK crash daemon for each relaunch
jpnurmi e84e3c6
ci(temp): Publish sentry-native-ndk-outproc to Maven Local
jpnurmi 0fe3673
fix(android): Wait for the NDK tombstone outside the send budget
jpnurmi 4a7c12d
fix(android): Remove stale NDK crash IPC files
jpnurmi 094728d
fix(android): Fall back to the 1-argument NDK init
jpnurmi 20d4547
ref(android): Stop passing the tombstone flag to NdkOptions
jpnurmi 71a3cda
fix(android): Skip SDK init in the NDK crash service process
jpnurmi c779feb
ref(android): Remove the NDK crash service process check
jpnurmi 1d66db7
fix(android): Keep a newer NDK tombstone marker
jpnurmi 390f348
ci: Stop the sentry-native Gradle daemon after publishing
jpnurmi a36c1e5
fix(android): Bind the NDK crash service as important
jpnurmi 7d92170
Apply batched suggestions from code review
jpnurmi 5324909
chore(android): Update the outproc API dump
jpnurmi df1000d
fix(android): Reattach the NDK crash daemon after a service restart
jpnurmi 150ab4c
ref(android): Build the NDK outproc package on top of sentry-android-ndk
jpnurmi ccbe2ea
fix(android): Write the NDK tombstone marker before the send
jpnurmi 8dccc5c
fix(android): Close rejected NDK crash service fds
jpnurmi e9046ba
fix(android): Time the NDK tombstone poll with a monotonic clock
jpnurmi ef9285c
fix(android): Narrow the NDK outproc library load catch
jpnurmi 8393197
fix(android): Load the NDK outproc libraries before binding the service
jpnurmi 77bc81d
fix(android): Write the NDK tombstone marker when the merge fails
jpnurmi 4e21276
docs(android): Remove the Gradle plugin from the NDK outproc README
jpnurmi e601bf0
fix(android): Hand the NDK crash memfd to the crash service
jpnurmi File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| # sentry-android-ndk-outproc | ||
|
|
||
| Experimental opt-in alternative to the inproc native backend, with an Android | ||
| service that runs the native crash daemon. Builds on `sentry-android-ndk` and | ||
| replaces its `sentry-native-ndk` with `sentry-native-ndk-outproc`. | ||
|
|
||
| The default is the inproc backend. | ||
|
|
||
| To select it, add `sentry-android-ndk-outproc`. With the `sentry-android` | ||
| bundle, which brings `sentry-native-ndk`, also exclude it: | ||
|
|
||
| ```kotlin | ||
| configurations.configureEach { | ||
| exclude(group = "io.sentry", module = "sentry-native-ndk") | ||
| } | ||
| ``` | ||
|
|
||
| Otherwise, the build fails because it contains both native backends. | ||
|
|
||
| The crash service needs API 30+. On older versions, native crash reporting is | ||
| disabled. |
19 changes: 19 additions & 0 deletions
19
sentry-android-ndk-outproc/api/sentry-android-ndk-outproc.api
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| public final class io/sentry/android/ndk/outproc/BuildConfig { | ||
| public static final field BUILD_TYPE Ljava/lang/String; | ||
| public static final field DEBUG Z | ||
| public static final field LIBRARY_PACKAGE_NAME Ljava/lang/String; | ||
| public static final field VERSION_NAME Ljava/lang/String; | ||
| public fun <init> ()V | ||
| } | ||
|
|
||
| public final class io/sentry/android/ndk/outproc/SentryNdkCrashService : android/app/Service { | ||
| public fun <init> ()V | ||
| public fun onBind (Landroid/content/Intent;)Landroid/os/IBinder; | ||
| } | ||
|
|
||
| public final class io/sentry/android/ndk/outproc/SentryNdkOutproc { | ||
| public static fun close ()V | ||
| public static fun init (Landroid/content/Context;Lio/sentry/android/core/SentryAndroidOptions;)V | ||
| public static fun init (Lio/sentry/android/core/SentryAndroidOptions;)V | ||
| } | ||
|
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
don't forget to drop this :)