android: Android 10 isolated service bug workaround
Android 10 has a bug that UID used for non-primary user cannot be freed correctly, eventually exhausting the pool of UIDs for isolated services. There is a global pool of 1000 UIDs, and each app zygote has a smaller pool of 100; the bug appplies to both cases. The leaked UID in the app zygote pool are released when the zygote is killed; leaked UIDs in the global pool are released when the device is rebooted. So way to slightly delay until the device needs to be rebooted is to use up the app zygote pool first before using the non-zygote global pool. Add a workaround allocator that's only used under secondary user on Android 10. It will try to bind to a new service from the app zygote. If bind fails, which happens if the UID pool is exhausted, then try using the non app zygote service. Bug: 1035432 Change-Id: I07cba74a21076e4cbc9342705f7b69b97e011c20 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2001998 Commit-Queue: Bo <boliu@chromium.org> Reviewed-by:Tommy Nyquist <nyquist@chromium.org> Reviewed-by:
ssid <ssid@chromium.org> Cr-Commit-Position: refs/heads/master@{#733829}
Showing
This diff is collapsed.
Please register or sign in to comment