WordPress-iOS icon indicating copy to clipboard operation
WordPress-iOS copied to clipboard

WatchdogTermination: The OS watchdog terminated your app, possibly because it overused RAM.

Open sentry-io[bot] opened this issue 1 year ago • 11 comments

Sentry Issue: JETPACK-IOS-1NA

WatchdogTermination: The OS watchdog terminated your app, possibly because it overused RAM.

By July 3rd, 2023, this issue affected 875 users. Based on the error description, it looks like an issue with memory pressure.

Related subtasks:

  • https://github.com/wordpress-mobile/WordPress-iOS/issues/21075
  • https://github.com/wordpress-mobile/WordPress-iOS/issues/21010
  • https://github.com/wordpress-mobile/WordPress-iOS/pull/21013
  • https://github.com/wordpress-mobile/WordPress-iOS/pull/21015
  • https://github.com/wordpress-mobile/WordPress-iOS/pull/21038
  • https://github.com/wordpress-mobile/WordPress-iOS/pull/21040
  • https://github.com/wordpress-mobile/WordPress-iOS/pull/21051
  • https://github.com/wordpress-mobile/WordPress-iOS/pull/21052
  • https://github.com/wordpress-mobile/WordPress-iOS/pull/21053
  • https://github.com/wordpress-mobile/WordPress-iOS/pull/21062
  • https://github.com/wordpress-mobile/WordPress-iOS/pull/21063
  • https://github.com/wordpress-mobile/WordPress-iOS/pull/21064
  • https://github.com/wordpress-mobile/WordPress-iOS/pull/21066
  • https://github.com/wordpress-mobile/WordPress-iOS/pull/21068
  • https://github.com/wordpress-mobile/WordPress-iOS/pull/21161
  • https://github.com/wordpress-mobile/WordPress-iOS/pull/21156
  • https://github.com/wordpress-mobile/WordPress-iOS/pull/21120
  • https://github.com/wordpress-mobile/WordPress-iOS/issues/21197
  • https://github.com/wordpress-mobile/WordPress-iOS/pull/21254

sentry-io[bot] avatar Jul 03 '23 14:07 sentry-io[bot]

  • The issue appears from 22.3 because Sentry started reporting it this way from version 8.0.0 which we updated for 22.3
  • The most common reason is Out Of Memory issue. The cases where the app gets killed after having the main thread blocked for a prolonged time are reported together with App Hangs
  • Log inspection suggests that there can be multiple memory related issue causing this

We should approach this issue in multiple ways:

staskus avatar Jul 04 '23 12:07 staskus

As this is a number one issue by occurrence on Sentry, setting it as [Pri] High. However, given this issue could be an umbrella for multiple memory leaks, it's unrealistic to expect to solve it in one go, rather we should aim for significant decrease of number of these issues.

staskus avatar Jul 05 '23 10:07 staskus

I created a subtask:

  • https://github.com/wordpress-mobile/WordPress-iOS/issues/21010

Memory issues could be approached in multiple ways. I think at least this one is easy to reproduce and confirm, also it could address some fundamental issues with memory management that happens when the main view of the app appears, without going deeper into other features.

staskus avatar Jul 05 '23 14:07 staskus

Sentry issue: WORDPRESS-IOS-3Q99

sentry-io[bot] avatar Jul 12 '23 21:07 sentry-io[bot]

There are a couple of issues with WatchdogTermination events in Sentry:

  • It duplicates "regular" crashes. First reported by the Gutenberg team. I reported this issue to Sentry https://github.com/getsentry/sentry-cocoa/issues/3207
  • The "overused RAM" message is a guess and is not based on any signals from the OS: there are multiple potential reasons for Watchdog terminations.

kean avatar Aug 07 '23 15:08 kean

As this is a number one issue by occurrence on Sentry, setting it as [Pri] High. However, given this issue could be an umbrella for multiple memory leaks, it's unrealistic to expect to solve it in one go, rather we should aim for significant decrease of number of these issues.

I agree with this and find it surprising that Sentry doesn't report any WatchdogTermination events in the 23.0 beta (which has been out for two weeks. I ruled out the possibility of Sentry reporting this into a different Sentry issue (as it sometimes creates duplicates), but that doesn't appear to be the case. JETPACK-IOS-1NA is the only issue for WatchdogTermination.

One explanation could be that 23.0's beta userbase is too small for this issue to occur, so we'll have to wait another week to see if WatchdogTermination events occur (we can expect some).

guarani avatar Aug 18 '23 15:08 guarani

Update: There are four events in the 23.0 and we're two days into the release. There were 126 events two days into the 22.9, so this is encouraging. However, Sentry is dropping some events due to quota limits, so that could affect this.

guarani avatar Aug 22 '23 22:08 guarani

Update: WatchdogTermination is still one of the top 5 crashes, but most crash occurrences happen within versions 23.6 to 24.1. Currently, there are 5 events for 24.2, about three days after release.

dvdchr avatar Feb 22 '24 09:02 dvdchr

Sentry Issue: JETPACK-IOS-1NA

sentry-io[bot] avatar Apr 14 '24 16:04 sentry-io[bot]

Thanks for reporting! 👍

dangermattic avatar Jul 03 '24 17:07 dangermattic