Closed haraldrudell closed 2 days ago
Thanks for the bug report. Must have taken quite some time as ANR dumps aren't all that small.
How frequently do you see this? Is there a set of steps that can reproduce this, even if intermittently?
We perhaps must be careful in our use of ConnectivityService APIs, we use quite a few deprecated ones where we shouldn't...
It is just general use that on rare occasions coincide with statistics collection, I think
It took 4 days for it to happen so it is not frequent, but I was determined to get some data on it — At the time, airplane mode was on, just unlocked and looking at an off-line browser tapping around
After occurring first time after boot, the phone does show occasional slowness, like 30 s without displaying a dialog, or a dialog 2 hours later. The phone is in bad state after restarting a thread or something — A reboot is back to normal: play again
An easy fix would be moving addPowerSaveTempWhitelistAppDirect off the UI thread using app-scoped Kotlin coroutine? while(true) and a semaphore launch the coroutine from invoking method from the Application component onCreate The impact will then be nothing even if it locks up. Costs nothing, a coroutine is an object instance coroutines in Kotlin is a time-shared thread-group, poor man’s parallelism
If it’s then still suspected to be broken, it can be instrumented with display in the UI
Thanks. If you are comfortable, please consider emailing me (mz at celzero dot com) the full ANR dump. No pressure.
An easy fix would be moving addPowerSaveTempWhitelistAppDirect off the UI thread using app-scoped Kotlin coroutine?
That code is Android framework's (Android's code that runs in each app's process or acts as a "server" processing app's requests). Albeit, these code paths may have been triggered by our code. We have to do a sweep to see which one it might be; not straight forward without the entire ANR trace (if you can't share it is okay).
This has nothing to do with Rethink, it’s some hardware issue with the device
At present, I can’t remember if I saw the dialog on another device
This phone is declared working for like 4 days at a time, after which reboot to continue
Rethink possibly does something it shouldn’t when ConnectivityService tries to figure out how many bytes have been transferred.
Reported after 5 seconds in logcat: ActivityManager: ANR in system
It appears:
After a logcat session and “adb bugreport” I could extract some stack traces that may indicate the issue to someone familiar with the Rethink codebase:
3 threads are blocked, one is labeled “android.ui”:
Thread 10 blocked trying to retrieve basic network information
Thread 12 is blocked trying to do something to the power-save temporary whitelist apps
thread 73 looking for a byte-count
thread 72 holds locks and is not Blocked