用户态异常信息说明

用户态在运行过程中,可能由于各种原因出现用户态系统异常,异常信息如下所示:

  1. ##################excFrom: User!####################
  2. prefetch_abort fault fsr:0x5, far:0x00000000
  3. Translation fault, section
  4. excType: prefetch abort
  5. processName = shell
  6. processID = 3
  7. process aspace = 0x01000000 -> 0x3f000000
  8. taskName = shell
  9. taskID = 4
  10. task user stack = 0x3707d000 -> 0x3717d000
  11. pc = 0x0
  12. ulr = 0x2000424 in /bin/shell ---> 0x424
  13. usp = 0x3717cd60fp = 0x3717cd64
  14. R0 = 0x1
  15. R1 = 0x0
  16. R2 = 0x0
  17. R3 = 0x1
  18. R4 = 0x3717cf58
  19. R5 = 0x0
  20. R6 = 0x3717cf54
  21. R7 = 0x200043c
  22. R8 = 0x84
  23. R9 = 0x229a7560
  24. R10 = 0x0
  25. R11 = 0x3717cd64
  26. R12 = 0x0
  27. CPSR = 0x40000030
  28. *******backtrace begin*******
  29. traceback 0 -- lr = 0x229123a4 fp = 0x0 lr in /lib/libc.so --> 0x213a4
  30. PID PPID PGID UID Status CPUUSE CPUUSE10s CPUUSE1s Policy Priority MTID TaskTotal Mode PName
  31. 1 -1 1 0 Ready 0.0 0.0 0.0 RR 28 16 1 user init
  32. 2 -1 2 0 Pend 10.1 10.1 0.0 RR 0 0 14 kernel KProcess
  33. 3 1 3 0 Running 0.0 0.0 0.0 RR 28 4 1 user shell
  34. TID PID Status StackSize WaterLine Policy Priority MEMUSE TaskName
  35. 16 1 Ready 0x3000 0x978 RR 31 0x8b0c init
  36. 0 2 Pend 0x1000 0x1d4 RR 5 0 ResourcesTask
  37. 2 2 Pend 0x4000 0x4ec RR 0 0 Swt_Task
  38. 3 2 Pend 0x4000 0x1d4 RR 1 0 system_wq
  39. 5 2 Pend 0x4000 0x1fc RR 9 0 SendToSer
  40. 6 2 PendTime 0x6000 0x204 RR 5 0 tcpip_thread
  41. 7 2 Pend 0x3000 0x1fc RR 5 0 sdmci_detect
  42. 8 2 Pend 0x4000 0x204 RR 5 0 USB_GIANT_Task
  43. 9 2 Pend 0x4000 0x204 RR 1 0 USB_NGIAN_ISOC_Task
  44. 10 2 Pend 0x4000 0x204 RR 2 0 USB_NGIAN_BULK_Task
  45. 11 2 Pend 0x4000 0x690 RR 5 0xbb0 USB_EXPLR_Task
  46. 12 2 Pend 0x4000 0x204 RR 5 0 USB_CXFER_Task
  47. 13 2 Pend 0x20000 0x1e4 RR 3 0xac20 eth_irq_Task
  48. 14 2 Pend 0x4000 0x1d4 RR 10 0 jffs2_gc_thread
  49. 15 2 Pend 0x2000 0x1f4 RR 4 0 hisi_frw
  50. 4 3 Running 0x3000 0x838 RR 31 0x1100 shell
  51. system memcheck over, all passed!

其中,主要包含如下几方面信息:

  1. 用户态异常基本信息:
  1. prefetch_abort fault fsr:0x5, far:0x00000000
  2. Translation fault, section
  3. excType: prefetch abort
  4. processName = shell
  5. processID = 3
  6. process aspace = 0x01000000 -> 0x3f000000
  7. taskName = shell
  8. taskID = 4
  9. task user stack = 0x3707d000 -> 0x3717d000
  1. 寄存器相关信息。
  1. pc = 0x0
  2. ulr = 0x2000424 in /bin/shell ---> 0x424
  3. usp = 0x3717cd60fp = 0x3717cd64
  4. R0 = 0x1
  5. R1 = 0x0
  6. R2 = 0x0
  7. R3 = 0x1
  8. R4 = 0x3717cf58
  9. R5 = 0x0
  10. R6 = 0x3717cf54
  11. R7 = 0x200043c
  12. R8 = 0x84
  13. R9 = 0x229a7560
  14. R10 = 0x0
  15. R11 = 0x3717cd64
  16. R12 = 0x0
  17. CPSR = 0x40000030
  1. 调用栈信息。
  1. *******backtrace begin*******
  2. traceback 0 -- lr = 0x229123a4 fp = 0x0 lr in /lib/libc.so --> 0x213a4
  1. 进程线程基本信息。
  1. PID PPID PGID UID Status CPUUSE CPUUSE10s CPUUSE1s Policy Priority MTID TaskTotal Mode PName
  2. 1 -1 1 0 Ready 0.0 0.0 0.0 RR 28 16 1 user init
  3. 2 -1 2 0 Pend 10.1 10.1 0.0 RR 0 0 14 kernel KProcess
  4. 3 1 3 0 Running 0.0 0.0 0.0 RR 28 4 1 user shell
  5. TID PID Status StackSize WaterLine Policy Priority MEMUSE TaskName
  6. 16 1 Ready 0x3000 0x978 RR 31 0x8b0c init
  7. 0 2 Pend 0x1000 0x1d4 RR 5 0 ResourcesTask
  8. 2 2 Pend 0x4000 0x4ec RR 0 0 Swt_Task
  9. 3 2 Pend 0x4000 0x1d4 RR 1 0 system_wq
  10. 5 2 Pend 0x4000 0x1fc RR 9 0 SendToSer
  11. 6 2 PendTime 0x6000 0x204 RR 5 0 tcpip_thread
  12. 7 2 Pend 0x3000 0x1fc RR 5 0 sdmci_detect
  13. 8 2 Pend 0x4000 0x204 RR 5 0 USB_GIANT_Task
  14. 9 2 Pend 0x4000 0x204 RR 1 0 USB_NGIAN_ISOC_Task
  15. 10 2 Pend 0x4000 0x204 RR 2 0 USB_NGIAN_BULK_Task
  16. 11 2 Pend 0x4000 0x690 RR 5 0xbb0 USB_EXPLR_Task
  17. 12 2 Pend 0x4000 0x204 RR 5 0 USB_CXFER_Task
  18. 13 2 Pend 0x20000 0x1e4 RR 3 0xac20 eth_irq_Task
  19. 14 2 Pend 0x4000 0x1d4 RR 10 0 jffs2_gc_thread
  20. 15 2 Pend 0x2000 0x1f4 RR 4 0 hisi_frw
  21. 4 3 Running 0x3000 0x838 RR 31 0x1100 shell
  22. system memcheck over, all passed!

可以根据以上信息,分析用户态异常的具体原因。