1# 用户态异常信息说明 2 3 4用户态在运行过程中,可能由于各种原因出现用户态系统异常,异常信息如下所示: 5 6 7 8``` 9##################excFrom: User!#################### 10prefetch_abort fault fsr:0x5, far:0x00000000 11Translation fault, section 12excType: prefetch abort 13processName = shell 14processID = 3 15process aspace = 0x01000000 -> 0x3f000000 16taskName = shell 17taskID = 4 18task user stack = 0x3707d000 -> 0x3717d000 19pc = 0x0 20ulr = 0x2000424 in /bin/shell ---> 0x424 21usp = 0x3717cd60fp = 0x3717cd64 22R0 = 0x1 23R1 = 0x0 24R2 = 0x0 25R3 = 0x1 26R4 = 0x3717cf58 27R5 = 0x0 28R6 = 0x3717cf54 29R7 = 0x200043c 30R8 = 0x84 31R9 = 0x229a7560 32R10 = 0x0 33R11 = 0x3717cd64 34R12 = 0x0 35CPSR = 0x40000030 36***backtrace begin*** 37traceback 0 -- lr = 0x229123a4 fp = 0x0 lr in /lib/libc.so --> 0x213a4 38 39 PID PPID PGID UID Status CPUUSE CPUUSE10s CPUUSE1s Policy Priority MTID TaskTotal Mode PName 40 1 -1 1 0 Ready 0.0 0.0 0.0 RR 28 16 1 user init 41 2 -1 2 0 Pend 10.1 10.1 0.0 RR 0 0 14 kernel KProcess 42 3 1 3 0 Running 0.0 0.0 0.0 RR 28 4 1 user shell 43 44 TID PID Status StackSize WaterLine Policy Priority MEMUSE TaskName 45 16 1 Ready 0x3000 0x978 RR 31 0x8b0c init 46 0 2 Pend 0x1000 0x1d4 RR 5 0 ResourcesTask 47 2 2 Pend 0x4000 0x4ec RR 0 0 Swt_Task 48 3 2 Pend 0x4000 0x1d4 RR 1 0 system_wq 49 5 2 Pend 0x4000 0x1fc RR 9 0 SendToSer 50 6 2 PendTime 0x6000 0x204 RR 5 0 tcpip_thread 51 7 2 Pend 0x3000 0x1fc RR 5 0 sdmci_detect 52 8 2 Pend 0x4000 0x204 RR 5 0 USB_GIANT_Task 53 9 2 Pend 0x4000 0x204 RR 1 0 USB_NGIAN_ISOC_Task 54 10 2 Pend 0x4000 0x204 RR 2 0 USB_NGIAN_BULK_Task 55 11 2 Pend 0x4000 0x690 RR 5 0xbb0 USB_EXPLR_Task 56 12 2 Pend 0x4000 0x204 RR 5 0 USB_CXFER_Task 57 13 2 Pend 0x20000 0x1e4 RR 3 0xac20 eth_irq_Task 58 14 2 Pend 0x4000 0x1d4 RR 10 0 jffs2_gc_thread 59 15 2 Pend 0x2000 0x1f4 RR 4 0 hisi_frw 60 4 3 Running 0x3000 0x838 RR 31 0x1100 shell 61system memcheck over, all passed! 62``` 63 64 65其中,主要包含如下几方面信息: 66 67 681. 用户态异常基本信息: 69 70 ``` 71 prefetch_abort fault fsr:0x5, far:0x00000000 72 Translation fault, section 73 excType: prefetch abort 74 processName = shell 75 processID = 3 76 process aspace = 0x01000000 -> 0x3f000000 77 taskName = shell 78 taskID = 4 79 task user stack = 0x3707d000 -> 0x3717d000 80 ``` 81 822. 寄存器相关信息。 83 84 ``` 85 pc = 0x0 86 ulr = 0x2000424 in /bin/shell ---> 0x424 87 usp = 0x3717cd60fp = 0x3717cd64 88 R0 = 0x1 89 R1 = 0x0 90 R2 = 0x0 91 R3 = 0x1 92 R4 = 0x3717cf58 93 R5 = 0x0 94 R6 = 0x3717cf54 95 R7 = 0x200043c 96 R8 = 0x84 97 R9 = 0x229a7560 98 R10 = 0x0 99 R11 = 0x3717cd64 100 R12 = 0x0 101 CPSR = 0x40000030 102 ``` 103 1043. 调用栈信息。 105 106 ``` 107 ***backtrace begin*** 108 traceback 0 -- lr = 0x229123a4 fp = 0x0 lr in /lib/libc.so --> 0x213a4 109 ``` 110 1114. 进程线程基本信息。 112 113 ``` 114 PID PPID PGID UID Status CPUUSE CPUUSE10s CPUUSE1s Policy Priority MTID TaskTotal Mode PName 115 1 -1 1 0 Ready 0.0 0.0 0.0 RR 28 16 1 user init 116 2 -1 2 0 Pend 10.1 10.1 0.0 RR 0 0 14 kernel KProcess 117 3 1 3 0 Running 0.0 0.0 0.0 RR 28 4 1 user shell 118 119 TID PID Status StackSize WaterLine Policy Priority MEMUSE TaskName 120 16 1 Ready 0x3000 0x978 RR 31 0x8b0c init 121 0 2 Pend 0x1000 0x1d4 RR 5 0 ResourcesTask 122 2 2 Pend 0x4000 0x4ec RR 0 0 Swt_Task 123 3 2 Pend 0x4000 0x1d4 RR 1 0 system_wq 124 5 2 Pend 0x4000 0x1fc RR 9 0 SendToSer 125 6 2 PendTime 0x6000 0x204 RR 5 0 tcpip_thread 126 7 2 Pend 0x3000 0x1fc RR 5 0 sdmci_detect 127 8 2 Pend 0x4000 0x204 RR 5 0 USB_GIANT_Task 128 9 2 Pend 0x4000 0x204 RR 1 0 USB_NGIAN_ISOC_Task 129 10 2 Pend 0x4000 0x204 RR 2 0 USB_NGIAN_BULK_Task 130 11 2 Pend 0x4000 0x690 RR 5 0xbb0 USB_EXPLR_Task 131 12 2 Pend 0x4000 0x204 RR 5 0 USB_CXFER_Task 132 13 2 Pend 0x20000 0x1e4 RR 3 0xac20 eth_irq_Task 133 14 2 Pend 0x4000 0x1d4 RR 10 0 jffs2_gc_thread 134 15 2 Pend 0x2000 0x1f4 RR 4 0 hisi_frw 135 4 3 Running 0x3000 0x838 RR 31 0x1100 shell 136 system memcheck over, all passed! 137 ``` 138 139 可以根据以上信息,分析用户态异常的具体原因。 140