319 Star 2.1K Fork 1K

OpenHarmony / kernel_liteos_a

 / 详情

【OpenHarmony】【20210420】【轻内核子系统】集成测试:IO模块在相关接口的测试中会导致设备crash

已完成
缺陷
创建于  
2021-04-20 17:01

该问题是怎么引起的?

IO模块在格式化相关接口(fwprintf、swprintf、wprintf、wscanf、Vwprintf、Vwscanf、Vfwprintf、Fwscanf、swprintf)的测试时,当测试用例函数参数中有“$”符号时,测试的时候会导致设备挂掉。
输入图片说明
[图片上传中…(image-PStt8NMDjiP35HWsVyHB)]

重现步骤

版本
码云主干
hispark-taurus版本:
https://hm-verify.obs.cn-north-4.myhuaweicloud.com/version/Daily_Version/2021-04-20_00-07-04/hispark_taurus.tar.gz
板子:Hi3516DV300
执行1000次:
./ActsIoApiTest.bin

报错信息

[ RUN ] IoTestExt.testFwprintfExt0600
[ERR]OsVmPageFaultHandler 352
##################excFrom: User!####################
cpu0 is in exc.
cpu1 is running.
The current handling the exception is cpu0 !
data_abort fsr:0x5, far:0x00000027
Abort caused by a read instruction. Translation fault, section
excType: data abort
processName = HitsIoPosixTest.bin
processID = 32
process aspace = 0x01000000 -> 0x3f000000
taskName = HitsIoPosixTest.bin
taskID = 76
task user stack = 0x3c6cc000 -> 0x3c7cc000
pc = 0x212f2cd8 in /lib/libc.so ---> 0x6ccd8
ulr = 0x213111ac in /lib/libc.so ---> 0x8b1ac
usp = 0x3c7cb890
fp = 0x27
R0 = 0x3c7cb8e4
R1 = 0x27
R2 = 0x4
R3 = 0x3a
R4 = 0x27
R5 = 0x4
R6 = 0x135a2830
R7 = 0x7fffffff
R8 = 0x0
R9 = 0x0
R10 = 0x414c3bc
R11 = 0x27
R12 = 0x3
CPSR = 0x20000010
backtrace begin
traceback error fp = 0x27

allCpu(%): 11.57 sys, 188.43 idle

PID PPID PGID UID Status CPUUSE CPUUSE10s CPUUSE1s Policy Priority MTI
D TaskTotal Mode PName
1 -1 1 0 Pending 0.0 0.0 0.0 RR 28 2
3 1 user init
2 -1 2 0 Pending 1.78 43.63 66.78 RR 0
0 24 kernel KProcess
3 1 1 2 Pending 0.0 0.4 0.0 RR 15
4 3 user shell
4 1 4 4 Pending 0.0 0.0 0.0 RR 28 2
4 1 user apphilogcat
5 1 5 7 Pending 0.6 0.5 0.6 RR 28 2
5 17 user foundation
6 1 6 8 Pending 0.0 0.0 0.0 RR 28 2
6 4 user bundle_daemon
7 1 7 1 Pending 0.0 0.0 0.0 RR 28 2
7 5 user appspawn
8 1 8 5 Pending 0.0 0.0 0.0 RR 28 2
8 1 user media_server
9 1 9 0 Pending 1.93 1.53 1.48 RR 28 2
9 8 user wms_server
10 1 10 0 Pending 0.0 0.0 0.0 RR 28 3
0 4 user sensor_service
11 1 11 9 Pending 0.0 0.0 0.0 RR 28 3
1 4 user ai_server
12 7 7 101 Pending 0.98 0.79 0.97 RR 28 7
4 3 user com.huawei.launcher
27 7 7 104 Pending 5.33 4.30 0.83 RR 28 7
8 3 user com.huawei.screensaver
32 3 32 2 Running 0.0 19.96 21.46 RR 15 7
6 1 user HitsIoPosixTest.bin

TID PID Affi CPU Status StackSize WaterLine CPUUSE CPUUSE10s CPUUSE1s
StackPoint TopOfStack PendReason LockID Policy Priority MEMUSE TaskNam
e
23 1 0x3 -1 Pending 0x3000 0xd24 0.0 0.0 0.0
0x409d2690 0x409cf9f8 Signal 0x80040100 RR 31 0 init

0    2  0x3  -1      Pending    0x1000     0x424   0.1       0.9      0.37  

0x408fcac8 0x408fbcb0 Event 0xff RR 5 0 Resourc
esTask
2 2 0x1 -1 Pending 0x4000 0x31c 0.34 0.49 0.33
0x40914300 0x40910508 Queue 0 RR 0 0 Swt_Tas
k
3 2 0x3 -1 Pending 0x4000 0x1e4 0.0 0.0 0.0
0x4091d080 0x40919260 Event 0x1 RR 1 0 system_
wq
5 2 0x2 -1 Pending 0x4000 0x4d4 0.74 0.57 0.82
0x40927b08 0x40923d10 Queue 0x1 RR 0 0 Swt_Tas
k
7 2 0x3 -1 PendTime 0x4000 0x3b8 0.5 0.5 0.5
0x40994a38 0x40990c70 Event 0x1 RR 10 0 hi_vdec
_thread
8 2 0x3 -1 Pending 0x3000 0x1dc 0.0 0.0 0.0
0x40930b20 0x4092dcf8 Event 0x7 RR 5 0 himci_T
ask
9 2 0x3 -1 Pending 0x20000 0x3e4 0.0 0.34 0.1
0x40964c00 0x40944dd8 Event 0x1 RR 3 0 eth_irq
Task
10 2 0x3 -1 PendTime 0x6000 0x4e4 0.2 0.53 0.5
0x4093d7b8 0x409379e8 Queue 0x2 RR 5 0 tcpip_t
hread
11 2 0x3 -1 PendTime 0x1800 0x78c 0.3 2.4 1.37
0x40941a00 0x40940458 Event 0x4 RR 6 0 mmc_dat
a_thread
12 2 0x3 -1 Pending 0x3000 0x4d4 0.0 0.1 0.1
0x40976da0 0x40973f90 Event 0xf RR 12 0 bcache

async_task
13 2 0x3 -1 PendTime 0x2000 0x394 0.0 0.0 0.0
0x4099ee90 0x4099d0a0 Semaphore 0x13a RR 18 0 Message
Dispatcher
15 2 0x3 -1 Pending 0x2710 0x3d4 0.0 0.0 0.0
0x409a4538 0x409a2008 Semaphore 0x13d RR 10 0 GPIO_IR
Q_TSK_0_4
16 2 0x3 -1 Delay 0x2000 0x354 0.0 0.0 0.0
0x409a78a0 0x409a5aa8 Delay 0 RR 18 0 hdf_sen
sor_test
17 2 0x3 -1 Pending 0x4000 0x21c 0.0 0.0 0.0
0x409b5328 0x409b1540 Event 0xf RR 5 0 USB_GIA
NT_Task
18 2 0x3 -1 Pending 0x4000 0x21c 0.0 0.0 0.0
0x409b9338 0x409b5550 Event 0xf RR 1 0 USB_NGI
AN_ISOC_Task
19 2 0x3 -1 Pending 0x4000 0x21c 0.0 0.0 0.0
0x409bd348 0x409b9560 Event 0xf RR 2 0 USB_NGI
AN_BULK_Task
20 2 0x3 -1 Pending 0x4000 0x6b0 0.0 0.0 0.0
0x409c1358 0x409bd570 Event 0xf RR 5 0 USB_EXP
LR_Task
21 2 0x3 -1 Pending 0x4000 0x21c 0.0 0.0 0.0
0x409c5368 0x409c1580 Event 0xf RR 5 0 USB_CXF
ER_Task
22 2 0x3 -1 Pending 0x4000 0x33c 0.56 39.46 63.71
0x409ce6f8 0x409ca900 Event 0x6 RR 9 0 SendToS
er
67 2 0x1 -1 Pending 0x2000 0x9ac 0.0 0.0 0.0
0x416eddb0 0x416ebfa8 Event 0x2000 RR 4 0 hisi_fr
w
68 2 0x1 -1 Pending 0x4000 0x86c 0.0 0.0 0.0
0x416f3038 0x416ef250 Event 0x1 RR 3 0 hisi_hc
c_tx
69 2 0x1 -1 Pending 0x4000 0x264 0.0 0.0 0.0
0x416f7048 0x416f3260 Event 0x1 RR 3 0 hisi_hc
c_rx
70 2 0x3 -1 Pending 0x2000 0x49c 0.0 0.0 0.0
0x41781e28 0x41780010 Event 0x1 RR 3 0 sdio_Ta
sk
71 2 0x3 -1 Pending 0x4000 0x1e4 0.0 0.0 0.0
0x41785e40 0x41782020 Event 0x1 RR 1 0 wlan_pm
_wq
4 3 0x3 -1 Pending 0x3000 0xbb4 0.0 0.0 0.0
0x409d9e90 0x409d71a8 Join 0x20 RR 31 0 shell

32 3 0x3 -1 Pending 0x3000 0xda4 0.0 0.0 0.0
0x410178a0 0x41014bf0 Futex 0x20b1d690 RR 31 0 ShellTa
sk
33 3 0x3 -1 Pending 0x3000 0x8a4 0.0 0.3 0.0
0x4101a808 0x41017c00 Event 0x1 RR 31 0 ShellEn
try
24 4 0x3 -1 Pending 0x3000 0xbb4 0.0 0.0 0.0
0x409df8d0 0x409dcc80 Event 0x1 RR 31 0 apphilo
gcat
25 5 0x3 -1 Pending 0x3000 0xbb4 0.0 0.0 0.0
0x409e5428 0x409e2790 Signal 0xffffffff RR 31 0 foundat
ion
42 5 0x3 -1 Pending 0x3000 0xa84 0.0 0.0 0.0
0x4144d698 0x4144a9e8 Futex 0x263c7ca4 RR 15 0 thread1

43 5 0x3 -1 Pending 0x3000 0xa2c 0.0 0.0 0.0
0x41450740 0x4144da90 Futex 0x263d2ca4 RR 15 0 thread2

44 5 0x3 -1 Pending 0x3000 0x49c 0.0 0.0 0.0
0x414537e8 0x41450b38 Futex 0x263ddca4 RR 15 0 thread3

45 5 0x3 -1 Pending 0x3000 0x72c 0.0 0.0 0.0
0x41456890 0x41453be0 Futex 0x263e8ca4 RR 1 0 thread4

46 5 0x3 -1 Pending 0x3000 0x374 0.0 0.0 0.0
0x41459938 0x41456c88 Futex 0x263f3ca4 RR 7 0 thread5

47 5 0x3 -1 Pending 0x3000 0x72c 0.0 0.0 0.0
0x4145c9e0 0x41459d30 Futex 0x263feca4 RR 15 0 thread6

48 5 0x3 -1 Pending 0x3000 0x95c 0.0 0.0 0.0
0x4145fa88 0x4145cdd8 Futex 0x26409ca4 RR 15 0 thread7

49 5 0x3 -1 Pending 0x3000 0x72c 0.0 0.0 0.0
0x41462e70 0x41460248 LiteIPC 0xffffffff RR 7 0 thread8

50 5 0x3 -1 Pending 0x3000 0x48c 0.0 0.0 0.0
0x41465ee0 0x414632b8 LiteIPC 0xffffffff RR 7 0 thread9

51 5 0x3 -1 Pending 0x3000 0x72c 0.0 0.0 0.0
0x41468ef0 0x414662c8 LiteIPC 0xffffffff RR 7 0 thread1
0
52 5 0x3 -1 Delay 0x3000 0x4a8 0.0 0.0 0.0
0x4146cc98 0x41469fe0 Delay 0 RR 15 0 thread1
1
53 5 0x3 -1 Delay 0x3000 0x72c 0.5 0.5 0.6
0x41470bd0 0x4146df18 Delay 0 RR 15 0 thread1
2
54 5 0x3 -1 Pending 0x3000 0x72c 0.0 0.0 0.0
0x41473c20 0x41470fc0 Queue 0x6 RR 15 0 thread1
3
55 5 0x3 -1 Pending 0x3000 0x4a4 0.0 0.0 0.0
0x416c2c08 0x416c00a8 Semaphore 0x184 RR 15 0 thread1
4
56 5 0x3 -1 Pending 0x3000 0x4a4 0.0 0.0 0.0
0x416c6f48 0x416c43e8 Semaphore 0x188 RR 15 0 thread1
5
57 5 0x3 -1 Pending 0x3000 0x4a4 0.0 0.0 0.0
0x416ca6d0 0x416c7b70 Semaphore 0x18b RR 15 0 thread1
6
14 6 0x3 -1 Pending 0x3000 0x3dc 0.0 0.0 0.0
0x417894f8 0x417868d0 LiteIPC 0xffffffff RR 7 0 thread3

26 6 0x3 -1 Pending 0x3000 0x954 0.0 0.0 0.0
0x409eaf60 0x409e82c8 Signal 0xffffffff RR 31 0 bundle_
daemon
35 6 0x3 -1 Pending 0x3000 0x97c 0.0 0.0 0.0
0x411882a8 0x411855f8 Futex 0x21a9fca4 RR 15 0 thread1

36 6 0x3 -1 Pending 0x3000 0x8c4 0.0 0.0 0.0
0x4118b438 0x41188810 LiteIPC 0xffffffff RR 7 0 thread2

27 7 0x3 -1 Pending 0x3000 0xa2c 0.0 0.0 0.0
0x409f0a90 0x409eddf8 Signal 0x80040100 RR 31 0 appspaw
n
40 7 0x3 -1 Pending 0x3000 0x5bc 0.0 0.0 0.0
0x412cd8b8 0x412cac08 Futex 0x221a9ca4 RR 22 0 thread2

41 7 0x3 -1 Pending 0x3000 0x36c 0.0 0.0 0.0
0x412ca8a8 0x412c7bf8 Futex 0x2219eca4 RR 7 0 thread1

58 7 0x3 -1 Pending 0x3000 0x564 0.0 0.0 0.0
0x416ceca8 0x416cc080 LiteIPC 0xffffffff RR 7 0 thread3

59 7 0x3 -1 Pending 0x3000 0x3dc 0.0 0.0 0.0
0x416d1cb8 0x416cf090 LiteIPC 0xffffffff RR 7 0 thread4

28 8 0x3 -1 Pending 0x3000 0x9dc 0.0 0.0 0.0
0x409f6550 0x409f3930 Signal 0x44122 RR 31 0 media_s
erver
29 9 0x3 -1 Delay 0x3000 0xc0c 0.12 0.10 0.11
0x409fc128 0x409f9470 Delay 0 RR 31 0 wms_ser
ver
60 9 0x3 -1 Pending 0x3000 0x36c 0.0 0.0 0.0
0x416d4d50 0x416d20a0 Futex 0x240b3ca4 RR 7 0 thread2

61 9 0x3 -1 Pending 0x3000 0x5f4 0.97 0.77 0.84
0x416d7d60 0x416d50b0 Futex 0x240beca4 RR 22 0 thread3

62 9 0x3 -1 Pending 0x3000 0x564 0.65 0.50 0.52
0x416dace8 0x416d80c0 LiteIPC 0xffffffff RR 7 0 thread4

63 9 0x3 -1 Pending 0x3000 0x7fc 0.1 0.1 0.0
0x416ddcf8 0x416db0d0 LiteIPC 0xffffffff RR 7 0 thread5

64 9 0x3 -1 Pending 0x3000 0x40c 0.0 0.0 0.0
0x416e0cd8 0x416de0e0 Semaphore 0x196 FIFO 30 0 thread6

65 9 0x3 -1 Pending 0x3000 0x40c 0.0 0.0 0.0
0x416e3ce8 0x416e10f0 Semaphore 0x198 FIFO 30 0 thread7

66 9 0x3 -1 Pending 0x3000 0x354 0.0 0.0 0.0
0x416e6db0 0x416e4100 Futex 0x24166c44 RR 31 0 thread8

30 10 0x3 -1 Pending 0x3000 0x954 0.0 0.0 0.0
0x41002ca8 0x41000010 Signal 0xffffffff RR 31 0 sensor_
service
34 10 0x3 -1 Pending 0x3000 0x72c 0.0 0.0 0.0
0x41183150 0x411804a0 Futex 0x2355bca4 RR 22 0 thread1

37 10 0x3 -1 Pending 0x3000 0x6fc 0.0 0.0 0.0
0x4118e448 0x4118b820 LiteIPC 0xffffffff RR 7 0 thread2

72 10 0x3 -1 Pending 0x3000 0x3dc 0.0 0.0 0.0
0x4178c508 0x417898e0 LiteIPC 0xffffffff RR 7 0 thread3

31 11 0x3 -1 Pending 0x3000 0xbb4 0.0 0.0 0.0
0x41007798 0x41004b00 Signal 0xffffffff RR 31 0 ai_serv
er
38 11 0x3 -1 Pending 0x3000 0x564 0.0 0.0 0.0
0x41193368 0x411906b8 Futex 0x25819ca4 RR 15 0 thread1

39 11 0x3 -1 Pending 0x3000 0x6fc 0.0 0.0 0.0
0x411962f0 0x411936c8 LiteIPC 0xffffffff RR 7 0 thread2

73 11 0x3 -1 Pending 0x3000 0x3dc 0.0 0.0 0.0
0x4178f518 0x4178c8f0 LiteIPC 0xffffffff RR 7 0 thread3

74 12 0x3 -1 Pending 0x3000 0x9dc 0.79 0.63 0.77
0x417a0848 0x4179db98 Futex 0x221a7adc RR 22 0 com.hua
wei.launcher
75 12 0x3 -1 Pending 0x3000 0x564 0.0 0.0 0.0
0x417af308 0x417ac6e0 LiteIPC 0xffffffff RR 22 0 thread1

77 12 0x3 -1 Delay 0x3000 0x4fc 0.18 0.15 0.20
0x417b54c0 0x417b2808 Delay 0 RR 22 0 UITaskP
ost
78 27 0x3 -1 Pending 0x3000 0xa64 5.15 4.14 0.65
0x4249bd48 0x42499098 Futex 0x221a7adc RR 22 0 com.hua
wei.screensaver
79 27 0x3 -1 Pending 0x3000 0x564 0.0 0.0 0.0
0x424a6b40 0x424a3f18 LiteIPC 0xffffffff RR 22 0 thread1

81 27 0x3 -1 Delay 0x3000 0x4fc 0.18 0.16 0.17
0x424a9be0 0x424a6f28 Delay 0 RR 22 0 UITaskP
ost
76 32 0x3 0 Running 0x3000 0xd1c 0.0 19.96 21.46
0x424b9560 0x424b6a88 Running 0 RR 31 0 HitsIoP
osixTest.bin

******Current process 32 vmm regions: ******
0 -> regionBase: 0x04104000 regionSize: 0x00059000
1 -> regionBase: 0x0415d000 regionSize: 0x0011c000
2 -> regionBase: 0x04279000 regionSize: 0x0000d000
3 -> regionBase: 0x04286000 regionSize: 0x00001000
4 -> regionBase: 0x1356e000 regionSize: 0x00035000
5 -> regionBase: 0x21286000 regionSize: 0x00045000
6 -> regionBase: 0x212cb000 regionSize: 0x0005e000
7 -> regionBase: 0x21329000 regionSize: 0x00001000
8 -> regionBase: 0x2132a000 regionSize: 0x00001000
9 -> regionBase: 0x2132b000 regionSize: 0x00004000
10 -> regionBase: 0x2132f000 regionSize: 0x00002000
11 -> regionBase: 0x21331000 regionSize: 0x00045000
12 -> regionBase: 0x21376000 regionSize: 0x00098000
13 -> regionBase: 0x2140e000 regionSize: 0x00005000
14 -> regionBase: 0x21413000 regionSize: 0x00001000
15 -> regionBase: 0x21414000 regionSize: 0x00001000
16 -> regionBase: 0x21415000 regionSize: 0x00002000
17 -> regionBase: 0x21417000 regionSize: 0x0000c000
18 -> regionBase: 0x21423000 regionSize: 0x00001000
19 -> regionBase: 0x21424000 regionSize: 0x00001000
20 -> regionBase: 0x3c6cc000 regionSize: 0x000ff000
21 -> regionBase: 0x3c7cb000 regionSize: 0x00001000

stack name cpu id stack addr total size used size


udf_stack 1 0x406d0000 0x28 0x0
udf_stack 0 0x406d0028 0x28 0x0
abt_stack 1 0x406d0050 0x28 0x24
abt_stack 0 0x406d0078 0x28 0x24
fiq_stack 1 0x406d0120 0x40 0x0
fiq_stack 0 0x406d0160 0x40 0x0
svc_stack 1 0x406d01a0 0x2000 0x49c
svc_stack 0 0x406d21a0 0x2000 0xaac
irq_stack 1 0x406d00a0 0x40 0x14
irq_stack 0 0x406d00e0 0x40 0x14
exc_stack 1 0x406d41a0 0x1000 0x0
exc_stack 0 0x406d51a0 0x1000 0x0
system memcheck over, all passed!

评论 (2)

南先森 创建了缺陷
南先森 修改了标题
南先森 修改了描述
南先森 任务状态待办的 修改为已确认
南先森 任务状态已确认 修改为待办的
展开全部操作日志
fp 0x1f8a3670 
MMMMMMMM, 0x20003a3
bs 1
MMMMMMMM, 0x1f8a4998
bs 
MMMMMMMM, 0x28
[ERR]OsVmPageFaultHandler 347 
##################excFrom: User!####################
data_abort fsr:0x5, far:0x00000028
Abort caused by a read instruction. Translation fault, section
excType: data abort
processName       = a.out
processID         = 6
process aspace    = 0x01000000 -> 0x3f000000
taskName          = a.out
taskID            = 10
task user stack   = 0x3ef00000 -> 0x3f000000
pc    = 0x1f89cef2 in /lib/libc.so ---> 0x9cef2
ulr   = 0x1f88ee84 in /lib/libc.so ---> 0x8ee84
usp   = 0x3efff7b8
fp    = 0x3
R0    = 0x28
R1    = 0x0
R2    = 0x7fffffff
R3    = 0x0
R4    = 0x7ffffff8

The format can contain either numbered argument specifications (that is, "%n$" and "*m$"), or unnumbered argument conversion specifications (that is, % and * ), but not both. The only exception to this is that %% can be mixed with the "%n$" form. The results of mixing numbered and unnumbered argument specifications in a format wide-character string are undefined. When numbered argument specifications are used, specifying the Nth argument requires that all the leading arguments, from the first to the (N-1)th, are specified in the format wide-character string.
https://pubs.opengroup.org/onlinepubs/9699919799/

南先森 添加了
 
Integration_Test
标签
南先森 任务状态待办的 修改为已确认
南先森 任务状态已确认 修改为已完成
南先森 负责人设置为MGY917
南先森 修改了标题
南先森 修改了标题

登录 后才可以发表评论

状态
负责人
项目
里程碑
Pull Requests
关联的 Pull Requests 被合并后可能会关闭此 issue
分支
开始日期   -   截止日期
-
置顶选项
优先级
预计工期 (小时)
参与者(2)
8046261 mgy917 1599794627
C
1
https://gitee.com/openharmony/kernel_liteos_a.git
git@gitee.com:openharmony/kernel_liteos_a.git
openharmony
kernel_liteos_a
kernel_liteos_a

搜索帮助