Repository navigation
Conversation
`SentryNdkCrashService.start` waited up to 10 s for the service to connect and configure, on the thread that calls `SentryAndroid.init`, usually the main thread. It now hands the app's ends to native right away, and the service takes its ends when it connects. If it doesn't connect within 10 s, its ends are closed so that native sends and the crash handler fail at once, and a later connection reattaches. Native init in sentry-native 1.0.0-beta.1 still waits for the daemon.
Nothing in the crash service needs API 30. Drop the check in `SentryNdkOutproc.init()`, and pass the database directory to `SentryNdk.createCrashShm()` so that the crash IPC falls back to a file on kernels without memfd. `Application.getProcessName()` needs API 28, so read the process name from `/proc/self/cmdline` on older versions to skip SDK init in the crash service process.
DO NOT MERGE (revert after releasing getsentry/sentry-native#2301) `SentryNdk.createCrashShm(String)` is not in a sentry-native release yet. Build `sentry-native-ndk-outproc` from the sentry-native branch and publish it to Maven Local under a version that Maven Central does not have, so that Gradle resolves the local build.
jpnurmi
requested review from
romtsn and
runningcode
and removed request for
a team
November 16, 2026 08:58
Open
1 of 6 tasks
📲 Install BuildsAndroid
|
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Want fixes drafted automatically? Bugbot Autofix can create code changes for findings. A team admin can enable Autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 1eca506. Configure here.
A service that connected after the 10 s timeout reattached, but its connection never counted as configured, so `onBindingDied` didn't bind it again and out-of-process crash handling stayed down for the rest of the session.
This branch has not been deployed
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.

📜 Description
A follow-up to #6347:
sentry-android-ndk-outproc.SentryNdk.createCrashShm(String), which falls back to a file withoutmemfd_create(Linux < 3.17)./proc/self/cmdlinebelow API 28 to skip SDK init in the crash service process.SentryAndroid.init()for up to 10 s.💡 Motivation and Context
Before, outproc required API 30+ while inproc supports API 21+. Now, both support API 21+.
💚 How did you test it?
The Android E2E tests in getsentry/sentry-native#2301 build this branch and run on API 21, 26, 31, 35 and 36.
📝 Checklist
sendDefaultPIIis enabled.🔮 Next steps
Requires:
Docs: