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

オープン
#6,758 コメント 4 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
45/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
android, kotlin

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

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).

主要言語
Kotlin
スター
1.4k
フォーク
483
平均マージ
2日 54分
マージ済み PR(30日)
207

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

getsentry/sentry-java のほかの issue

getsentry/sentry-java の issue をすべて見る

似ている issue

Kotlin の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。