重庆分公司,新征程启航

为企业提供网站建设、域名注册、服务器等服务

addr2line-创新互联

1、符号表 1.1什么是符号表

符号表是内存地址与函数名、文件名、行号的映射表。符号表元素如下所示:

作为一家“创意+整合+营销”的成都网站建设机构,我们在业内良好的客户口碑。创新互联提供从前期的网站品牌分析策划、网站设计、网站建设、成都网站制作、创意表现、网页制作、系统开发以及后续网站营销运营等一系列服务,帮助企业打造创新的互联网品牌经营模式与有效的网络营销方法,创造更大的价值。

<起始地址><结束地址><函数>[<文件名:行号>]

1.2为什么要配置符号表

为了能快速并准确地定位引擎发生Crash的代码位置

举个例子

1.3如何隐藏符号表

如果不额外配置,使用cmake编译出来的so是带符号表的,使用fvisibility=hidden可以隐藏符号表

引擎是在engine-dev/mk/cmake/CMakeLists.txt文件中配置的

set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -ffunction-sections -fdata-sections -fvisibility=hidden")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ffunction-sections -fdata-sections -fvisibility=hidden")

在开启隐藏符号表的情况下,到engine-dev/lib/android/armeabi-v7a目录下看libapp_BaiduMapApplib.so的大小

把engine-dev/mk/cmake/CMakeLists.txt中的隐藏符号表的代码注释掉之后重新编译引擎

可以看到,增加符号表之后的so明显变大了

1.4 查看符号表

在mac系统中可以使用nm命令查看符号表,例如

nm -A libapp_BaiduMapApplib.so

如果想查看是否包含某个方法,可以用grep命令过滤一下,例如

nm -A libapp_BaiduMapApplib.so| grep OnTimerUpdate

可以看到,BaseLayer.cpp文件中包含OnTimerUpdate方法

对于没有符号表的so库使用上边的命令,是没有输出的

2、addr2line

我们经常会遇到地图引擎的crash问题,这个时候就体现出来符号表的作用了,使用addr2line工具,我们可以有效提取出来C/C++层crash的详细信息

首先我们在BaseLayer.cpp中故意插入一段有数组越界的问题代码

VChar chTest[1] = {0};

sprintf(chTest, "house_Ration is %f", house_Ration);

CVLog::Log(CVLog::eLOGError, chTest);

然后在引擎测试工程中运行,触发了crash,关键日志如下

11-29 17:18:22.818 11269 11269 F libc    : FORTIFY: vsprintf: prevented 25-byte write into 1-byte buffer
11-29 17:18:22.818 11269 11269 F libc    : Fatal signal 6 (SIGABRT), code -1 (SI_QUEUE) in tid 11269 (baidumapsdkdemo), pid 11269 (baidumapsdkdemo)
11-29 17:18:22.848 11320 11320 I crash_dump32: obtaining output fd from tombstoned, type: kDebuggerdTombstone
11-29 17:18:22.851  1105  1105 I /system/bin/tombstoned: received crash request for pid 11269
11-29 17:18:22.853 11320 11320 I crash_dump32: performing dump of process 11269 (target tid = 11269)
11-29 17:18:22.863 11320 11320 F DEBUG   : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
11-29 17:18:22.863 11320 11320 F DEBUG   : Build fingerprint: 'HUAWEI/LIO-AL00/HWLIO:10/HUAWEILIO-AL00/102.0.0.211C00:user/release-keys'
11-29 17:18:22.863 11320 11320 F DEBUG   : Revision: '0'
11-29 17:18:22.863 11320 11320 F DEBUG   : ABI: 'arm'
11-29 17:18:22.865 11320 11320 F DEBUG   : SYSVMTYPE: Maple
11-29 17:18:22.865 11320 11320 F DEBUG   : APPVMTYPE: Art
11-29 17:18:22.865 11320 11320 F DEBUG   : Timestamp: 2021-11-29 17:18:22+0800
11-29 17:18:22.865 11320 11320 F DEBUG   : pid: 11269, tid: 11269, name: baidumapsdkdemo  >>>com.baidu.map.baidumapsdkdemo<<<
11-29 17:18:22.865 11320 11320 F DEBUG   : uid: 10271
11-29 17:18:22.865 11320 11320 F DEBUG   : signal 6 (SIGABRT), code -1 (SI_QUEUE), fault addr --------
11-29 17:18:22.865 11320 11320 F DEBUG   : Abort message: 'FORTIFY: vsprintf: prevented 25-byte write into 1-byte buffer'
11-29 17:18:22.865 11320 11320 F DEBUG   :     r0  00000000  r1  00002c05  r2  00000006  r3  ff8cc958
11-29 17:18:22.865 11320 11320 F DEBUG   :     r4  ff8cc96c  r5  ff8cc950  r6  00002c05  r7  0000016b
11-29 17:18:22.865 11320 11320 F DEBUG   :     r8  ff8cc968  r9  ff8cc958  r10 ff8cc988  r11 ff8cc978
11-29 17:18:22.865 11320 11320 F DEBUG   :     ip  00002c05  sp  ff8cc928  lr  e659858f  pc  e65985a2
11-29 17:18:22.872  4397  4917 I ScenarioService: refresh visibleApp:[com.baidu.map.baidumapsdkdemo]
11-29 17:18:22.872  4397  4917 I PGServer: report state:14 event type:1 pid:-1 uid:-1 pkg:com.baidu.map.baidumapsdkdemo to pid: 4397
11-29 17:18:22.872  4397  4917 I ApsAppsTypeHandler: APS: APK: ApsAppsTypeHandler.getInstance, sInstance = com.huawei.android.hwaps.o@15bbd88
11-29 17:18:22.872  4397  4917 I PF_API_JNI: ACCKIT_APS_NotifyInfo 3: com.baidu.map.baidumapsdkdemo
11-29 17:18:22.873   790   844 D ACCKIT_ : pack:"com.baidu.map.baidumapsdkdemo"
11-29 17:18:22.873  4397  5318 I AppJobCtrl: Visible App: com.baidu.map.baidumapsdkdemo
11-29 17:18:22.873  2047  4619 I PGManagerService: proxyJob, sub type:1, list: [com.baidu.map.baidumapsdkdemo]
11-29 17:18:22.873  4397  5318 I AppJobCtrl: UnP_job OK !
11-29 17:18:22.873  4397  5318 I AppJobCtrl: Invisible App: com.huawei.android.launcher
11-29 17:18:22.873  4397  5318 I PG_ash  : com.huawei.android.launcher become invisible
11-29 17:18:23.005   700  4197 I netd    : trafficSwapActiveStatsMap()<0.16ms>11-29 17:18:23.006   700  4197 I netd    : trafficSwapActiveStatsMap()<0.19ms>11-29 17:18:23.091 11320 11320 F DEBUG   : 
11-29 17:18:23.091 11320 11320 F DEBUG   : backtrace:
11-29 17:18:23.091 11320 11320 F DEBUG   :       #00 pc 000545a2  /apex/com.android.runtime/lib/bionic/libc.so (abort+166) (BuildId: b3a547af3eb880c5dfd66f61a8c8b4ca)
11-29 17:18:23.091 11320 11320 F DEBUG   :       #01 pc 00070133  /apex/com.android.runtime/lib/bionic/libc.so (__fortify_fatal(char const*, ...)+26) (BuildId: b3a547af3eb880c5dfd66f61a8c8b4ca)
11-29 17:18:23.091 11320 11320 F DEBUG   :       #02 pc 00070a4b  /apex/com.android.runtime/lib/bionic/libc.so (__vsprintf_chk+50) (BuildId: b3a547af3eb880c5dfd66f61a8c8b4ca)
11-29 17:18:23.091 11320 11320 F DEBUG   :       #03 pc 0017d81f  /data/app/com.baidu.map.baidumapsdkdemo-Im_Mx9Z3_32ZQrVKJkvYFA==/lib/arm/libapp_BaiduMapApplib.so (BuildId: 576b8228f6f73078a77d6fb21add545985e9ec6b)
11-29 17:18:23.091 11320 11320 F DEBUG   :       #04 pc 0017d657  /data/app/com.baidu.map.baidumapsdkdemo-Im_Mx9Z3_32ZQrVKJkvYFA==/lib/arm/libapp_BaiduMapApplib.so (_baidu_framework::CBaseLayer::CBaseLayer()+386) (BuildId: 576b8228f6f73078a77d6fb21add545985e9ec6b)
11-29 17:18:23.091 11320 11320 F DEBUG   :       #05 pc 00204165  /data/app/com.baidu.map.baidumapsdkdemo-Im_Mx9Z3_32ZQrVKJkvYFA==/lib/arm/libapp_BaiduMapApplib.so (BuildId: 576b8228f6f73078a77d6fb21add545985e9ec6b)
11-29 17:18:23.091 11320 11320 F DEBUG   :       #06 pc 00203eb9  /data/app/com.baidu.map.baidumapsdkdemo-Im_Mx9Z3_32ZQrVKJkvYFA==/lib/arm/libapp_BaiduMapApplib.so (BuildId: 576b8228f6f73078a77d6fb21add545985e9ec6b)
11-29 17:18:23.091 11320 11320 F DEBUG   :       #07 pc 0020863d  /data/app/com.baidu.map.baidumapsdkdemo-Im_Mx9Z3_32ZQrVKJkvYFA==/lib/arm/libapp_BaiduMapApplib.so (BuildId: 576b8228f6f73078a77d6fb21add545985e9ec6b)
11-29 17:18:23.091 11320 11320 F DEBUG   :       #08 pc 002085fd  /data/app/com.baidu.map.baidumapsdkdemo-Im_Mx9Z3_32ZQrVKJkvYFA==/lib/arm/libapp_BaiduMapApplib.so (BuildId: 576b8228f6f73078a77d6fb21add545985e9ec6b)
11-29 17:18:23.091 11320 11320 F DEBUG   :       #09 pc 002085a1  /data/app/com.baidu.map.baidumapsdkdemo-Im_Mx9Z3_32ZQrVKJkvYFA==/lib/arm/libapp_BaiduMapApplib.so (BuildId: 576b8228f6f73078a77d6fb21add545985e9ec6b)
11-29 17:18:23.091 11320 11320 F DEBUG   :       #10 pc 00021ce7  /data/app/com.baidu.map.baidumapsdkdemo-Im_Mx9Z3_32ZQrVKJkvYFA==/lib/arm/libapp_BaiduMapBaselib.so (_baidu_framework::CVComServer::ComCreateInstance(_baidu_vi::CVString const&, _baidu_vi::CVString const&, void**)+78) (BuildId: 3c0d9445cc94ce898b8fd5e1b634d8efa4b6304f)
11-29 17:18:23.091 11320 11320 F DEBUG   :       #11 pc 00195a57  /data/app/com.baidu.map.baidumapsdkdemo-Im_Mx9Z3_32ZQrVKJkvYFA==/lib/arm/libapp_BaiduMapApplib.so (BuildId: 576b8228f6f73078a77d6fb21add545985e9ec6b)
11-29 17:18:23.091 11320 11320 F DEBUG   :       #12 pc 0019681d  /data/app/com.baidu.map.baidumapsdkdemo-Im_Mx9Z3_32ZQrVKJkvYFA==/lib/arm/libapp_BaiduMapApplib.so (BuildId: 576b8228f6f73078a77d6fb21add545985e9ec6b)
11-29 17:18:23.091 11320 11320 F DEBUG   :       #13 pc 001947d3  /data/app/com.baidu.map.baidumapsdkdemo-Im_Mx9Z3_32ZQrVKJkvYFA==/lib/arm/libapp_BaiduMapApplib.so (_baidu_framework::IVMapbaseFactory::CreateInstance(_baidu_vi::CVString const&, void**)+58) (BuildId: 576b8228f6f73078a77d6fb21add545985e9ec6b)
11-29 17:18:23.091 11320 11320 F DEBUG   :       #14 pc 00021ce7  /data/app/com.baidu.map.baidumapsdkdemo-Im_Mx9Z3_32ZQrVKJkvYFA==/lib/arm/libapp_BaiduMapBaselib.so (_baidu_framework::CVComServer::ComCreateInstance(_baidu_vi::CVString const&, _baidu_vi::CVString const&, void**)+78) (BuildId: 3c0d9445cc94ce898b8fd5e1b634d8efa4b6304f)
11-29 17:18:23.091 11320 11320 F DEBUG   :       #15 pc 000e3937  /data/app/com.baidu.map.baidumapsdkdemo-Im_Mx9Z3_32ZQrVKJkvYFA==/lib/arm/libapp_BaiduMapApplib.so (BuildId: 576b8228f6f73078a77d6fb21add545985e9ec6b)
11-29 17:18:23.091 11320 11320 F DEBUG   :       #16 pc 00012d7b  /data/app/com.baidu.map.baidumapsdkdemo-Im_Mx9Z3_32ZQrVKJkvYFA==/oat/arm/base.odex (art_jni_trampoline+74)
11-29 17:18:23.091 11320 11320 F DEBUG   :       #17 pc 000e3bc5  /apex/com.android.runtime/lib/libart.so (art_quick_invoke_stub_internal+68) (BuildId: 303d8241140d7a36bab763b064741026)
11-29 17:18:23.091 11320 11320 F DEBUG   :       #18 pc 004558bb  /apex/com.android.runtime/lib/libart.so (art_quick_invoke_stub+250) (BuildId: 303d8241140d7a36bab763b064741026)
11-29 17:18:23.091 11320 11320 F DEBUG   :       #19 pc 000ebffd  /apex/com.android.runtime/lib/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+160) (BuildId: 303d8241140d7a36bab763b064741026)
11-29 17:18:23.091 11320 11320 F DEBUG   :       #20 pc 0022499f  /apex/com.android.runtime/lib/libart.so (art::interpreter::ArtInterpreterToCompiledCodeBridge(art::Thread*, art::ArtMethod*, art::ShadowFrame*, unsigned short, art::JValue*)+274) (BuildId: 303d8241140d7a36bab763b064741026)
11-29 17:18:23.091 11320 11320 F DEBUG   :       #21 pc 00220b07  /apex/com.android.runtime/lib/libart.so (bool art::interpreter::DoCall(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+802) (BuildId: 303d8241140d7a36bab763b064741026)
11-29 17:18:23.091 11320 11320 F DEBUG   :       #22 pc 0044c96f  /apex/com.android.runtime/lib/libart.so (MterpInvokeDirect+358) (BuildId: 303d8241140d7a36bab763b064741026)
11-29 17:18:23.091 11320 11320 F DEBUG   :       #23 pc 000de914  /apex/com.android.runtime/lib/libart.so (mterp_op_invoke_direct+20) (BuildId: 303d8241140d7a36bab763b064741026)
11-29 17:18:23.091 11320 11320 F DEBUG   :       #24 pc 001734ec  /data/app/com.baidu.map.baidumapsdkdemo-Im_Mx9Z3_32ZQrVKJkvYFA==/oat/arm/base.vdex (com.baidu.platform.comjni.map.basemap.NABaseMap.create)
11-29 17:18:23.091 11320 11320 F DEBUG   :       #25 pc 0045038b  /apex/com.android.runtime/lib/libart.so (MterpInvokeVirtualQuick+1170) (BuildId: 303d8241140d7a36bab763b064741026)
11-29 17:18:23.091 11320 11320 F DEBUG   :       #26 pc 000e2594  /apex/com.android.runtime/lib/libart.so (mterp_op_invoke_virtual_quick+20) (BuildId: 303d8241140d7a36bab763b064741026)
11-29 17:18:23.091 11320 11320 F DEBUG   :       #27 pc 00170436  /data/app/com.baidu.map.baidumapsdkdemo-Im_Mx9Z3_32ZQrVKJkvYFA==/oat/arm/base.vdex (com.baidu.platform.comjni.map.basemap.AppBaseMap.Create+22)
11-29 17:18:23.091 11320 11320 F DEBUG   :       #28 pc 0045038b  /apex/com.android.runtime/lib/libart.so (MterpInvokeVirtualQuick+1170) (BuildId: 303d8241140d7a36bab763b064741026)
11-29 17:18:23.091 11320 11320 F DEBUG   :       #29 pc 000e2594  /apex/com.android.runtime/lib/libart.so (mterp_op_invoke_virtual_quick+20) (BuildId: 303d8241140d7a36bab763b064741026)
11-29 17:18:23.091 11320 11320 F DEBUG   :       #30 pc 0015efe6  /data/app/com.baidu.map.baidumapsdkdemo-Im_Mx9Z3_32ZQrVKJkvYFA==/oat/arm/base.vdex (com.baidu.platform.comapi.map.MapController.initBaseMap+14)
11-29 17:18:23.091 11320 11320 F DEBUG   :       #31 pc 0045038b  /apex/com.android.runtime/lib/libart.so (MterpInvokeVirtualQuick+1170) (BuildId: 303d8241140d7a36bab763b064741026)
11-29 17:18:23.091 11320 11320 F DEBUG   :       #32 pc 000e2594  /apex/com.android.runtime/lib/libart.so (mterp_op_invoke_virtual_quick+20) (BuildId: 303d8241140d7a36bab763b064741026)
11-29 17:18:23.091 11320 11320 F DEBUG   :       #33 pc 0017964a  /data/app/com.baidu.map.baidumapsdkdemo-Im_Mx9Z3_32ZQrVKJkvYFA==/oat/arm/base.vdex (mapview.MapViewFactory.initMainMapController+30)
11-29 17:18:23.091 11320 11320 F DEBUG   :       #34 pc 0044cbeb  /apex/com.android.runtime/lib/libart.so (MterpInvokeDirect+994) (BuildId: 303d8241140d7a36bab763b064741026)
11-29 17:18:23.091 11320 11320 F DEBUG   :       #35 pc 000de914  /apex/com.android.runtime/lib/libart.so (mterp_op_invoke_direct+20) (BuildId: 303d8241140d7a36bab763b064741026)
11-29 17:18:23.091 11320 11320 F DEBUG   :       #36 pc 00179908  /data/app/com.baidu.map.baidumapsdkdemo-Im_Mx9Z3_32ZQrVKJkvYFA==/oat/arm/base.vdex (mapview.MapViewFactory.startDataEngineThread+24)
11-29 17:18:23.091 11320 11320 F DEBUG   :       #37 pc 0045038b  /apex/com.android.runtime/lib/libart.so (MterpInvokeVirtualQuick+1170) (BuildId: 303d8241140d7a36bab763b064741026)
11-29 17:18:23.091 11320 11320 F DEBUG   :       #38 pc 000e2594  /apex/com.android.runtime/lib/libart.so (mterp_op_invoke_virtual_quick+20) (BuildId: 303d8241140d7a36bab763b064741026)
11-29 17:18:23.091 11320 11320 F DEBUG   :       #39 pc 0014688c  /data/app/com.baidu.map.baidumapsdkdemo-Im_Mx9Z3_32ZQrVKJkvYFA==/oat/arm/base.vdex (com.baidu.map.baidumapsdkdemo.DemoApplication.InitEngine+76)
11-29 17:18:23.091 11320 11320 F DEBUG   :       #40 pc 0044cbeb  /apex/com.android.runtime/lib/libart.so (MterpInvokeDirect+994) (BuildId: 303d8241140d7a36bab763b064741026)
11-29 17:18:23.091 11320 11320 F DEBUG   :       #41 pc 000de914  /apex/com.android.runtime/lib/libart.so (mterp_op_invoke_direct+20) (BuildId: 303d8241140d7a36bab763b064741026)
11-29 17:18:23.091 11320 11320 F DEBUG   :       #42 pc 0014691c  /data/app/com.baidu.map.baidumapsdkdemo-Im_Mx9Z3_32ZQrVKJkvYFA==/oat/arm/base.vdex (com.baidu.map.baidumapsdkdemo.DemoApplication.onCreate+88)
11-29 17:18:23.091 11320 11320 F DEBUG   :       #43 pc 00200bb3  /apex/com.android.runtime/lib/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_6JValueEbb.llvm.14250088896784669869+266) (BuildId: 303d8241140d7a36bab763b064741026)
11-29 17:18:23.091 11320 11320 F DEBUG   :       #44 pc 00205465  /apex/com.android.runtime/lib/libart.so (art::interpreter::EnterInterpreterFromEntryPoint(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*)+120) (BuildId: 303d8241140d7a36bab763b064741026)
11-29 17:18:23.091 11320 11320 F DEBUG   :       #45 pc 0043ed29  /apex/com.android.runtime/lib/libart.so (artQuickToInterpreterBridge+832) (BuildId: 303d8241140d7a36bab763b064741026)
11-29 17:18:23.091 11320 11320 F DEBUG   :       #46 pc 000e85a1  /apex/com.android.runtime/lib/libart.so (art_quick_to_interpreter_bridge+32) (BuildId: 303d8241140d7a36bab763b064741026)
11-29 17:18:23.091 11320 11320 F DEBUG   :       #47 pc 003f2781  /system/framework/arm/boot-framework.oat (android.app.Instrumentation.callApplicationOnCreate+112) (BuildId: 4ba2dd1826d84b568a7669bbfbf1b93219b32178)
11-29 17:18:23.091 11320 11320 F DEBUG   :       #48 pc 004edf87  /system/framework/arm/boot-framework.oat (android.app.ActivityThread.handleBindApplication+7222) (BuildId: 4ba2dd1826d84b568a7669bbfbf1b93219b32178)
11-29 17:18:23.091 11320 11320 F DEBUG   :       #49 pc 000e3bc5  /apex/com.android.runtime/lib/libart.so (art_quick_invoke_stub_internal+68) (BuildId: 303d8241140d7a36bab763b064741026)
11-29 17:18:23.091 11320 11320 F DEBUG   :       #50 pc 004558bb  /apex/com.android.runtime/lib/libart.so (art_quick_invoke_stub+250) (BuildId: 303d8241140d7a36bab763b064741026)
11-29 17:18:23.091 11320 11320 F DEBUG   :       #51 pc 000ebffd  /apex/com.android.runtime/lib/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+160) (BuildId: 303d8241140d7a36bab763b064741026)
11-29 17:18:23.091 11320 11320 F DEBUG   :       #52 pc 0022499f  /apex/com.android.runtime/lib/libart.so (art::interpreter::ArtInterpreterToCompiledCodeBridge(art::Thread*, art::ArtMethod*, art::ShadowFrame*, unsigned short, art::JValue*)+274) (BuildId: 303d8241140d7a36bab763b064741026)
11-29 17:18:23.091 11320 11320 F DEBUG   :       #53 pc 00220b07  /apex/com.android.runtime/lib/libart.so (bool art::interpreter::DoCall(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+802) (BuildId: 303d8241140d7a36bab763b064741026)
11-29 17:18:23.091 11320 11320 F DEBUG   :       #54 pc 0044c96f  /apex/com.android.runtime/lib/libart.so (MterpInvokeDirect+358) (BuildId: 303d8241140d7a36bab763b064741026)
11-29 17:18:23.091 11320 11320 F DEBUG   :       #55 pc 000de914  /apex/com.android.runtime/lib/libart.so (mterp_op_invoke_direct+20) (BuildId: 303d8241140d7a36bab763b064741026)
11-29 17:18:23.091 11320 11320 F DEBUG   :       #56 pc 001a3e40  /system/framework/framework.jar (android.app.ActivityThread.access$2600)
11-29 17:18:23.091 11320 11320 F DEBUG   :       #57 pc 00200bb3  /apex/com.android.runtime/lib/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_6JValueEbb.llvm.14250088896784669869+266) (BuildId: 303d8241140d7a36bab763b064741026)
11-29 17:18:23.091 11320 11320 F DEBUG   :       #58 pc 00205465  /apex/com.android.runtime/lib/libart.so (art::interpreter::EnterInterpreterFromEntryPoint(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*)+120) (BuildId: 303d8241140d7a36bab763b064741026)
11-29 17:18:23.091 11320 11320 F DEBUG   :       #59 pc 0043ed29  /apex/com.android.runtime/lib/libart.so (artQuickToInterpreterBridge+832) (BuildId: 303d8241140d7a36bab763b064741026)
11-29 17:18:23.091 11320 11320 F DEBUG   :       #60 pc 000e85a1  /apex/com.android.runtime/lib/libart.so (art_quick_to_interpreter_bridge+32) (BuildId: 303d8241140d7a36bab763b064741026)
11-29 17:18:23.091 11320 11320 F DEBUG   :       #61 pc 004e5349  /system/framework/arm/boot-framework.oat (android.app.ActivityThread$H.handleMessage+8200) (BuildId: 4ba2dd1826d84b568a7669bbfbf1b93219b32178)
11-29 17:18:23.091 11320 11320 F DEBUG   :       #62 pc 007544a1  /system/framework/arm/boot-framework.oat (android.os.Handler.dispatchMessage+136) (BuildId: 4ba2dd1826d84b568a7669bbfbf1b93219b32178)
11-29 17:18:23.091 11320 11320 F DEBUG   :       #63 pc 00756f2b  /system/framework/arm/boot-framework.oat (android.os.Looper.loop+1330) (BuildId: 4ba2dd1826d84b568a7669bbfbf1b93219b32178)
11-29 17:18:23.091 11320 11320 F DEBUG   :       #64 pc 004f64db  /system/framework/arm/boot-framework.oat (android.app.ActivityThread.main+3946) (BuildId: 4ba2dd1826d84b568a7669bbfbf1b93219b32178)
11-29 17:18:23.091 11320 11320 F DEBUG   :       #65 pc 000e3bc5  /apex/com.android.runtime/lib/libart.so (art_quick_invoke_stub_internal+68) (BuildId: 303d8241140d7a36bab763b064741026)
11-29 17:18:23.091 11320 11320 F DEBUG   :       #66 pc 004559cf  /apex/com.android.runtime/lib/libart.so (art_quick_invoke_static_stub+246) (BuildId: 303d8241140d7a36bab763b064741026)
11-29 17:18:23.091 11320 11320 F DEBUG   :       #67 pc 000ec011  /apex/com.android.runtime/lib/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+180) (BuildId: 303d8241140d7a36bab763b064741026)
11-29 17:18:23.091 11320 11320 F DEBUG   :       #68 pc 003932bb  /apex/com.android.runtime/lib/libart.so (art::(anonymous namespace)::InvokeWithArgArray(art::ScopedObjectAccessAlreadyRunnable const&, art::ArtMethod*, art::(anonymous namespace)::ArgArray*, art::JValue*, char const*)+54) (BuildId: 303d8241140d7a36bab763b064741026)
11-29 17:18:23.091 11320 11320 F DEBUG   :       #69 pc 0039459f  /apex/com.android.runtime/lib/libart.so (art::InvokeMethod(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, _jobject*, _jobject*, unsigned int)+798) (BuildId: 303d8241140d7a36bab763b064741026)
11-29 17:18:23.091 11320 11320 F DEBUG   :       #70 pc 0033c443  /apex/com.android.runtime/lib/libart.so (art::Method_invoke(_JNIEnv*, _jobject*, _jobject*, _jobjectArray*)+30) (BuildId: 303d8241140d7a36bab763b064741026)
11-29 17:18:23.091 11320 11320 F DEBUG   :       #71 pc 000f17ef  /system/framework/arm/boot.oat (art_jni_trampoline+110) (BuildId: e2fa8fb24009221e62edcf5e533ab3d301ea8c31)
11-29 17:18:23.091 11320 11320 F DEBUG   :       #72 pc 0095463b  /system/framework/arm/boot-framework.oat (com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run+114) (BuildId: 4ba2dd1826d84b568a7669bbfbf1b93219b32178)
11-29 17:18:23.091 11320 11320 F DEBUG   :       #73 pc 0095b62b  /system/framework/arm/boot-framework.oat (com.android.internal.os.ZygoteInit.main+3010) (BuildId: 4ba2dd1826d84b568a7669bbfbf1b93219b32178)
11-29 17:18:23.091 11320 11320 F DEBUG   :       #74 pc 000e3bc5  /apex/com.android.runtime/lib/libart.so (art_quick_invoke_stub_internal+68) (BuildId: 303d8241140d7a36bab763b064741026)
11-29 17:18:23.091 11320 11320 F DEBUG   :       #75 pc 004559cf  /apex/com.android.runtime/lib/libart.so (art_quick_invoke_static_stub+246) (BuildId: 303d8241140d7a36bab763b064741026)
11-29 17:18:23.091 11320 11320 F DEBUG   :       #76 pc 000ec011  /apex/com.android.runtime/lib/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+180) (BuildId: 303d8241140d7a36bab763b064741026)
11-29 17:18:23.091 11320 11320 F DEBUG   :       #77 pc 003932bb  /apex/com.android.runtime/lib/libart.so (art::(anonymous namespace)::InvokeWithArgArray(art::ScopedObjectAccessAlreadyRunnable const&, art::ArtMethod*, art::(anonymous namespace)::ArgArray*, art::JValue*, char const*)+54) (BuildId: 303d8241140d7a36bab763b064741026)
11-29 17:18:23.091 11320 11320 F DEBUG   :       #78 pc 003930ed  /apex/com.android.runtime/lib/libart.so (art::InvokeWithVarArgs(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, _jmethodID*, std::__va_list)+288) (BuildId: 303d8241140d7a36bab763b064741026)
11-29 17:18:23.092 11320 11320 F DEBUG   :       #79 pc 002d1f35  /apex/com.android.runtime/lib/libart.so (art::JNI::CallStaticVoidMethodV(_JNIEnv*, _jclass*, _jmethodID*, std::__va_list)+464) (BuildId: 303d8241140d7a36bab763b064741026)
11-29 17:18:23.092 11320 11320 F DEBUG   :       #80 pc 000ae391  /system/lib/libandroid_runtime.so (_JNIEnv::CallStaticVoidMethod(_jclass*, _jmethodID*, ...)+28) (BuildId: 2080afde594cceebfa19bb9e84b74c9e)
11-29 17:18:23.092 11320 11320 F DEBUG   :       #81 pc 000b1091  /system/lib/libandroid_runtime.so (android::AndroidRuntime::start(char const*, android::Vector const&, bool)+760) (BuildId: 2080afde594cceebfa19bb9e84b74c9e)
11-29 17:18:23.092 11320 11320 F DEBUG   :       #82 pc 000022f5  /system/bin/app_process32 (main+688) (BuildId: 3828d29d4d168f5ce591a33e42fd0f43)
11-29 17:18:23.092 11320 11320 F DEBUG   :       #83 pc 0004e09b  /apex/com.android.runtime/lib/bionic/libc.so (__libc_init+66) (BuildId: b3a547af3eb880c5dfd66f61a8c8b4ca)
11-29 17:18:23.092 11320 11320 F DEBUG   :       #84 pc 0000202f  /system/bin/app_process32 (_start_main+38) (BuildId: 3828d29d4d168f5ce591a33e42fd0f43)
11-29 17:18:23.092 11320 11320 F DEBUG   :       #85 pc 00004456  
11-29 17:18:23.169  2047  4619 D RemoteAnimationController: app-onAnimationFinished(): mOuter=com.android.server.wm.RemoteAnimationController@813ea5
11-29 17:18:23.169  2047  4619 D RemoteAnimationController: onAnimationFinished(): Notify animation finished:
11-29 17:18:23.169  2047  4619 I WindowManager: send SET_LAUNCHER_VISIBLE_IN_FINGER_BOOST visible: true,delay:0, handle:true, userId:0, callingPid: 2047
11-29 17:18:23.169  2047  2660 I WindowManager: handle SET_LAUNCHER_VISIBLE_IN_FINGER_BOOST visible:true handle:trueuserId:0, currentUserId:0
11-29 17:18:23.169  2047  4619 I WindowManager: onAnimationFinished task=27

1、确认crash基本信息

Fatal signal 6 (SIGABRT), code -1 (SI_QUEUE) in tid 11269 (baidumapsdkdemo), pid 11269 (baidumapsdkdemo)

可以看到,是引擎的测试工程发生了crash,导致Crash的是signal 6,关键错误信息是 SI_QUEUE

2、查看backtrace

11-29 17:18:23.091 11320 11320 F DEBUG   : backtrace:
11-29 17:18:23.091 11320 11320 F DEBUG   :       #00 pc 000545a2  /apex/com.android.runtime/lib/bionic/libc.so (abort+166) (BuildId: b3a547af3eb880c5dfd66f61a8c8b4ca)
11-29 17:18:23.091 11320 11320 F DEBUG   :       #01 pc 00070133  /apex/com.android.runtime/lib/bionic/libc.so (__fortify_fatal(char const*, ...)+26) (BuildId: b3a547af3eb880c5dfd66f61a8c8b4ca)
11-29 17:18:23.091 11320 11320 F DEBUG   :       #02 pc 00070a4b  /apex/com.android.runtime/lib/bionic/libc.so (__vsprintf_chk+50) (BuildId: b3a547af3eb880c5dfd66f61a8c8b4ca)
11-29 17:18:23.091 11320 11320 F DEBUG   :       #03 pc 0017d81f  /data/app/com.baidu.map.baidumapsdkdemo-Im_Mx9Z3_32ZQrVKJkvYFA==/lib/arm/libapp_BaiduMapApplib.so (BuildId: 576b8228f6f73078a77d6fb21add545985e9ec6b)
11-29 17:18:23.091 11320 11320 F DEBUG   :       #04 pc 0017d657  /data/app/com.baidu.map.baidumapsdkdemo-Im_Mx9Z3_32ZQrVKJkvYFA==/lib/arm/libapp_BaiduMapApplib.so (_baidu_framework::CBaseLayer::CBaseLayer()+386) (BuildId: 576b8228f6f73078a77d6fb21add545985e9ec6b)
11-29 17:18:23.091 11320 11320 F DEBUG   :       #05 pc 00204165  /data/app/com.baidu.map.baidumapsdkdemo-Im_Mx9Z3_32ZQrVKJkvYFA==/lib/arm/libapp_BaiduMapApplib.so (BuildId: 576b8228f6f73078a77d6fb21add545985e9ec6b)
11-29 17:18:23.091 11320 11320 F DEBUG   :       #06 pc 00203eb9  /data/app/com.baidu.map.baidumapsdkdemo-Im_Mx9Z3_32ZQrVKJkvYFA==/lib/arm/libapp_BaiduMapApplib.so (BuildId: 576b8228f6f73078a77d6fb21add545985e9ec6b)
11-29 17:18:23.091 11320 11320 F DEBUG   :       #07 pc 0020863d  /data/app/com.baidu.map.baidumapsdkdemo-Im_Mx9Z3_32ZQrVKJkvYFA==/lib/arm/libapp_BaiduMapApplib.so (BuildId: 576b8228f6f73078a77d6fb21add545985e9ec6b)
11-29 17:18:23.091 11320 11320 F DEBUG   :       #08 pc 002085fd  /data/app/com.baidu.map.baidumapsdkdemo-Im_Mx9Z3_32ZQrVKJkvYFA==/lib/arm/libapp_BaiduMapApplib.so (BuildId: 576b8228f6f73078a77d6fb21add545985e9ec6b)
11-29 17:18:23.091 11320 11320 F DEBUG   :       #09 pc 002085a1  /data/app/com.baidu.map.baidumapsdkdemo-Im_Mx9Z3_32ZQrVKJkvYFA==/lib/arm/libapp_BaiduMapApplib.so (BuildId: 576b8228f6f73078a77d6fb21add545985e9ec6b)
11-29 17:18:23.091 11320 11320 F DEBUG   :       #10 pc 00021ce7  /data/app/com.baidu.map.baidumapsdkdemo-Im_Mx9Z3_32ZQrVKJkvYFA==/lib/arm/libapp_BaiduMapBaselib.so (_baidu_framework::CVComServer::ComCreateInstance(_baidu_vi::CVString const&, _baidu_vi::CVString const&, void**)+78) (BuildId: 3c0d9445cc94ce898b8fd5e1b634d8efa4b6304f)
11-29 17:18:23.091 11320 11320 F DEBUG   :       #11 pc 00195a57  /data/app/com.baidu.map.baidumapsdkdemo-Im_Mx9Z3_32ZQrVKJkvYFA==/lib/arm/libapp_BaiduMapApplib.so (BuildId: 576b8228f6f73078a77d6fb21add545985e9ec6b)
11-29 17:18:23.091 11320 11320 F DEBUG   :       #12 pc 0019681d  /data/app/com.baidu.map.baidumapsdkdemo-Im_Mx9Z3_32ZQrVKJkvYFA==/lib/arm/libapp_BaiduMapApplib.so (BuildId: 576b8228f6f73078a77d6fb21add545985e9ec6b)
11-29 17:18:23.091 11320 11320 F DEBUG   :       #13 pc 001947d3  /data/app/com.baidu.map.baidumapsdkdemo-Im_Mx9Z3_32ZQrVKJkvYFA==/lib/arm/libapp_BaiduMapApplib.so (_baidu_framework::IVMapbaseFactory::CreateInstance(_baidu_vi::CVString const&, void**)+58) (BuildId: 576b8228f6f73078a77d6fb21add545985e9ec6b)
11-29 17:18:23.091 11320 11320 F DEBUG   :       #14 pc 00021ce7  /data/app/com.baidu.map.baidumapsdkdemo-Im_Mx9Z3_32ZQrVKJkvYFA==/lib/arm/libapp_BaiduMapBaselib.so (_baidu_framework::CVComServer::ComCreateInstance(_baidu_vi::CVString const&, _baidu_vi::CVString const&, void**)+78) (BuildId: 3c0d9445cc94ce898b8fd5e1b634d8efa4b6304f)
11-29 17:18:23.091 11320 11320 F DEBUG   :       #15 pc 000e3937  /data/app/com.baidu.map.baidumapsdkdemo-Im_Mx9Z3_32ZQrVKJkvYFA==/lib/arm/libapp_BaiduMapApplib.so (BuildId: 576b8228f6f73078a77d6fb21add545985e9ec6b)
11-29 17:18:23.091 11320 11320 F DEBUG   :       #16 pc 00012d7b  /data/app/com.baidu.map.baidumapsdkdemo-Im_Mx9Z3_32ZQrVKJkvYFA==/oat/arm/base.odex (art_jni_trampoline+74)
11-29 17:18:23.091 11320 11320 F DEBUG   :       #17 pc 000e3bc5  /apex/com.android.runtime/lib/libart.so (art_quick_invoke_stub_internal+68) (BuildId: 303d8241140d7a36bab763b064741026)

使用addr2line工具,将日志中的地址定位到具体的代码行

addr工具在NDK/toolchains目录下,记得arm64-v8a用上边的,32位用下边的

addr2line -e ****.so 堆栈信息

这个时候就体现出来符号表的作用了,我们使用不带符号表的release so去反解

因为没有符号表,所以解不出来,接下来用debug的so试一试

直接定位倒问题行号

确实是问题发生的地方

所以在发版的时候,保存一份对应的debug so是很重要的

你是否还在寻找稳定的海外服务器提供商?创新互联www.cdcxhl.cn海外机房具备T级流量清洗系统配攻击溯源,准确流量调度确保服务器高可用性,企业级服务器适合批量采购,新人活动首月15元起,快前往官网查看详情吧


当前题目:addr2line-创新互联
当前链接:http://cqcxhl.cn/article/djcosc.html

其他资讯

在线咨询
服务热线
服务热线:028-86922220
TOP