应用NE导致进程变为T状态出现了ANR

应用NE导致进程变为T状态出现了ANR_第1张图片

Activity: com.android.chrome/org.chromium.chrome.browser.ChromeTabbedActivity

Subject: Input dispatching timed out (Waiting to send key event because the focused window has not finished processing all of the input events that were previously delivered to it.  Outbound queue length: 0.  Wait queue length: 2.)

应用NE导致进程变为T状态出现了ANR_第2张图片

Running process:    Process 23985  Running thread:  <...>  State:   Debug

第一段持续时间:1,250.640 ms

第二段持续时间:266.774 ms

第三段持续时间:82.433 ms

//chrome发生Input ANR的Trace TAG位置,发生ANR的TAG往前看5秒左右的调度状态

ActivityManage-664   (  615) [000] ...1  8662.806157: tracing_mark_write: B|615|inputAnr com.android.chrome pid:23985 realTime:8869359

8662.806157对应的android time时间为02:23:57左右

-0     (-----) [003] d..3  8658.922912: sched_switch: prev_comm=swapper/3 prev_pid=0 prev_prio=120 prev_state=R ==> next_comm=.android.chrome next_pid=23985 next_prio=98

<...>-23985 (-----) [003] d..3  8658.923287: sched_switch: prev_comm=.android.chrome prev_pid=23985 prev_prio=98 prev_state=t ==> next_comm=crash_dump32 next_pid=3259 next_prio=120 extra_prev_state=K

prev_state=t

///// prev_pid=23985 prev_state=t状态为t说明进程已经停止

从8658.923287开始到8662.806157近4秒多的时间点,com.android.chrome目标进程一直

处于停止状态,导致收到的Key Event事件没有处理,出现了ANR。

8658.923287对应的时间为android time02::23:53左右

从main log上看

01-01 02:23:53.901724   336   336 I /system/bin/tombstoned: received crash request for pid 23985

01-01 02:23:53.902678  3259  3259 I crash_dump32: performing dump of process 23985 (target tid = 23985)

……

02:23:56.411160  3259  3259 I crash_dump: socket name: android:aee_aed, sfd: 9
….

02:23:56.420622  3274  3274 I AEE_AED : Dumping EXP/Native (NE)
…..

01-01 02:23:56.424809  3274  3274 I AEE_AED : Exception Class: Native (NE)

02:23:56.424850  3274  3274 I AEE_AED : Exception Type: SIGTRAP
…..

01-01 02:24:10.205318  3274  3274 I AEE_AED : aed_report_complete: OK find db slot /data/aee_exp/db.01.NE

而这段时间从进程状态和log上看是由于chrome发生了NE导致进程状态发生了改变。

Exception Class: Native (NE)

Exception Type: SIGTRAP

Current Executing Process:

  pid: 23985, tid: 23985

  com.android.chrome

acktrace:

    #00 pc 021dafd4  /system/app/Chrome/Chrome.apk (offset 0xf2d000)

    #01 pc 021dafe3  /system/app/Chrome/Chrome.apk (offset 0xf2d000)

stack:

         bef5caf0  00000000

         bef5caf4  00000000

         bef5caf8  7ffff000

         bef5cafc  af680f89  /system/lib/libc.so (ifree+492)

         bef5cb00  0000000c

         bef5cb04  9190cef0  [anon:libc_malloc]

         bef5cb08  acb0b008  [anon:libc_malloc]

         bef5cb0c  9c7c6df0  [anon:.bss]

         bef5cb10  9c50b6d4  /system/app/Chrome/Chrome.apk

         bef5cb14  9340cfcc  [anon:libc_malloc]

         bef5cb18  9c2bbed9  /system/app/Chrome/Chrome.apk

         bef5cb1c  af68120b  /system/lib/libc.so (je_free+74)

         bef5cb20  9c2b9c65  /system/app/Chrome/Chrome.apk

结论:

  这个ANR是由于过程中发生了NE导致进程被置为t状态即停止,导致收到的Key Event事件没有处理出现了ANR。

你可能感兴趣的:(应用NE导致进程变为T状态出现了ANR)