• Android触摸屏TP crah 日志 addr2line


    1. --------- beginning of crash
    2. 04-18 06:40:32.447 F/libc ( 1667): stack corruption detected
    3. 04-18 06:40:32.448 F/libc ( 1667): Fatal signal 6 (SIGABRT), code -6 in tid 1667 (system_server)
    4. 04-18 06:40:32.448 W/ ( 435): debuggerd: handling request: pid=1667 uid=1000 gid=1000 tid=1667
    5. 04-18 06:40:32.497 E/ ( 1851): debuggerd: Unable to connect to activity manager (connect failed: Connection refused)
    6. 04-18 06:40:32.547 F/DEBUG ( 1851): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
    7. 04-18 06:40:32.548 F/DEBUG ( 1851): Build fingerprint: 'Scooper/P326/P326:7.1.2/N2G47H/20221130.161004:user/test-keys'
    8. 04-18 06:40:32.548 F/DEBUG ( 1851): Revision: '0'
    9. 04-18 06:40:32.548 F/DEBUG ( 1851): ABI: 'arm64'
    10. 04-18 06:40:32.548 F/DEBUG ( 1851): pid: 1667, tid: 1667, name: system_server >>> system_server <<<
    11. 04-18 06:40:32.548 F/DEBUG ( 1851): signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
    12. 04-18 06:40:32.552 F/DEBUG ( 1851): Abort message: 'stack corruption detected'
    13. 04-18 06:40:32.552 F/DEBUG ( 1851): x0 0000000000000000 x1 0000000000000683 x2 0000000000000006 x3 0000000000000008
    14. 04-18 06:40:32.552 F/DEBUG ( 1851): x4 0000007f61601484 x5 0080808080808080 x6 0000000000000000 x7 0000000000000010
    15. 04-18 06:40:32.552 F/DEBUG ( 1851): x8 0000000000000083 x9 ffffffffffffffdf x10 0000000000000000 x11 0000000000000001
    16. 04-18 06:40:32.552 F/DEBUG ( 1851): x12 ffffffffffffffff x13 0000000000000000 x14 0000000000000000 x15 001ab3d5be6a062b
    17. 04-18 06:40:32.552 F/DEBUG ( 1851): x16 0000007f80782ed0 x17 0000007f8072c81c x18 00000000ffffffff x19 0000007f83ff9b40
    18. 04-18 06:40:32.552 F/DEBUG ( 1851): x20 0000000000000006 x21 0000007f83ff9a98 x22 0000000000000002 x23 00000000133e8c80
    19. 04-18 06:40:32.552 F/DEBUG ( 1851): x24 00000000133b7318 x25 0000000012ff9d90 x26 0000000012c0ac10 x27 0000000012c08280
    20. 04-18 06:40:32.552 F/DEBUG ( 1851): x28 000000001334b710 x29 0000007fc7227140 x30 0000007f80729cac
    21. 04-18 06:40:32.552 F/DEBUG ( 1851): sp 0000007fc7227120 pc 0000007f8072c824 pstate 0000000060000000
    22. 04-18 06:40:32.556 F/DEBUG ( 1851): backtrace:
    23. 04-18 06:40:32.556 F/DEBUG ( 1851): #00 pc 000000000006b824 /system/lib64/libc.so (tgkill+8)
    24. 04-18 06:40:32.556 F/DEBUG ( 1851): #01 pc 0000000000068ca8 /system/lib64/libc.so (pthread_kill+64)
    25. 04-18 06:40:32.556 F/DEBUG ( 1851): #02 pc 0000000000024180 /system/lib64/libc.so (raise+24)
    26. 04-18 06:40:32.556 F/DEBUG ( 1851): #03 pc 000000000001cbec /system/lib64/libc.so (abort+52)
    27. 04-18 06:40:32.556 F/DEBUG ( 1851): #04 pc 000000000002118c /system/lib64/libc.so (__libc_fatal+104)
    28. 04-18 06:40:32.556 F/DEBUG ( 1851): #05 pc 000000000006a6f0 /system/lib64/libc.so (__stack_chk_fail+16)
    29. 04-18 06:40:32.556 F/DEBUG ( 1851): #06 pc 0000000000000e90 /system/lib64/hw/bln_ctrl.default.so
    30. 04-18 06:40:32.556 F/DEBUG ( 1851): #07 pc 000000000002d6c8 /system/lib64/libandroid_servers.so
    31. 04-18 06:40:32.556 F/DEBUG ( 1851): #08 pc 000000000126e85c /system/framework/oat/arm64/services.odex (offset 0x1163000)

    解析日志

    直接定位到 backtrace ,linux编译的终端切换到out输出路径下(因为整个机子是基于系统进行的工作,而系统是linux编译后输出到out目录下,所以在out目录下排查问题就可以了)

    然后使用 addr2line 进行查看错误地址的原代码位置

    1. scooper@Scooper-SH-Compiler:~/workspace/ljh/sdm450/out/target/product/P326$ find | grep libandroid_servers.so
    2. ./obj_arm/SHARED_LIBRARIES/libandroid_servers_intermediates/LINKED/libandroid_servers.so
    3. 20221122.133922/SYSTEM/lib64/libandroid_servers.so
    4. ./symbols/system/lib64/libandroid_servers.so
    5. ./symbols/system/lib/libandroid_servers.so
    6. ./system/lib64/libandroid_servers.so
    7. ./system/lib/libandroid_servers.so
    8. scooper@Scooper-SH-Compiler:~/workspace/ljh/sdm450/out/target/product/P326$ file ./system/lib64/libandroid_servers.so
    9. ./system/lib64/libandroid_servers.so: ELF 64-bit LSB shared object, ARM aarch64, version 1 (SYSV), dynamically linked, BuildID[md5/uuid]=de1d46d3651f1acefaa5d1a68a910260, stripped
    10. scooper@Scooper-SH-Compiler:~/workspace/ljh/sdm450/out/target/product/P326$ file ./symbols/system/lib64/libandroid_servers.so
    11. ./symbols/system/lib64/libandroid_servers.so: ELF 64-bit LSB shared object, ARM aarch64, version 1 (SYSV), dynamically linked, BuildID[md5/uuid]=de1d46d3651f1acefaa5d1a68a910260, not stripped
    12. scooper@Scooper-SH-Compiler:~/workspace/ljh/sdm450/out/target/product/P326$ addr2line -C -f -p -i -e ./symbols/system/lib64/libandroid_servers.so 000000000002d6c8
    13. android::BLN_Ctrl_Init(hw_module_t const*, bln_ctrl_hw_device**) at /proc/self/cwd/frameworks/base/services/core/jni/com_android_server_IRCtrlService.cpp:77
    14. (inlined by) android::IRCtrl_Open(_JNIEnv*, _jobject*) at /proc/self/cwd/frameworks/base/services/core/jni/com_android_server_IRCtrlService.cpp:246
    15. scooper@Scooper-SH-Compiler:~/workspace/ljh/sdm450/out/target/product/P326$ addr2line -C -f -p -i -e ./system/lib64/libandroid_servers.so 000000000002d6c8
    16. android::register_android_server_IRCtrlService(_JNIEnv*) at ??:0
    最后显示的就是报错的位置:报错文件  报错行数

    使用addr2line 显示 ??:0 问题排查

    一般是文件路径没有加

    文件路径不对

    相对地址不对

    总结(可以直接看这)

    find | grep

    使用前

    查看筛选文件路径

    在out目录下

    find | grep 文件名

    file

    file 查看哪个文件才是需要的

    (查找文件过程中会有很多路径不同但是文件名相同的,先根据路径排除一些,剩下的就是根据file)

    file 文件路径

    addr2line

    addr2line 使用方法

    addr2line -C -f -p -i -e 报错文件路径 相对地址

    参考链接

    android系统 如何使用addr2line命令接续native backtraceAndroid系统(172)---如何使用addr2line命令解析nativebacktrace - 百度文库

  • 相关阅读:
    EFLAGS寄存器与JCC指令
    js滚动条触底加载更多#js懒加载数据#步骤条布局懒加载
    HTML5+CSS3基础笔记(上)
    本地部署mini k8 cluster
    【重新安装Anaconda心得】
    Modbus通信协议介绍以及Modbus Poll、Slave软件使用介绍
    P3561 [POI2017]Turysta(竞赛图哈密顿回路的构造+强连通分量)
    景联文科技:针对敏感数据的安全转录服务,护航信息安全
    搭建安信可小安派Windows 开发环境
    面试必答题“聊聊Java中线程的生命周期状态”如何破?
  • 原文地址:https://blog.csdn.net/qq_40715266/article/details/128188791