Debugging Stuck partial wake locks (background)

568 views
Skip to first unread message

Vlad Svoka

unread,
Jun 12, 2018, 6:52:14 PM6/12/18
to android-ndk
My app gets "Stuck partial wake locks (background)" bad behaviour badge on Google Play for 0.2% of sessions, all Android 8.0 or 8.1. I'm pretty sure it is because of Native Code I have.
Is there any way to debug this issue? I mean, ANRs and Crashes are reported by system, but is there any way to debug Partial Wake Locks? I don't even have any direct calls to it. My code literally have no mention of wake locks at all.

Also, almost all wake locks, according to google console, are happening over first minute. This is extremely frustrating, to be punished for something I have no idea why happens, and threshold is 0.1%...

I am looking for any methods to verify "Stuck partial wake locks (background)" on my device, so I can at least see if I fixed it without rolling out new updated to user not understanding what I even fixing :(

Vlad Svoka

unread,
Jun 13, 2018, 4:31:26 PM6/13/18
to android-ndk
I figured it out. Problem was in some audio decoding thread I didn't stop sometimes, so android decided to do AudioMix lock.
Real issue was fixed quite a while ago, but Google Play Vitals was extremely unhelpful by generating false positives for almost a week after issue was fixed already.
Even filtering by build which didn't have issue didn't help somehow.
Reply all
Reply to author
Forward
0 new messages