getsentry / getsentry/sentry-java

Capture Android 17 MemoryLimiter process kills

Aberta
#5,908 4 comentários 2 reações 1 responsável Reivindicada por @0xadam-brown Ver no GitHub
Android Errors Feature Platform: Java
Linguagem predominante
Kotlin
Estrelas
1.4k
Forks
478
Merge médio
2d 22h
PRs com merge (30d)
69

Descrição

### Problem Statement

Android 17 (API 37) enforces per-app memory limits based on the device's total RAM. When an app exceeds its limit, the system terminates the process.

This is not a `java.lang.OutOfMemoryError`. No exception is thrown, no signal is raised, and no stack trace is produced — the process simply disappears. Neither `UncaughtExceptionHandlerIntegration` nor the NDK handler sees anything, so the SDK reports nothing at all.

### Solution Brainstorm

AnrV2Integration already polls ActivityManager#getHistoricalProcessExitReasons() at startup and discards everything that isn't REASON_ANR. Memory-limiter kills show up in that same list as REASON_OTHER with getDescription() containing "MemoryLimiter:AnonSwap"

So using that same mechanism doesn't sound too challenging.

Guia de contribuição

Abrir o guia de contribuição

Avaliação

Esta issue ainda não foi avaliada.

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.