dhafer8860 / roottools

Automatically exported from code.google.com/p/roottools
0 stars 0 forks source link

ANR on isRootAvailable() reported by Google Play #34

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
I cannot reproduce it, but the Google Play dev console reports this ANR

DALVIK THREADS:
(mutexes: tll=0 tsl=0 tscl=0 ghl=0)
"main" prio=5 tid=1 TIMED_WAIT
| group="main" sCount=1 dsCount=0 obj=0x40c57460 self=0x1108868
| sysTid=22803 nice=0 sched=0/0 cgrp=default handle=1074107656
| schedstat=( 191488521 62758911 315 ) utm=12 stm=7 core=0
at java.lang.Object.wait(Native Method)
- waiting on <0x41ad6ac8> (a java.lang.VMThread) held by tid=17 (Thread-4752)
at java.lang.Thread.join(Thread.java:822)
at java.lang.Thread.join(Thread.java:778)
at com.stericson.RootTools.execution.Shell.<init>(Shell.java:68)
at com.stericson.RootTools.execution.Shell.startRootShell(Shell.java:309)
at com.stericson.RootTools.execution.Shell.startRootShell(Shell.java:291)
at 
com.stericson.RootTools.internal.RootToolsInternalMethods.returnPath(RootToolsIn
ternalMethods.java:82)
at 
com.stericson.RootTools.internal.RootToolsInternalMethods.getPath(RootToolsInter
nalMethods.java:1045)
at com.stericson.RootTools.RootTools.getPath(RootTools.java:419)
at 
com.stericson.RootTools.internal.RootToolsInternalMethods.findBinary(RootToolsIn
ternalMethods.java:604)
at com.stericson.RootTools.RootTools.findBinary(RootTools.java:269)
at com.stericson.RootTools.RootTools.isRootAvailable(RootTools.java:668)
at 
com.benhirashima.unlockwithwifi.common.DeviceAdminIntro.showMessage(DeviceAdminI
ntro.java:97)
at 
com.benhirashima.unlockwithwifi.common.DeviceAdminIntro.onResume(DeviceAdminIntr
o.java:64)
at android.app.Instrumentation.callActivityOnResume(Instrumentation.java:1158)
at android.app.Activity.performResume(Activity.java:4607)
at android.app.ActivityThread.performResumeActivity(ActivityThread.java:2448)
at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:2486)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2000)
at android.app.ActivityThread.access$600(ActivityThread.java:128)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1161)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4517)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at 
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:993)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:760)
at dalvik.system.NativeStart.main(Native Method)

What is the expected output? What do you see instead?
NA

What version of the product are you using? On what operating system?
Using version 2.6. OS version not given by Google Play.

Please provide any additional information below.

Original issue reported on code.google.com by benhiras...@gmail.com on 14 Jun 2013 at 4:45

GoogleCodeExporter commented 8 years ago
how often is this happening? Also, what is the app that this is in?

Original comment by Stericso...@gmail.com on 17 Jun 2013 at 3:23

GoogleCodeExporter commented 8 years ago
it doesn't happen often. the dev console reported it 4 times over about a 
month. that accounts for a few thousand users. 

the app is called Unlock With Wifi

i didn't post the entire report last time. sorry about that. here's the whole 
thing.

DALVIK THREADS:
(mutexes: tll=0 tsl=0 tscl=0 ghl=0)
"main" prio=5 tid=1 TIMED_WAIT
| group="main" sCount=1 dsCount=0 obj=0x40c57460 self=0x1108868
| sysTid=25600 nice=0 sched=0/0 cgrp=default handle=1074107656
| schedstat=( 147041159 58972211 328 ) utm=6 stm=8 core=0
at java.lang.Object.wait(Native Method)
- waiting on <0x41a19e10> (a java.lang.VMThread) held by tid=16 (Thread-1193)
at java.lang.Thread.join(Thread.java:822)
at java.lang.Thread.join(Thread.java:778)
at com.stericson.RootTools.execution.Shell.<init>(Shell.java:68)
at com.stericson.RootTools.execution.Shell.startRootShell(Shell.java:309)
at com.stericson.RootTools.execution.Shell.startRootShell(Shell.java:291)
at 
com.stericson.RootTools.internal.RootToolsInternalMethods.returnPath(RootToolsIn
ternalMethods.java:82)
at 
com.stericson.RootTools.internal.RootToolsInternalMethods.getPath(RootToolsInter
nalMethods.java:1045)
at com.stericson.RootTools.RootTools.getPath(RootTools.java:419)
at 
com.stericson.RootTools.internal.RootToolsInternalMethods.findBinary(RootToolsIn
ternalMethods.java:604)
at com.stericson.RootTools.RootTools.findBinary(RootTools.java:269)
at com.stericson.RootTools.RootTools.isRootAvailable(RootTools.java:668)
at 
com.benhirashima.unlockwithwifi.common.DeviceAdminIntro.showMessage(DeviceAdminI
ntro.java:97)
at 
com.benhirashima.unlockwithwifi.common.DeviceAdminIntro.onResume(DeviceAdminIntr
o.java:64)
at android.app.Instrumentation.callActivityOnResume(Instrumentation.java:1158)
at android.app.Activity.performResume(Activity.java:4607)
at android.app.ActivityThread.performResumeActivity(ActivityThread.java:2448)
at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:2486)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2000)
at android.app.ActivityThread.access$600(ActivityThread.java:128)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1161)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4517)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at 
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:993)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:760)
at dalvik.system.NativeStart.main(Native Method)

"Thread-1194" prio=5 tid=17 TIMED_WAIT
| group="main" sCount=1 dsCount=0 obj=0x41a139d0 self=0x12f2cc0
| sysTid=25699 nice=0 sched=0/0 cgrp=default handle=19176136
| schedstat=( 14770126 1345249 10 ) utm=0 stm=1 core=0
at java.lang.Object.wait(Native Method)
- waiting on <0x41a13ba0> (a java.lang.VMThread) held by tid=17 (Thread-1194)
at java.lang.Thread.parkFor(Thread.java:1231)
at sun.misc.Unsafe.park(Unsafe.java:323)
at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:197)
at 
java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos
(AbstractQueuedSynchronizer.java:2061)
at java.util.concurrent.ArrayBlockingQueue.poll(ArrayBlockingQueue.java:360)
at com.apsalar.sdk.ApsalarRetryThread.run(ApThread.java:538)

"Thread-1193" prio=5 tid=16 NATIVE
| group="main" sCount=1 dsCount=0 obj=0x41a19d00 self=0x1380350
| sysTid=25680 nice=0 sched=0/0 cgrp=default handle=20522584
| schedstat=( 329042 0 2 ) utm=0 stm=0 core=3
at libcore.io.Posix.readBytes(Native Method)
at libcore.io.Posix.read(Posix.java:118)
at libcore.io.BlockGuardOs.read(BlockGuardOs.java:149)
at libcore.io.IoBridge.read(IoBridge.java:422)
at java.io.FileInputStream.read(FileInputStream.java:179)
at java.io.InputStreamReader.read(InputStreamReader.java:244)
at java.io.BufferedReader.fillBuf(BufferedReader.java:130)
at java.io.BufferedReader.readLine(BufferedReader.java:354)
at com.stericson.RootTools.execution.Shell$Worker.run(Shell.java:397)

"Binder Thread #3" prio=5 tid=15 NATIVE
| group="main" sCount=1 dsCount=0 obj=0x41adef50 self=0x11f42b0
| sysTid=25655 nice=0 sched=0/0 cgrp=default handle=18958080
| schedstat=( 558875 2560499 4 ) utm=0 stm=0 core=3
at dalvik.system.NativeStart.run(Native Method)

"java.lang.ProcessManager" daemon prio=5 tid=14 WAIT
| group="main" sCount=1 dsCount=0 obj=0x41aded98 self=0x12ccf10
| sysTid=25653 nice=0 sched=0/0 cgrp=default handle=20291104
| schedstat=( 1250957 7524000 13 ) utm=0 stm=0 core=0
at java.lang.Object.wait(Native Method)
- waiting on <0x41adec00> (a java.util.HashMap)
at java.lang.Object.wait(Object.java:364)
at java.lang.ProcessManager.waitForMoreChildren(ProcessManager.java:140)
at java.lang.ProcessManager.watchChildren(ProcessManager.java:105)
at java.lang.ProcessManager.access$000(ProcessManager.java:40)
at java.lang.ProcessManager$1.run(ProcessManager.java:58)

"AsyncTask #1" prio=5 tid=13 WAIT
| group="main" sCount=1 dsCount=0 obj=0x41ac9f20 self=0x1392180
| sysTid=25652 nice=10 sched=0/0 cgrp=bg_non_interactive handle=20005472
| schedstat=( 574249 7340168 11 ) utm=0 stm=0 core=1
at java.lang.Object.wait(Native Method)
- waiting on <0x41aca0b8> (a java.lang.VMThread) held by tid=13 (AsyncTask #1)
at java.lang.Thread.parkFor(Thread.java:1231)
at sun.misc.Unsafe.park(Unsafe.java:323)
at java.util.concurrent.locks.LockSupport.park(LockSupport.java:157)
at 
java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(Abst
ractQueuedSynchronizer.java:2022)
at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:413)
at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1009)
at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1069)
at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:569)
at java.lang.Thread.run(Thread.java:856)

"IntentService[TrialAuthService]" prio=5 tid=12 NATIVE
| group="main" sCount=1 dsCount=0 obj=0x41ac84a0 self=0x1372b48
| sysTid=25651 nice=0 sched=0/0 cgrp=default handle=20050624
| schedstat=( 1072375 1223126 8 ) utm=0 stm=0 core=3
at android.os.MessageQueue.nativePollOnce(Native Method)
at android.os.MessageQueue.next(MessageQueue.java:118)
at android.os.Looper.loop(Looper.java:118)
at android.os.HandlerThread.run(HandlerThread.java:60)

"RefQueueWorker@org.apache.http.impl.conn.tsccm.ConnPoolByRoute@41a5afa8" 
daemon prio=5 tid=11 WAIT
| group="main" sCount=1 dsCount=0 obj=0x41a5f790 self=0x138cda8
| sysTid=25616 nice=0 sched=0/0 cgrp=default handle=19681064
| schedstat=( 84667 0 2 ) utm=0 stm=0 core=1
at java.lang.Object.wait(Native Method)
- waiting on <0x41a5e068> (a java.lang.ref.ReferenceQueue)
at java.lang.Object.wait(Object.java:401)
at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:102)
at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:73)
at org.apache.http.impl.conn.tsccm.RefQueueWorker.run(RefQueueWorker.java:102)
at java.lang.Thread.run(Thread.java:856)

"ApsalarThread" daemon prio=5 tid=10 TIMED_WAIT
| group="main" sCount=1 dsCount=0 obj=0x419ed7b8 self=0x12c4ad8
| sysTid=25615 nice=0 sched=0/0 cgrp=default handle=19845664
| schedstat=( 18815751 5140002 40 ) utm=1 stm=0 core=0
at java.lang.Object.wait(Native Method)
- waiting on <0x419edae0> (a java.lang.VMThread) held by tid=10 (ApsalarThread)
at java.lang.Thread.parkFor(Thread.java:1231)
at sun.misc.Unsafe.park(Unsafe.java:323)
at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:197)
at 
java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos
(AbstractQueuedSynchronizer.java:2061)
at java.util.concurrent.ArrayBlockingQueue.poll(ArrayBlockingQueue.java:360)
at com.apsalar.sdk.ApsalarThread.buffering(ApThread.java:427)
at com.apsalar.sdk.ApsalarThread.run(ApThread.java:176)

"Binder Thread #2" prio=5 tid=9 NATIVE
| group="main" sCount=1 dsCount=0 obj=0x419f3648 self=0x1381e20
| sysTid=25611 nice=0 sched=0/0 cgrp=default handle=19893464
| schedstat=( 3958999 2148750 16 ) utm=0 stm=0 core=3
at dalvik.system.NativeStart.run(Native Method)

"Binder Thread #1" prio=5 tid=8 NATIVE
| group="main" sCount=1 dsCount=0 obj=0x419f3148 self=0x1357e28
| sysTid=25610 nice=0 sched=0/0 cgrp=default handle=19120024
| schedstat=( 3414707 4120709 18 ) utm=0 stm=0 core=3
at dalvik.system.NativeStart.run(Native Method)

"FinalizerWatchdogDaemon" daemon prio=5 tid=7 WAIT
| group="main" sCount=1 dsCount=0 obj=0x419efd70 self=0x12eb350
| sysTid=25609 nice=0 sched=0/0 cgrp=default handle=19893400
| schedstat=( 261584 6656083 6 ) utm=0 stm=0 core=3
at java.lang.Object.wait(Native Method)
- waiting on <0x40c5ec98> (a java.lang.Daemons$FinalizerWatchdogDaemon)
at java.lang.Object.wait(Object.java:364)
at java.lang.Daemons$FinalizerWatchdogDaemon.run(Daemons.java:213)
at java.lang.Thread.run(Thread.java:856)

"FinalizerDaemon" daemon prio=5 tid=6 WAIT
| group="main" sCount=1 dsCount=0 obj=0x419efc18 self=0x136ecb0
| sysTid=25608 nice=0 sched=0/0 cgrp=default handle=19866480
| schedstat=( 1460958 205667 8 ) utm=0 stm=0 core=0
at java.lang.Object.wait(Native Method)
- waiting on <0x40c4d5d0> (a java.lang.ref.ReferenceQueue)
at java.lang.Object.wait(Object.java:401)
at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:102)
at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:73)
at java.lang.Daemons$FinalizerDaemon.run(Daemons.java:168)
at java.lang.Thread.run(Thread.java:856)

"ReferenceQueueDaemon" daemon prio=5 tid=5 WAIT
| group="main" sCount=1 dsCount=0 obj=0x419efab0 self=0x13950c0
| sysTid=25607 nice=0 sched=0/0 cgrp=default handle=19670184
| schedstat=( 473917 289459 8 ) utm=0 stm=0 core=0
at java.lang.Object.wait(Native Method)
- waiting on <0x40c4d4f8>
at java.lang.Object.wait(Object.java:364)
at java.lang.Daemons$ReferenceQueueDaemon.run(Daemons.java:128)
at java.lang.Thread.run(Thread.java:856)

"Compiler" daemon prio=5 tid=4 VMWAIT
| group="system" sCount=1 dsCount=0 obj=0x419ef9c0 self=0x13596f8
| sysTid=25605 nice=0 sched=0/0 cgrp=default handle...

Original comment by benhiras...@gmail.com on 17 Jun 2013 at 4:50

GoogleCodeExporter commented 8 years ago
This issue happened to me as well.

My solution was to put the first request for isRootAvailable into a thread. 
This is anyway better, because if the user is prompted for root access the app 
will block.

Original comment by tob...@schulz-hess.de on 4 Jul 2013 at 8:43

GoogleCodeExporter commented 8 years ago
isRootAvailable is a blocking command, as stated above it should be used within 
a thread.

Most static "conveniance" methods within RootTools are blocking and should be 
used within a thread.

Original comment by Stericso...@gmail.com on 4 Jul 2013 at 2:59