高通android q 通过backtrace,使用addr2ine工具,定位crash问题记录
crash日志记录如下:
1.找到带有符号表的相应的库文件或者可执行文件:
高通sda660为例,我这里目录是 android/out/target/product/sdm660_64/symbols/vendor/lib,
定位 audio.primary.sdm660.so 这个库,此时异常pc 00042c98
执行:addr2line -e audio.primary.sdm660.so -f 00042c98
则会有如下输出:
in_read
vendor/qcom/opensource/audio-hal/primary-hal/hal/audio_hw.c:7062
此时,便找到了 异常时的函数,以及函数在文件中的位置
其他类似
--------- beginning of crash
08-29 02:23:37.916 657 4178 F libc : Fatal signal 4 (SIGILL), code 1 (ILL_ILLOPC), fault addr 0xe5721810 in tid 4178 (reader), pid 657 ([email protected])
08-29 02:23:38.243 4838 4838 I chatty : uid=1041(audioserver) crash_dump32 expire 12 lines
08-29 02:23:38.251 1000 1000 I /system/bin/tombstoned: received crash request for pid 4178
08-29 02:23:38.268 4838 4838 F DEBUG : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
08-29 02:23:38.269 4838 4838 F DEBUG : Build fingerprint: 'qti/sdm660_64/sdm660_64:10/QKQ1.200315.002/eng.guolia.20200829.012334:userdebug/test-keys'
08-29 02:23:38.269 4838 4838 F DEBUG : Revision: '0'
08-29 02:23:38.269 4838 4838 F DEBUG : ABI: 'arm'
08-29 02:23:38.277 4838 4838 F DEBUG : Timestamp: 2020-08-29 02:23:38+0800
08-29 02:23:38.278 4838 4838 F DEBUG : pid: 657, tid: 4178, name: reader >>> /vendor/bin/hw/[email protected] <<<
08-29 02:23:38.278 4838 4838 F DEBUG : uid: 1041
08-29 02:23:38.278 4838 4838 F DEBUG : signal 4 (SIGILL), code 1 (ILL_ILLOPC), fault addr 0xe5721810 (*pc=0xb510defe)
08-29 02:23:38.278 4838 4838 F DEBUG : r0 e572e0a8 r1 e5721811 r2 e8e97259 r3 e572d238
08-29 02:23:38.278 4838 4838 F DEBUG : r4 e95313b0 r5 e95313c4 r6 e572e0a8 r7 e976d000
08-29 02:23:38.279 4838 4838 F DEBUG : r8 e8dae1b4 r9 0000003e r10 e976d2ec r11 e57210e1
08-29 02:23:38.279 4838 4838 F DEBUG : ip e572dcb4 sp e53fced0 lr e8e96ef7 pc e5721810
08-29 02:23:38.337 4838 4838 F DEBUG :
08-29 02:23:38.337 4838 4838 F DEBUG : backtrace:
08-29 02:23:38.337 4838 4838 F DEBUG : #00 pc 00007810 /vendor/lib/hw/[email protected] (android::hardware::bluetooth::audio::V2_0::IBluetoothAudioProvidersFactory::~IBluetoothAudioProvidersFactory()) (BuildId: 8e643062e8922b419abe6c783872ac68)
08-29 02:23:38.337 4838 4838 F DEBUG : #01 pc 0000aef5 /system/lib/vndk-sp-29/libutils.so (android::RefBase::decStrong(void const*) const+64) (BuildId: e5cee006fa5f6a3889269972f210a6d9)
08-29 02:23:38.337 4838 4838 F DEBUG : #02 pc 0000adb9 /vendor/lib/hw/[email protected] (_ZTv0_n12_N7android8hardware9bluetooth5audio4V2_014implementation28BluetoothAudioDeathRecipientD0Ev+48) (BuildId: 8e643062e8922b419abe6c783872ac68)
08-29 02:23:38.338 4838 4838 F DEBUG : #03 pc 0000aef5 /system/lib/vndk-sp-29/libutils.so (android::RefBase::decStrong(void const*) const+64) (BuildId: e5cee006fa5f6a3889269972f210a6d9)
08-29 02:23:38.338 4838 4838 F DEBUG : #04 pc 00007141 /vendor/lib/hw/[email protected]l.so (android::hardware::bluetooth::audio::V2_0::implementation::HearingAidAudioProvider::~HearingAidAudioProvider()+96) (BuildId: 8e643062e8922b419abe6c783872ac68)
08-29 02:23:38.338 4838 4838 F DEBUG : #05 pc 000acaf3 /apex/com.android.runtime/lib/bionic/libc.so (__cxa_finalize+154) (BuildId: c62fe8b718132fa6c79964a08d275177)
08-29 02:23:38.338 4838 4838 F DEBUG : #06 pc 000a8213 /apex/com.android.runtime/lib/bionic/libc.so (exit+10) (BuildId: c62fe8b718132fa6c79964a08d275177)
08-29 02:23:38.338 4838 4838 F DEBUG : #07 pc 000144cd /vendor/lib/libaec.so (AecProcessing_FrameProcess+5996) (BuildId: 5dd708a15aabd1f92d260f1ee9b317eb)
08-29 02:23:38.338 4838 4838 F DEBUG : #08 pc 00042c98 /vendor/lib/hw/audio.primary.sdm660.so (in_read+2220) (BuildId: d84673711d2fbe81f25a4e4d1ef0a9d7)
08-29 02:23:38.339 4838 4838 F DEBUG : #09 pc 0002525d /vendor/lib/hw/[email protected] (android::hardware::audio::V5_0::implementation::(anonymous namespace)::ReadThread::threadLoop()+220) (BuildId: ddd37fcf5d14561e0d0fa980564f57f2)
08-29 02:23:38.339 4838 4838 F DEBUG : #10 pc 0000da0f /system/lib/vndk-sp-29/libutils.so (android::Thread::_threadLoop(void*)+214) (BuildId: e5cee006fa5f6a3889269972f210a6d9)
08-29 02:23:38.339 4838 4838 F DEBUG : #11 pc 000aa8db /apex/com.android.runtime/lib/bionic/libc.so (__pthread_start(void*)+20) (BuildId: c62fe8b718132fa6c79964a08d275177)
08-29 02:23:38.340 4838 4838 F DEBUG : #12 pc 000619b3 /apex/com.android.runtime/lib/bionic/libc.so (__start_thread+30) (BuildId: c62fe8b718132fa6c79964a08d275177)
08-29 02:23:38.980 1214 1253 E BatteryExternalStatsWorker: no controller energy info supplied for bluetooth