Repository navigation
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## v1 #2301 +/- ##
==========================================
+ Coverage 75.77% 75.79% +0.02%
==========================================
Files 105 105
Lines 30828 30828
Branches 5745 5745
==========================================
+ Hits 23359 23366 +7
+ Misses 6036 6031 -5
+ Partials 1433 1431 -2 🚀 New features to boost your workflow:
|
`memfd_create` needs Linux 3.17, so creating the crash service's shared memory failed on older kernels, and the SDK disabled native crash reporting. When `memfd_create` fails, create an unlinked file in the database directory instead. Preallocate it with `posix_fallocate()`, because a sparse file raises `SIGBUS` on write when the disk is full. Java passes the directory to the new `SentryNdk.createCrashShm(String)` overload, and `createCrashShm()` keeps using memfd only.
The overload without a database directory has no file fallback, so it needs a kernel with memfd rather than a specific API level.
Match the Android API levels and NDK versions in `ci.yml`. The crash IPC now works without memfd, so drop the fixture's API 30 `minSdk` and the tests' API 30 skips.
The API 21 and 26 e2e jobs need the sentry-java side of running the crash service below API 30.
API 31 tombstones leave dex frames unnamed, so the merged event has no Java method names. Check them only on later API levels. The fixture crashed 1 s after setting the scope, but sentry-java syncs the scope to native on its single-threaded executor, behind the startup work of the tombstone integration. Now that the crash service starts without waiting, that work can still run when the crash fires, and the event misses the `test.id` tag. Queue the crash on the executor, so that it follows the scope sync. Print logcat when an Android e2e test fails.
jpnurmi
force-pushed
the
jpnurmi/fix/native-android-21
branch
from
November 11, 2026 17:49
c068b33 to
a22c3b7
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit a22c3b7. Configure here.
`has_native` was false below API 23, so the API 21 e2e job skipped all Android tests and never exercised the file fallback for crash IPC. API 21 is the minimum, so drop the Android clause.
A non-UTF-8 byte in `adb logcat` output raised `UnicodeDecodeError` in the fixture teardown and lost the logcat dump of a failed test.
The API 23 skip blamed `process_vm_readv`, but below API 23 `sentry__process_vm_readv()` calls the raw syscall.
The e2e tests do not use Google Play services. Use the smaller AOSP images, like the regular Android CI jobs.
mujacica
approved these changes
Nov 12, 2026
JoshuaMoelans
approved these changes
Nov 12, 2026
jpnurmi
added a commit
to getsentry/sentry-java
that referenced
this pull request
Nov 16, 2026
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.
9 tasks
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.

💡 Before, Native on Android required API 30+. Now, it works with the same API 21+ as Inproc.
The crash service's shared memory used
memfd_create, which needs Linux 3.17+. Devices that launched before API 26 may run older kernels, where native SDK init failed and native crash reporting was disabled.SentryNdk.createCrashShm(String)now falls back to an unlinked file in the database directory, preallocated withposix_fallocate()so that a full disk fails at init instead of raisingSIGBUSon a later write.createCrashShm()keeps using memfd only.Required for, and to be merged after agreeing on: