Bug #118389

测试 Test-ST #113421: V4.0功能与专项测试

测试 Test-ST #113422: V4.0专项--AF专项--monkey测试

【AF】【EVT3】【Monkey】Device#1&2(4+27个APK-内部测试命令)测试12H,出现一些ANR

Added by CD TEST-方永红 about 2 years ago. Updated almost 2 years ago.

Status:CLOSEDStart date:2023-05-31
Priority:HighDue date:
Assignee:物联网测试组_TSCD 王维% Done:

0%

Category:稳定性
Target version:-
Need_Info:TEST Found Version:0106(5.29版)
Resolution:-- Degrated:--
Severity:Major Verified Version:
Reproducibility:Rarely Fixed Version:
Test Type:ST Root cause:

Description

【测试命令】
monkey --pkg-blacklist-file /sdcard/blacklist.txt --ignore-crashes --ignore-timeouts --ignore-security-exceptions --monitor-native-crashes --ignore-native-crashes -s 20 --throttle 500 --pct-touch 30 --pct-motion 15 --pct-nav 15 --pct-majornav 15 --pct-syskeys 5 --pct-appswitch 10 --pct-anyevent 10 --ignore-crashes -v -v -v 1432000 2>/sdcard/error.txt 1>/sdcard/info.txt

【测试结果】
见截图

Snipaste_2023-05-31_14-41-56.png (31.9 KB) CD TEST-方永红, 2023-05-31 14:42

Snipaste_2023-05-31_14-41-56

History

#2 Updated by CD TEST-方永红 about 2 years ago

  • Subject changed from 【AF】【EVT3】【Monkey】Device#1&2(4+27个APK(无豌豆荚)-内部测试命令)测试12H,出现一些ANR to 【AF】【EVT3】【Monkey】Device#1&2(4+27个APK-内部测试命令)测试12H,出现一些ANR

#3 Updated by CDTS-TEST 周婷 about 2 years ago

  • Category set to 稳定性

#4 Updated by CD FW 曹覃刚 about 2 years ago

  • Status changed from New to NEED_INFO
  • Assignee changed from CD FW 曹覃刚 to CD TEST-方永红
  • Need_Info changed from -- to TEST

■ 我的分析
------------------------
ANR 1
05-31 05:36:32.812 1550 32617 E ActivityManager: ANR in com.tencent.qqlive (com.tencent.qqlive/.ona.activity.VideoDetailActivity)
05-31 05:36:32.812 1550 32617 E ActivityManager: PID: 11848
05-31 05:36:32.812 1550 32617 E ActivityManager: Reason: Input dispatching timed out (Application does not have a focused window)
05-31 05:36:32.812 1550 32617 E ActivityManager: Parent: com.tencent.qqlive/.ona.activity.VideoDetailActivity
05-31 05:36:32.812 1550 32617 E ActivityManager: ErrorId: de464570-546b-432b-b893-c3c70742bfaf
05-31 05:36:32.812 1550 32617 E ActivityManager: Frozen: false
05-31 05:36:32.812 1550 32617 E ActivityManager: Load: 9.58 / 8.89 / 7.32
05-31 05:36:32.812 1550 32617 E ActivityManager: 69% TOTAL: 36% user + 26% kernel + 2.9% iowait + 2.3% irq + 1.3% softirq
ANR 2
05-31 06:47:16.434 1550 20755 E ActivityManager: ANR in com.tencent.mm (com.tencent.mm/.plugin.account.ui.WelcomeActivity)
05-31 06:47:16.434 1550 20755 E ActivityManager: PID: 17976
05-31 06:47:16.434 1550 20755 E ActivityManager: Reason: Input dispatching timed out (Application does not have a focused window)
05-31 06:47:16.434 1550 20755 E ActivityManager: Parent: com.tencent.mm/.plugin.account.ui.WelcomeActivity
05-31 06:47:16.434 1550 20755 E ActivityManager: ErrorId: 7333028c-eac6-4638-be51-188df9dbf29e
05-31 06:47:16.434 1550 20755 E ActivityManager: Frozen: false
05-31 06:47:16.434 1550 20755 E ActivityManager: Load: 7.4 / 6.64 / 7.08
05-31 06:47:16.434 1550 20755 E ActivityManager: 68% TOTAL: 31% user + 28% kernel + 4.4% iowait + 2.5% irq + 1.3% softirq
①cpu一直维持在较高水平70%左右

05-31 05:30:08.374 1550 1652 I am_meminfo: [-145514496,183939072,1100660736,782983168,766115840]
05-31 05:36:14.682 1550 1652 I am_meminfo: [428310528,290394112,706007040,784527360,819903488]
05-31 05:46:53.053 1550 1652 I am_meminfo: [-171503616,271314944,862044160,825700352,810316800]
②剩余内存严重不足,维持在一到两百M

③检查ANR的trace文件,没有发生异常block死锁等问题
------------------------

如上述分析三点,问题发生的主要原因如下
在monkey测试时,由于安装了(4+27)个应用,包含很多大型应用和游戏
测试时,启动的应用过多,系统的cpu和内存压力一直处于过高的水准,在一些耗资源的场景中很容易出现卡顿响应慢的问题,如文件读写操作,导致发生了很多的ANR

■ 下一步计划
1.是否可以改善测试场景,不安装(4+27)个应用,这样基本不会出现anr问题
即使不是测试monkey,人为操作,不停的使用大型软件和玩游戏,设备也经常会出现响应慢等问题,moneky测试时由于连续的操作,更容易发生此类问题,无法完全解决
2.持续的系统优化,如06/12入库了任务数量限制的功能,能够一定程度上减少系统的压力,提升系统的稳定性

请考虑第一点,同时我们将持续推进第二点,请确认,谢谢

#5 Updated by CDTS_TEST 王成 almost 2 years ago

  • Assignee changed from CD TEST-方永红 to 物联网测试组_TSCD 王维

#6 Updated by 物联网测试组_TSCD 王维 almost 2 years ago

使用0136版本在3台设备上monkey跑测5天未复现

#7 Updated by 物联网测试组_TSCD 王维 almost 2 years ago

  • Status changed from NEED_INFO to RESOLVED

已使用0140和0142连续跑测超过70h,同时跑测的设备3台,均未复现,故关闭bug

#8 Updated by 物联网测试组_TSCD 王维 almost 2 years ago

  • Status changed from RESOLVED to VERIFIED

#9 Updated by 物联网测试组_TSCD 王维 almost 2 years ago

  • Status changed from VERIFIED to CLOSED

Also available in: Atom PDF