Skip to content

[iOS] Incorrect watchdog termination detection #3860

@TimBurik

Description

@TimBurik

Package

Sentry

.NET Flavor

.NET

.NET Version

8.0.404

OS

iOS

SDK Version

4.13.0

Self-Hosted Sentry Version

No response

Steps to Reproduce

  1. Initialize Sentry, keep WatchdogTerminationIntegration enabled;
  2. Generate managed app crashes
  3. Observe reports in Sentry dashboard, which have the mechanism=watchdog_termination

Unfortunately, we can't find 100% reproduction steps for this issue, but it seems to be happening only for managed crashes

Expected Result

Watchdog Termination events are not reported for the sessions, which had ended with a crash

Actual Result

Some Watchdog Termination events seems to duplicate crash reports:

  • reported from the same device with the same timestamp;
  • Watchdog Termination report has the same exception as a last breadcrumb;

Here is the example of such duplicated reports in raw json:

According to the sentry-cocoa implementation, in case if last session has a crash - it should not be reported as watchdog-terminated:
https://github.com/getsentry/sentry-cocoa/blob/0b53d9c1a9e75af96895ffa8b37c28a42094062d/Sources/Sentry/SentryWatchdogTerminationLogic.m#L86-L88

The only correlation in such issues we see is that they only happen for managed crashes (no native crash is duplicated), but definitely not every managed crash results in such a duplication. Is it possible that in some cases sentry-dotnet does not notify sentry-cocoa about session being terminated with a crash?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    Status

    Done

    Status

    Waiting for: Product Owner

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions