hi all,
when my android hangs, the ANR(or Watchdog?) will write stacks in /data/anr/trace.txt,
but I really want to know how get more hint in traces.txt,
for my knows, when main thread not response for 30 seconds,
system will write fro traces.txt first time, then write for second time in 1 minutes not response,
when we start to read traces.txt, I have some direction but doesn't know correct or not?
1)
should we start from ""android.server.ServerThread"?
is this process owns most hint for android hangs?
but actually I also can't realize system hangs from ""android.server.ServerThread"
such as
/////// whan system hangs ////////////
"android.server.ServerThread" prio=5 tid=8 NATIVE
| group="main" sCount=1 dsCount=0 s=N obj=0x45edae50 self=0x21e398
| sysTid=1101 nice=-2 sched=0/0 cgrp=default handle=2221272
at android.view.Surface.unlockCanvasAndPost(Native Method)
at android.view.ViewRoot.draw(ViewRoot.java:1431)
at android.view.ViewRoot.performTraversals(ViewRoot.java:1163)
at android.view.ViewRoot.handleMessage(ViewRoot.java:1727)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:123)
at com.android.server.ServerThread.run(SystemServer.java:528)
/////////////////////////////////////////////////////
2)
should we take care about process status,
such as NATIVE, WAIT, TIMED_WAIT...
does WAIT status affect android system?
does there exist more and more WAIT status process will increase hangs risk?
such as
/////// whan system hangs ////////////
"DHCP Handler Thread" prio=5 tid=44 WAIT
"GpsLocationProvider" prio=5 tid=39 TIMED_WAIT
"ThrottleService" prio=5 tid=38 WAIT
"LocationManagerService" prio=5 tid=37 WAIT
"WifiWatchdogThread" prio=5 tid=34 WAIT
"backup" prio=5 tid=32 WAIT
"AudioService" prio=5 tid=29 WAIT
"MountService" prio=5 tid=27 WAIT
"Tethering" prio=5 tid=26 WAIT
"WifiService" prio=5 tid=25 WAIT
"ConnectivityThread" prio=5 tid=24 TIMED_WAIT
"InputDispatcher" prio=5 tid=21 TIMED_WAIT
"WindowManagerPolicy" prio=5 tid=20 WAIT
"WindowManager" prio=5 tid=18 WAIT
"PowerManagerService" prio=5 tid=16 TIMED_WAIT
"SyncHandlerThread" prio=5 tid=14 WAIT
"AccountManagerService" prio=5 tid=13 WAIT
"PackageManager" prio=5 tid=11 WAIT
"ProcessStats" prio=5 tid=10 TIMED_WAIT
"ActivityManager" prio=5 tid=9 WAIT
/////////////////////////////////////////////////////
3)
my traces.txt first record is in "pid 1088 at 2000-01-07 14:07:55",
also, I used "logcat -v time" to store time stamp,
if traces.txt is writed when android not response for 30 seconds,
so should I take a look for what happen in "14:07:25" of logcat?
but from my logcat I can't see anything,
//////from my logcat/////////////////////////
01-07 14:07:25.158 D/wpa_supplicant( 1157): wpa_driver_tista_driver_cmd RSSI-APPROX
01-07 14:07:25.158 D/wpa_supplicant( 1157): rssi-approx command
01-07 14:07:25.158 D/wpa_supplicant( 1157): wpa_driver_tista_driver_cmd LINKSPEED
01-07 14:07:25.158 D/wpa_supplicant( 1157): Link Speed command
01-07 14:07:25.158 D/wpa_supplicant( 1157): buf LinkSpeed 54
///////////////////////////////////////////////////////
thanks for your time to figure out my problem,
but I really need some tips to realize my hangs problem.
Stanly