Brief & History
Since iOS 17.4 and up we experience a lot of flakyness when it comes to DeviceActivity event thresholds. After a lot of testing and investigations inside system logs and filing countless bug reports we found a reproducible way why the event thresholds are not getting properly called.
Findings
Apparently when the device reaches near to max memory something called jetsamkills processes left and right.
This means that the UsageTrackingAgent that (we think) is responsible for tracking the usage time of the device gets killed and doesn't recover until significant memory is freeing up on the device.
How to test it yourself
- Use a slightly older device with ~ 3 or 4 GB of RAM
- Open a game or two that is meomry intensive (like Fishing Clash, yes..) and observe
In the console logs you see something that only happens then:
Process UsageTrackingAgent [39307] killed by jetsam reason highwater
This happens often but recovers itself when the UsageTrackingAgent exceeds their 6MB memory limit. Yet the log looks like this:
Process UsageTrackingAgent [39307] killed by jetsam reason per-process limit
Once you kick the game, the memory is free and sometimes the event thresholds are calling in again.
Defeating the purpose
However this defeats the purpose of tracking usage time and shielding perhaps the playing app from being played after a certain amount of time!
Feedback Assistant Ticket
Here is the ticket with sysdiagnose, step by step and more information: FB13884981
Please fix this ASAP, this is such a pain for production users and their kids EVERY DAY.