1. 程式人生 > >android展訊平臺 重啟案例分析(二)

android展訊平臺 重啟案例分析(二)

./0000.log  watchdog重啟

01-02 02:01:02.458   551  1010 W Watchdog: *** WATCHDOG KILLING SYSTEM PROCESS: Blocked in monitor com.android.server.am.ActivityManagerServiceEx on foreground thread (android.fg)

然後參看cpu使用情況:

系統負載大導致的系統執行慢. 809864:M781C34 01-02 02:00:18.507   551  1010 D SprdRuntimeInfo:   From time 50511225ms(2018-01-01 18:59:59.146609384 UTC) to 50521225ms(2018-01-01 19:00:09.146615031 UTC). 809865:M781C35 01-02 02:00:18.507   551  1010 D SprdRuntimeInfo:  809866:M781C36 01-02 02:00:18.507   551  1010 D SprdRuntimeInfo:  * CPU USAGE:                                                                              | * OTHER COUNTS: 809867:M781C37 01-02 02:00:18.507   551  1010 D SprdRuntimeInfo:  -2-          IDLE     USER   SYSTEM     NICE   IOWAIT      IRQ  SOFTIRQ    STEAL    TOTAL |     CTXT_SWITCH        FG_FAULT    FG_MAJ_FAULT 809868:M781C38 01-02 02:00:18.507   551  1010 D SprdRuntimeInfo:  cpu0(1):    0.00%    0.64%   98.66%    0.06%    0.00%    0.00%    0.61%    0.00%  100.00% |            7907            2500             386 809869:M781C39 01-02 02:00:18.507   551  1010 D SprdRuntimeInfo:  cpu1(1):    0.00%    0.80%   99.06%    0.00%    0.06%    0.00%    0.06%    0.00%  100.00% |           15330            2928            1280 809870:M781C3A 01-02 02:00:18.507   551  1010 D SprdRuntimeInfo:  cpu2(1):    0.05%    0.67%   98.22%    0.00%    0.00%    0.00%    1.04%    0.00%  100.00% |            5454            2008             450 809871:M781C3B 01-02 02:00:18.508   551  1010 D SprdRuntimeInfo:  cpu3(1):    0.00%    0.20%   44.86%    0.00%   54.92%    0.00%    0.00%    0.00%  100.00% |            8092            1732             373 809872:M781C3C 01-02 02:00:18.508   551  1010 D SprdRuntimeInfo:  ------------------ 809873:M781C3D 01-02 02:00:18.508   551  1010 D SprdRuntimeInfo:  Total:      0.00%    0.57%   83.87%    0.01%   15.15%    0.00%    0.36%    0.00%  100.00% |           36783            9168            2489 從執行緒資訊來看,如下兩個執行緒佔用CPU比較多了. SprdRuntimeInfo:  785        0.00%  4513.62%  4513.62%    writer SprdRuntimeInfo:  11197     14.90%   527.32%   542.22%    Audio Offload d

而且從Log來看,這兩個執行緒一直在吐大量的錯誤資訊,可以確認是audio異常導致的重啟

808096 M781588 01-02 01:59:54.055   291 11197 E audio_hw_cps: peter: mp3_decode_process error -100, pcm left : 2112 808097 M781589 01-02 01:59:54.055   291 11197 E audio_hw_cps: peter: pcm data is end and return to end playback 2112 808098 M78158A 01-02 01:59:54.075   291 11197 E audio_hw_cps: error: pcm_state 1 808099 M78158B 01-02 01:59:54.082   291 11197 E audio_hw_cps: peter: stream_peek ret -1 808100 M78158C 01-02 01:59:54.082   291 11197 E audio_hw_cps: mp3_demux_frame error ret -100 808101 M78158D 01-02 01:59:54.082   291 11197 E audio_hw_cps: peter: mp3_decode_process error -100, pcm left : 2112 808102 M78158E 01-02 01:59:54.082   291 11197 E audio_hw_cps: peter: pcm data is end and return to end playback 2112 808103 M78158F 01-02 01:59:54.102   291 11197 E audio_hw_cps: error: pcm_state 1 808104 M781590 01-02 01:59:54.109   291 11197 E audio_hw_cps: peter: stream_peek ret -1 808105 M781591 01-02 01:59:54.109   291 11197 E audio_hw_cps: mp3_demux_frame error ret -100 808106 M781592 01-02 01:59:54.109   291 11197 E audio_hw_cps: peter: mp3_decode_process error -100, pcm left : 2112 808107 M781593 01-02 01:59:54.109   291 11197 E audio_hw_cps: peter: pcm data is end and return to end playback 2112 808108 M781594 01-02 01:59:54.129   291 11197 E audio_hw_cps: error: pcm_state 1 808109 M781595 01-02 01:59:54.136   291 11197 E audio_hw_cps: peter: stream_peek ret -1 808110 M781596 01-02 01:59:54.136   291 11197 E audio_hw_cps: mp3_demux_frame error ret -100 808111 M781597 01-02 01:59:54.136   291 11197 E audio_hw_cps: peter: mp3_decode_process error -100, pcm left : 2112 808112 M781598 01-02 01:59:54.136   291 11197 E audio_hw_cps: peter: pcm data is end and return to end playback 2112 808113 M781599 01-02 01:59:54.157   291 11197 E audio_hw_cps: error: pcm_state 1 808114 M78159A 01-02 01:59:54.163   291 11197 E audio_hw_cps: peter: stream_peek ret -1 808115 M78159B 01-02 01:59:54.163   291 11197 E audio_hw_cps: mp3_demux_frame error ret -100 808116 M78159C 01-02 01:59:54.163   291 11197 E audio_hw_cps: peter: mp3_decode_process error -100, pcm left : 2112 808117 M78159D 01-02 01:59:54.163   291 11197 E audio_hw_cps: peter: pcm data is end and return to end playback 2112 808118 M78159E 01-02 01:59:54.184   291 11197 E audio_hw_cps: error: pcm_state 1 808119 M78159F 01-02 01:59:54.190   291 11197 E audio_hw_cps: peter: stream_peek ret -1 808120 M7815A0 01-02 01:59:54.190   291 11197 E audio_hw_cps: mp3_demux_frame error ret -100 808121 M7815A1 01-02 01:59:54.191   291 11197 E audio_hw_cps: peter: mp3_decode_process error -100, pcm left : 2112 808122 M7815A2 01-02 01:59:54.191   291 11197 E audio_hw_cps: peter: pcm data is end and return to end playback 2112 808123 M7815A3 01-02 01:59:54.211   291 11197 E audio_hw_cps: error: pcm_state 1 808124 M7815A4 01-02 01:59:54.218   291 11197 E audio_hw_cps: peter: stream_peek ret -1 808125 M7815A5 01-02 01:59:54.218   291 11197 E audio_hw_cps: mp3_demux_frame error ret -100 808126 M7815A6 01-02 01:59:54.218   291 11197 E audio_hw_cps: peter: mp3_decode_process error -100, pcm left : 2112 809709:M781BBA 01-02 02:00:16.611   291   785 D audio_hw_primary: out_write debug 130(index), 3840(bytes), 499200(total bytes), lastthis:527850623, 200000(gate), pcmwrite:10396, 200000(gate), sleep:0, 2000(gate). 809710:M781BBB 01-02 02:00:16.633   291   785 D audio_hw_primary: out_write debug 131(index), 3840(bytes), 503040(total bytes), lastthis:527850623, 200000(gate), pcmwrite:10384, 200000(gate), sleep:0, 2000(gate). 809711:M781BBC 01-02 02:00:16.654   291   785 D audio_hw_primary: out_write debug 132(index), 3840(bytes), 506880(total bytes), lastthis:527850623, 200000(gate), pcmwrite:9458, 200000(gate), sleep:0, 2000(gate). 809712:M781BBD 01-02 02:00:16.676   291   785 D audio_hw_primary: out_write debug 133(index), 3840(bytes), 510720(total bytes), lastthis:527850623, 200000(gate), pcmwrite:10422, 200000(gate), sleep:0, 2000(gate). 809715:M781BC0 01-02 02:00:16.697   291   785 D audio_hw_primary: out_write debug 134(index), 3840(bytes), 514560(total bytes), lastthis:527850623, 200000(gate), pcmwrite:9407, 200000(gate), sleep:0, 2000(gate). 809716:M781BC1 01-02 02:00:16.719   291   785 D audio_hw_primary: out_write debug 135(index), 3840(bytes), 518400(total bytes), lastthis:527850623, 200000(gate), pcmwrite:10395, 200000(gate), sleep:0, 2000(gate). 809717:M781BC2 01-02 02:00:16.741   291   785 D audio_hw_primary: out_write debug 136(index), 3840(bytes), 522240(total bytes), lastthis:527850623, 200000(gate), pcmwrite:10498, 200000(gate), sleep:0, 2000(gate). 809718:M781BC3 01-02 02:00:16.762   291   785 D audio_hw_primary: out_write debug 137(index), 3840(bytes), 526080(total bytes), lastthis:527850623, 200000(gate), pcmwrite:9476, 200000(gate), sleep:0, 2000(gate). 809719:M781BC4 01-02 02:00:16.785   291   785 D audio_hw_primary: out_write debug 138(index), 3840(bytes), 529920(total bytes), lastthis:527850623, 200000(gate), pcmwrite:10426, 200000(gate), sleep:0, 2000(gate). 809720:M781BC5 01-02 02:00:16.806   291   785 D audio_hw_primary: out_write debug 139(index), 3840(bytes), 533760(total bytes), lastthis:527850623, 200000(gate), pcmwrite:9449, 200000(gate), sleep:0, 2000(gate). 809721:M781BC6 01-02 02:00:16.828   291   785 D audio_hw_primary: out_write debug 140(index), 3840(bytes), 537600(total bytes), lastthis:527850623, 200000(gate), pcmwrite:10426, 200000(gate), sleep:0, 2000(gate). 809722:M781BC7 01-02 02:00:16.850   291   785 D audio_hw_primary: out_write debug 141(index), 3840(bytes), 541440(total bytes), lastthis:527850623, 200000(gate), pcmwrite:10260, 200000(gate), sleep:0, 2000(gate). 809723:M781BC8 01-02 02:00:16.871   291   785 D audio_hw_primary: out_write debug 142(index), 3840(bytes), 545280(total bytes), lastthis:527850623, 200000(gate), pcmwrite:9385, 200000(gate), sleep:0, 2000(gate). 809725:M781BCA 01-02 02:00:16.893   291   785 D audio_hw_primary: out_write debug 143(index), 3840(bytes), 549120(total bytes), lastthis:527850623, 200000(gate), pcmwrite:10332, 200000(gate), sleep:0, 2000(gate). 809726:M781BCB 01-02 02:00:16.915   291   785 D audio_hw_primary: out_write debug 144(index), 3840(bytes), 552960(total bytes), lastthis:527850623, 200000(gate), pcmwrite:9342, 200000(gate), sleep:0, 2000(gate). 809727:M781BCC 01-02 02:00:16.936   291   785 D audio_hw_primary: out_write debug 145(index), 3840(bytes), 556800(total bytes), lastthis:527850623, 200000(gate), pcmwrite:10262, 200000(gate), sleep:0, 2000(gate). 809728:M781BCD 01-02 02:00:16.958   291   785 D audio_hw_primary: out_write debug 146(index), 3840(bytes), 560640(total bytes), lastthis:527850623, 200000(gate), pcmwrite:10305, 200000(gate), sleep:0, 2000(gate).