getsentry / getsentry/sentry-java

Session-end timer runs on java.util.Timer

オープン
#5,576 コメント 1 件 リアクション 0 件 担当者 1 名 @runningcode が担当を希望しています GitHub で見る
Platform: Java
主要言語
Kotlin
スター
1.4k
フォーク
478
平均マージ
2日 23時間
マージ済み PR(30日)
67

説明

Audit finding **B2 — actual bug, MEDIUM**.

`LifecycleWatcher` schedules session end with `java.util.Timer` (`new Timer(true)` / `scheduleEndSession`, `sentry-android-core/src/main/java/io/sentry/android/core/LifecycleWatcher.java:106-122`), sharing B1's mechanics:

* Device sleeps within the 30s background window → session ends only at wake; `Session.end()` stamps wake time → inflated session durations in release health. Replay `stop()` and `ContinuousProfiler.close(false)` also run hours late.
* The foreground check `lastUpdatedSession + sessionIntervalMillis <= now` is a wall-clock interval → a clock step causes spurious or missed session rotation.

Source: [JAVA-557]() §B2.

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

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

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