-
-
Notifications
You must be signed in to change notification settings - Fork 329
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix: SDK detects OutOfMemory after device reboot #3352
Fix: SDK detects OutOfMemory after device reboot #3352
Conversation
Thanks @sepbehroozi for contributing. I believe this change makes sense. |
Hello @brustolin |
Fix formatting issue in SentryWatchdogTerminationLogic.m Use TestSysctl instead of the SentrySysctl in SentryCrashIntegrationTests's Fixture
Hey @brustolin. I believe the reason for the failed tests was that the |
Codecov Report
@@ Coverage Diff @@
## main #3352 +/- ##
=============================================
+ Coverage 89.182% 89.241% +0.059%
=============================================
Files 500 500
Lines 54488 54508 +20
Branches 19561 19568 +7
=============================================
+ Hits 48594 48644 +50
+ Misses 5028 4889 -139
- Partials 866 975 +109
... and 35 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch, thanks, @sepbehroozi 🥳. I also think this change makes sense. I leave it up to @brustolin to give you a final review.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
📜 Description
If the host app has been terminated due to device reboot, SentrySDK assumes it as a WatchdogTermination crash. In such cases, mostly, the boot time will be mentioned as "a few seconds before this event".
The idea behind this fix is that if the system boot time has been changed since the previous app launch, most likely the app has been terminated due to the reboot and the SentrySDK should not consider it as a WatchdogTermination crash.
💡 Motivation and Context
This change helps reducing the amount of false WatchdogTermination events detected by the SDK.
💚 How did you test it?
There's a new test case added in the
SentryWatchdogTerminationsTrackerTests.swift
file, which sets the previous app-launch time to different value and expects not sending any OOM event.📝 Checklist
You have to check all boxes before merging:
sendDefaultPII
is enabled.🔮 Next steps