Muirey03 / Cr4shed

More useful crash logs
117 stars 25 forks source link

Hide Jetsam logs #63

Open NSExceptional opened 3 years ago

NSExceptional commented 3 years ago

After the update that fixed the renamed classes for iOS 14, I'm getting tons of jetsam logs:

The process was terminated for exceeding jetsam memory limits

These shouldn't appear in Cr4shed, they're useless and just clutter the app

Muirey03 commented 3 years ago

They are not useless. The processes are crashing and that should be reported. I may add an option to disable the reports in the app's settings.

NSExceptional commented 3 years ago

They're not crashing… they're being terminated by the system. Termination ≠ crash

Regardless, if you just want to add an option to ignore them, that's fine. But can we leave this open until that happens then?

badger200 commented 3 years ago

They are not useless. The processes are crashing and that should be reported. I may add an option to disable the reports in the app's settings.

I agree and I would like the ability/option to view jetsam terminations. Excessive jetsam terminations would indicate an issue somewhere. I recall Saurik last year updated MobileSubstrate to handle system processes that were being Jetsam terminated due to certain/excessive tweaks being loaded into them, causing them to exceed their normal memory usage.

@NSExceptional ‘s idea of an option sounds great.

It would be even better if you could also add a color-coding or little icon to indicate the Jetsam terminations.

You could potentially take it further and add additional colors for logs with:

NSExceptional commented 3 years ago

@badger200 actually jetsam terminations are extremely common and normal. Jetsam is there to kill processes when they use too much memory. It happens to dozens of apps on your phone on a daily basis, tens of times a day if not more, because most apps use a ton of memory and don't bother to release it.

They are largely useless unless on-device. Xcode can show you jetsam logs if you really need to see them

The Substrate thing was actually something I discovered and diagnosed btw. I used Console.app to watch for it; Cr4shed would have been useless for that

badger200 commented 3 years ago
  1. I am entirely on-device, I don’t currently have access to a Mac/XCode/Console.app.

  2. Oh wow, then you’re the perfect person to ask, how do I disable all those MobileSubstrate “Checking.. phys memory 16384” messages that render syslog completely useless? That was incredibly frustrating and I had to switch to Substitute reluctantly.

  3. They may not seem useful to you, but I was able to diagnose a MAJOR, MAJOR issue upgrading my 150,000 file Photo library from iOS 10.2.1 to 12.4 which failed catastrophically, forever stuck in a loop of trying to rebuild the database from scratch and taking 48 hours of intense disk thrashing to do so, only to reach .albummetadata importing and assetsd exceeding 1.1GB RMem and being terminated, dooming this cycle to repeat forever.

This consumed my life for 2 years, I don’t even want to estimate how much time and effort but it was easily hundreds and hundreds of hours before I finally was able to workaround it and get the database to complete its rebuild and regain access to all my photos and more importantly, my albums. (Makes me wonder how many others with large organized photo libraries were forced to accept a total loss of all albums/metadata and some kind of excruciating export/import?)

NSExceptional commented 3 years ago

Color me convinced! I forgot not everyone has a Mac and can't just go use Console.app, my bad.

A toggle to enable or disable recording jetsam events is the best way to go for sure :)

As for your question, I'm not sure. Console.app has a filter search bar which is helpful