Chasing the spontaneous reboot, Attempt 2.0

kschang

Senior Member
Dec 11, 2010
440
72
0
San Francisco, CA
I am trying to chase down a PITA spontaneous reboot issue with my Moto X 2013 Developer's Edition on Verizon, unlocked bootloader, Rooted, Xposed.

Sometimes, when simply using the device, the phone will spontaneously crash all the way back to boot animation (I overwrote the Motorola one with the generic Android L boot anim as given in the 5.1 update topic)

The system does not need to be stressed, though it seems to happen more often when it is. I'm often playing a podcast, browsing web pages, and answering phone, but this doesn't seem to follow any rhyme or reason. It doesn't follow specific intervals, specific time of day, and so on. It happens whether I'm on BT or none (plain speakers), and even happens when I'm merely browsing webpages or G+.

I've eliminated the browser as a suspect by uninstalling Chrome and using Dolphin for a couple days.

I'm reasonably sure BT is not to blame as this happens both while in BT streaming and on speakers or no audio at all. Just for grins, I've even replaced my pod player (from Doggcatcher to PocketCast)

I am running Xposed, so that's certain one area of problem, and I've considered the most likely candidate is Amplify, where I messed with limiting a LOT of modules, so to check that, I've disabled the module in Xposed. It seems to happen less often, but it's still there.

I've disabled NFC, it's not that.

I am running out of things to test, so I thought I better learn how to interpret logs and whatnot.

Here's what I managed to dug up so far:

It's NOT Kernel Panic

Checking /proc/last_kmsg shows no kernel errors. Kernel seem to show an ordinary shutdown. Checking the bootinfo also shows no kernel errors or flags.

I am showing errors in /data/system/dropbox

There are a bunch of error log files in /data/system/dropbox (SU required) and I'm seeing system_app_crash, system_server_crash, as well as a bunch of other files, some of which are .gz compressed.

CATing the files shows that system_app_crash are a result of calling an intent without a corresponding wakelock. Here's one such example:

Process: com.google.android.gms.persistent
Flags: 0x-3f37c13b
Package: com.google.android.gms v8489236 (8.4.89 (2428711-236))
Build: motorola/ghost_verizon/ghost:5.1/LPA23.12-39.7/7:user/release-keys

java.lang.RuntimeException: Unable to start service com.google.android.location.
[email protected] with Intent { act=com.google.andro
id.location.internal.action.FLP_LOW_POWER_LOCATION_RESULT pkg=com.google.android
.gms cmp=com.google.android.gms/com.google.android.location.internal.PendingInte
ntCallbackService (has extras) }: java.lang.IllegalArgumentException: Wake lock
not active: [email protected] from uid 10019
at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:2941
)
at android.app.ActivityThread.access$2100(ActivityThread.java:155)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1415)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5343)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit
.java:905)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:700)
at de.robv.android.xposed.XposedBridge.main(XposedBridge.java:115)
Caused by: java.lang.IllegalArgumentException: Wake lock not active: android.os.
[email protected] from uid 10019
at android.os.Parcel.readException(Parcel.java:1550)
at android.os.Parcel.readException(Parcel.java:1499)
at android.os.IPowerManager$Stub$Proxy.updateWakeLockWorkSource(IPowerMa
nager.java:468)
at android.os.PowerManager$WakeLock.setWorkSource(PowerManager.java:1102
)
at com.google.android.gms.stats.g.a(SourceFile:410)
at com.google.android.location.fused.cu.onReceive(SourceFile:466)
at android.support.v4.content.t.a(SourceFile:297)
at android.support.v4.content.t.b(SourceFile:278)
at com.google.android.location.internal.PendingIntentCallbackService.onS
tartCommand(SourceFile:90)
at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:2924
)
... 10 more
Which, if I read it correctly, means the Google Location Services crashed when it tried to access a prior wakelock and it's not there. However, it doesn't seem to be fatal. The other error immediately before this was regarding a different intent FLP_FULL_POWER, but same package and presumably same function.

The system_server crash, however, seems to be much more serious:
Process: system_server
Build: motorola/ghost_verizon/ghost:5.1/LPA23.12-39.7/7:user/release-keys

android.view.ViewRootImpl$CalledFromWrongThreadException: Only the original thre
ad that created a view hierarchy can touch its views.
at android.view.ViewRootImpl.checkThread(ViewRootImpl.java:6462)
at android.view.ViewRootImpl.invalidateChildInParent(ViewRootImpl.java:9
32)
at android.view.ViewRootImpl.invalidateChild(ViewRootImpl.java:927)
at android.view.View.invalidateInternal(View.java:11806)
at android.view.View.invalidate(View.java:11770)
at android.view.View.setFlags(View.java:9709)
at android.view.View.setVisibility(View.java:6698)
at com.android.internal.policy.impl.keyguard.KeyguardServiceDelegate$2.r
un(KeyguardServiceDelegate.java:322)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:135)
at android.os.HandlerThread.run(HandlerThread.java:61)
at com.android.server.ServiceThread.run(ServiceThread.java:46)
That suggests some sort of memory corruption, doesn't it, when one thread apparently tried to view something either doesn't belong to it, or is no longer there?

Did you think the system app crash (bad wakelocks) caused the server to crash? I have a suspect on why the wakelock got lost... Amplify again. I turned them back on as they don't seem to be hurting, but I did notice that GCoreFLP is usually recommended as limited. I have turned that limit off and we shall see if it crashed less in 24 hours.

In the meanwhile, if you all have any other suggestions, what other logs should I provide, and so on, maybe we can study it together. Having the phone spontaneously reboot on me is quite annoying.

UPDATE: I turned off the Amplify Limit of GCoreFLP thinking it had something to do with the wakelocks. Didn't crash once all morning when I was on WiFi. Left the house, rebooted 3-4 times within 45 minutes while on LTE/4G. It's definitely "network" related, but as for how, I have no idea.

UPDATE2: The only OTHER commonality I can see from this setup is GravityScreen... the "smart" screenblanker. Every once in a while I see it generate some strange toasts, like "Keyevent 26" and so on. I checked all three buttons carefully, there are no problems with any of them. So it's NOT a case of stuck buttons. However, I do occasionally notice that the "power" menu does pop up without me touching the buttons.

I've went back to a different smart screen blanker I got called Screebl and uninstalled GravityScreen as an experiment. We shall see if that is the problem...

The really sucky part is I can't seem to find what CAUSED the crash. The error logs so far doesn't say much. And yes, I have a log reader and filter tool. That's how I've been posting these.
 
Last edited:

kschang

Senior Member
Dec 11, 2010
440
72
0
San Francisco, CA
UPDATE: Somehow, replacing GravityScreen with Screebl (pro) have stopped my reboots altogether. My phone haven't had a reboot in 15 hours. I'm going to keep trying over the weekend. If it still hadn't had a spontaneous reboot, I think we can declare this problem "solved".

EDIT: nope. STILL crashes hard, and it has to be Xposed, as I just had a crash that was so hard it disabled Xposed upon launcher's reboot.

EDIT2: full day without reboot. Was streaming BT and browsing G+ when it just went kaboom. No button pushes whatsoever.

I am starting to wonder if some process in the background just timed out and decided "okay, doing too much ****, reboot!"
 
Last edited: