Hacker News new | ask | show | jobs
by kllrnohj 324 days ago
> Switching away from the app can also mean it crashes.

That sounds more like it's being killed for RAM reasons rather than "crashing"

2 comments

Same thing. Google owns both Android and the Linux Terminal app. Some combination of Google's OS and Google's app causes the app to crash or be crashed in the background. That's something that Google needs to fix regardless of where the bug lies.
Is this with battery optimizations disabled?
Not if it's not crashing at all and is just a fundamental difference between Android's memory management and what the Debian guest is expecting (which is no RAM management at all)
>which is no RAM management at all

I'm sure the Android one is much more aggressive, but Linux's OOM killer isn't too different is it?

OOM is only triggered when you actually run out of virtual memory. With modern phones that shouldn't normally happen unless you're doing something silly like compiling a web browser.
oomkiller is triggered when requested pages can't be allocated
No, it's just Android working the way it was designed. Long running server or VM-esque apps are incompatible with Android's ideal process management and scheduling.

Apps are meant to be started and destroyed dynamically when the user does something else, their phone is idle for a long time, battery life is low, etc. If something is in the background it's fair game to kill.

It could simply pause or throttle apps instead of killing. Also I am sure Google Play Services are not killed randomly.
Yeah, Google has control of the OS and can easily choose to fix the issue.

It's just an issue that plagued the last 15 years of attempts at getting Linux running in VMs/containers/etc on Android, and that's the reason it's an issue.

Developers might be able to work around the limitation by building dynamic suspending and restoring of VM state into their Linux launcher and try to make it play nice with Android.