系统卡死问题分析

问题背景:

 

测试对平板 系统进行monkey压测时,出现了应用界面卡死的情况。

测试脚本:monkey --ignore-crashes --ignore-timeouts --kill-process-after-error --ignore-security-exceptions --throttle 200 -v -v -v -s 5 10000000 1>>/sdcard/log.log 2>>/sdcard/log_err.log

一边测试一边抓取logcat并实时保存到机器中。

 

 

拿到log,我们可以翻到log的最后看看,有什么异常的打印:

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

06-24 19:27:01.613  3606  3606 I ServiceManager: Waiting for service sensorservice...

06-24 19:27:01.664  3606  3606 I ServiceManager: Waiting for service sensorservice...

06-24 19:27:01.714  3606  3606 I ServiceManager: Waiting for service sensorservice...

06-24 19:27:01.765  3606  3606 I ServiceManager: Waiting for service sensorservice...

06-24 19:27:01.817  3606  3606 I ServiceManager: Waiting for service sensorservice...

06-24 19:27:01.867  3606  3606 I ServiceManager: Waiting for service sensorservice...

06-24 19:27:01.918  3606  3606 I ServiceManager: Waiting for service sensorservice...

06-24 19:27:01.969  3606  3606 I ServiceManager: Waiting for service sensorservice...

06-24 19:27:02.020  3606  3606 I ServiceManager: Waiting for service sensorservice...

06-24 19:27:02.071  3606  3606 I ServiceManager: Waiting for service sensorservice...

06-24 19:27:02.122  3606  3606 I ServiceManager: Waiting for service sensorservice...

06-24 19:27:02.173  3606  3606 I ServiceManager: Waiting for service sensorservice...

06-24 19:27:02.224  3606  3606 I ServiceManager: Waiting for service sensorservice...

06-24 19:27:02.275  3606  3606 I ServiceManager: Waiting for service sensorservice...

06-24 19:27:02.326  3606  3606 I ServiceManager: Waiting for service sensorservice...

06-24 19:27:02.377  3606  3606 I ServiceManager: Waiting for service sensorservice...

06-24 19:27:02.427  3606  3606 I ServiceManager: Waiting for service sensorservice...

06-24 19:27:02.478  3606  3606 I ServiceManager: Waiting for service sensorservice...

06-24 19:27:02.529  3606  3606 I ServiceManager: Waiting for service sensorservice...

06-24 19:27:02.580  3606  3606 I ServiceManager: Waiting for service sensorservice...

06-24 19:27:02.631  3606  3606 I ServiceManager: Waiting for service sensorservice...

06-24 19:27:02.682  3606  3606 I ServiceManager: Waiting for service sensorservice...

06-24 19:27:02.733  3606  3606 I ServiceManager: Waiting for service sensorservice...

 

log一直打印ServiceManager 在等待sensorService。

 

当我们第一眼看到这个的时候,一般会想是不是sensor出问题了?还是这个sensorservice被别人杀死了呢?

 

直接找关键字sensorservice 看看是否有相关的异常:

06-24 16:22:04.855 552 610 I chatty : uid=1000(system) SensorService expire 1 line
06-24 16:22:04.856 552 609 D SensorService: new thread SensorEventAckReceiver
06-24 16:47:28.476 552 575 E ActivityManager: 1.8% 610/SensorService: 0% user + 1.8% kernel
06-24 16:49:21.632 246 1102 W Sensors : sensorservice died [0xf4b08a40]
06-24 16:49:21.633 770 1756 W Sensors : sensorservice died [0x70b8182780]
06-24 16:49:21.633 893 911 W Sensors : sensorservice died [0x70a6c0fac0]
06-24 16:49:21.636 236 236 I ServiceManager: service 'sensorservice' died
06-24 16:49:25.229 2840 2840 I ServiceManager: Waiting for service sensorservice...
06-24 16:49:25.280 2840 2840 I ServiceManager: Waiting for service sensorservice...
06-24 16:49:25.331 2840 2840 I ServiceManager: Waiting for service sensorservice...

从上面log我们可以知道,在06-24 16:49:21.632时 sensorservice 就已经挂了,所以还得往前看是由于什么导致sensorservice 死掉了。

 

06-24 16:49:15.713 552 938 I Watchdog_N: dumpKernelStacks
06-24 16:49:15.856 552 938 I Watchdog: Reporting stuck state to activity controller
06-24 16:49:21.016 552 573 W InputManager: Input event injection from pid 1763 timed out.
06-24 16:49:21.020 552 938 W Watchdog: *** WATCHDOG KILLING SYSTEM PROCESS: Blocked in monitor com.android.server.am.ActivityManagerService on foreground thread (android.fg), Blocked in handler on display thread (android.display)
06-24 16:49:21.021 552 938 W Watchdog: foreground thread stack trace:
06-24 16:49:21.022 552 938 W Watchdog: at com.android.server.am.ActivityManagerService.monitor(ActivityManagerService.java:21960)
06-24 16:49:21.022 552 938 W Watchdog: at com.android.server.Watchdog$HandlerChecker.run(Watchdog.java:179)
06-24 16:49:21.022 552 938 W Watchdog: at android.os.Handler.handleCallback(Handler.java:757)
06-24 16:49:21.023 552 938 W Watchdog: at android.os.Handler.dispatchMessage(Handler.java:97)
06-24 16:49:21.023 552 938 W Watchdog: at android.os.Looper.loop(Looper.java:154)
06-24 16:49:21.023 552 938 W Watchdog: at android.os.HandlerThread.run(HandlerThread.java:61)
06-24 16:49:21.023 552 938 W Watchdog: at com.android.server.ServiceThread.run(ServiceThread.java:46)
06-24 16:49:21.024 552 938 W Watchdog: display thread stack trace:
06-24 16:49:21.025 552 938 W Watchdog: at com.android.server.wm.WindowManagerService$H.handleMessage(WindowManagerService.java:8663)
06-24 16:49:21.025 552 938 W Watchdog: at android.os.Handler.dispatchMessage(Handler.java:104)
06-24 16:49:21.025 552 938 W Watchdog: at android.os.Looper.loop(Looper.java:154)
06-24 16:49:21.025 552 938 W Watchdog: at android.os.HandlerThread.run(HandlerThread.java:61)
06-24 16:49:21.025 552 938 W Watchdog: at com.android.server.ServiceThread.run(ServiceThread.java:46)
06-24 16:49:21.026 552 938 W Watchdog: *** GOODBYE!
06-24 16:49:21.026 552 938 I Process : Sending signal. PID: 552 SIG: 9
06-24 16:49:21.222 1763 1763 E JavaBinder: !!! FAILED BINDER TRANSACTION !!! (parcel size = 192)
06-24 16:49:21.224 1763 1763 E JavaBinder: !!! FAILED BINDER TRANSACTION !!! (parcel size = 68)
06-24 16:49:21.225 1763 1763 D AndroidRuntime: Shutting down VM
06-24 16:49:21.226 1763 1763 E AndroidRuntime: *** FATAL EXCEPTION IN SYSTEM PROCESS: main
06-24 16:49:21.226 1763 1763 E AndroidRuntime: DeadSystemException: The system died; earlier logs will point to the root cause
06-24 16:49:21.228 1763 1763 E AndroidRuntime: Error reporting crash
06-24 16:49:21.228 1763 1763 E AndroidRuntime: java.lang.RuntimeException: Bad file descriptor
06-24 16:49:21.228 1763 1763 E AndroidRuntime: at android.os.BinderProxy.transactNative(Native Method)
06-24 16:49:21.228 1763 1763 E AndroidRuntime: at android.os.BinderProxy.transact(Binder.java:615)
06-24 16:49:21.228 1763 1763 E AndroidRuntime: at android.app.ActivityManagerProxy.handleApplicationCrash(ActivityManagerNative.java:5133)
06-24 16:49:21.228 1763 1763 E AndroidRuntime: at com.android.internal.os.RuntimeInit$UncaughtHandler.uncaughtException(RuntimeInit.java:97)
06-24 16:49:21.228 1763 1763 E AndroidRuntime: at java.lang.ThreadGroup.uncaughtException(ThreadGroup.java:1068)
06-24 16:49:21.228 1763 1763 E AndroidRuntime: at java.lang.ThreadGroup.uncaughtException(ThreadGroup.java:1063)
06-24 16:49:21.228 1763 1763 I Process : Sending signal. PID: 1763 SIG: 9
06-24 16:49:21.623 235 235 I lowmemorykiller: ActivityManager disconnec

  • 12
    点赞
  • 15
    收藏
    觉得还不错? 一键收藏
  • 3
    评论
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值