Tombstone "last reported" marker lives in the cache dir: a cache clear re-reports the latest tombstone, unmerged and sometimes without release

Abierto
#6,758 4 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
45/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
android, kotlin

Línea de trabajo

Start by tracing TombstoneIntegration and the code that writes and reads the “last reported” marker, then check how the options cache and outbox sender affect tombstone metadata and native event matching. Reproduce the cache-clear steps on Android and inspect the relevant integration tests. Done when clearing the cache no longer causes the same tombstone to be reported again, and the reported event retains the expected release and environment.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

Android Bug Platform: Java Waiting for: Product Owner
Integration

sentry-android

Build System

Other

AGP Version

n/a (.NET for Android 36.1.53, via Sentry .NET 6.11.1)

Proguard

Disabled

Other Error Monitoring Solution

No

Version

8.57.0

Steps to Reproduce

SDK: sentry-android 8.57.0, through Sentry .NET 6.11.1 (Sentry.Maui), with TombstoneEnabled = true. Android 16 emulator (API 36, arm64-v8a).

  1. Cause a native crash (SIGABRT) with the default signal-handler strategy, then relaunch. The tombstone is reported once and merged with the native event: "Writing last reported Tombstone marker with timestamp 1795592196503".
  2. Relaunch a few more times. Each launch logs "Latest Tombstone has already been reported, returning early." This is correct.
  3. Clear the app's cache directory. Android does this itself when storage runs low; we reproduced it with run-as <pkg> rm -rf cache.
  4. Relaunch.
Expected Result

The marker that prevents re-reporting should survive a cache clear, for example by living in noBackupFilesDir or another persistent location. Failing that, the SDK should not report a tombstone whose release and environment it cannot determine.

Actual Result
  • The same tombstone (same timestamp) is reported a second time, as an unmerged Tombstone event: "No matching native event found for tombstone".
  • In one of our two cache-clear runs, the re-reported event had release: null and no environment; in the other it had both. We suspect it depends on whether the options cache has been written again by the time the tombstone is built.
  • In production, the same process (same pid and timestamp) has been reported up to 8 times, several copies without release or environment.

Note, not yet reproduced locally
In production, many tombstones arrive unmerged while their Sentry Native counterpart is sent separately about 1 s apart, well within the 5 s window. That suggests the outbox sender sometimes ships the native envelope before TombstoneIntegration looks for it. We couldn't test the send race because our emulator had no validated network.

Related: getsentry/sentry-dotnet#6012 (with SignalHandlerStrategy.ChainAtStart, SIGABRT never produces a tombstone at all).

Lenguaje dominante
Kotlin
Estrellas
1.4k
Forks
483
Merge medio
2 d 54 min
PR fusionados (30 d)
207

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de getsentry/sentry-java

Todos los issues de getsentry/sentry-java

Issues similares

Más issues de Kotlin

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.