Skip to content
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

[PLAT-5336] Do not report OOM if the device rebooted #882

Merged
merged 1 commit into from
Nov 12, 2020

Conversation

nickdowell
Copy link
Contributor

Goal

Adds boot time to the OOM detection's heuristics, to remove a possible source of false positives.

See feature request #545

Changeset

A formatted date representation of sysctl("kern.boottime") is now stored as "bootTime" in BugsnagSystemState.

-[BugsnagClient didLikelyOOM] uses the current and previous values to determine whether a reboot has occurred, and will not report an OOM if so.

An assert was added to -[BugsnagSystemState sync] to make it more obvious when an object that cannot be converted to JSON data has been added to the state.

Testing

This has been manually tested by triggering an OOM and then rebooting the device before re-launching the test app.

The need for a device reboot to trigger this does not lend itself to automated testing.

@nickdowell nickdowell force-pushed the nickdowell/oom-reboot-detection branch from 9530b1a to 86cafbc Compare November 11, 2020 17:47
@nickdowell nickdowell merged commit 11ebd69 into next Nov 12, 2020
@nickdowell nickdowell deleted the nickdowell/oom-reboot-detection branch November 12, 2020 09:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants