[Moto X Q&A] kschang:
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:

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:

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.