error log | 日志或报错信息 | ログ
Android端日志:
--------- beginning of crash
10-12 19:11:42.535 20690 20745 F libc : Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0 in tid 20745 (.paxlprtestdemo), pid 20690 (.paxlprtestdemo)
10-12 19:11:42.573 21112 21112 I crash_dump64: obtaining output fd from tombstoned, type: kDebuggerdTombstone
10-12 19:11:42.574 884 884 I /system/bin/tombstoned: received crash request for pid 20745
10-12 19:11:42.577 21112 21112 I crash_dump64: performing dump of process 20690 (target tid = 20745)
10-12 19:11:42.593 21112 21112 F DEBUG :************************************************
10-12 19:11:42.593 21112 21112 F DEBUG : Build fingerprint: 'Redmi/cannon/cannon:10/QP1A.190711.020/V12.0.9.0.QJECNXM:user/release-keys'
10-12 19:11:42.593 21112 21112 F DEBUG : Revision: '0'
10-12 19:11:42.594 21112 21112 F DEBUG : ABI: 'arm64'
10-12 19:11:42.594 21112 21112 F DEBUG : Timestamp: 2022-10-12 19:11:42+0800
10-12 19:11:42.594 21112 21112 F DEBUG : pid: 20690, tid: 20745, name: .appname >>> {package_name} <<<
10-12 19:11:42.594 21112 21112 F DEBUG : uid: 10303
10-12 19:11:42.594 21112 21112 F DEBUG : signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0
10-12 19:11:42.594 21112 21112 F DEBUG : Cause: null pointer dereference
10-12 19:11:42.594 21112 21112 F DEBUG : x0 0000000000000000 x1 000000745c67a5c4 x2 0000000000000000 x3 000000745c67a5c0
10-12 19:11:42.594 21112 21112 F DEBUG : x4 0000000000000000 x5 0000000000000000 x6 0000000000000000 x7 0000000000000004
10-12 19:11:42.594 21112 21112 F DEBUG : x8 0000000000000002 x9 0000007fe6db1e80 x10 0000007fe6db1e7c x11 0000000000000002
10-12 19:11:42.594 21112 21112 F DEBUG : x12 00000074782d3a70 x13 0000007476458ec0 x14 00000074782d3a70 x15 0000007476458ed0
10-12 19:11:42.594 21112 21112 F DEBUG : x16 0000000000000000 x17 0000000000000006 x18 000000747715e000 x19 00000074ca013960
10-12 19:11:42.594 21112 21112 F DEBUG : x20 0000007fe6db1e28 x21 0000007fe6db1e84 x22 0000007fe6db1e70 x23 0000007fe6db2210
10-12 19:11:42.594 21112 21112 F DEBUG : x24 00000074782d3b4c x25 0000000000000001 x26 00000074782d4018 x27 0000000000000002
10-12 19:11:42.594 21112 21112 F DEBUG : x28 0000000000000101 x29 00000074782d3af0
10-12 19:11:42.594 21112 21112 F DEBUG : sp 00000074782d3a50 lr 0000007478394274 pc 00000074783945ac
10-12 19:11:42.595 21112 21112 F DEBUG :
10-12 19:11:42.595 21112 21112 F DEBUG : backtrace:
10-12 19:11:42.595 21112 21112 F DEBUG : #00 pc 00000000000bc5ac /data/app/{package_name}-IZIYNaHV26eg_z5L-wUSHA==/lib/arm64/libncnn.so (BuildId: 2c820bb6ba465abeafeec8e40dbba82a5a0f85d0)
10-12 19:11:42.595 21112 21112 F DEBUG : #01 pc 00000000003ef158 /data/app/{package_name}-IZIYNaHV26eg_z5L-wUSHA==/lib/arm64/libncnn.so (__kmp_invoke_microtask+152) (BuildId: 2c820bb6ba465abeafeec8e40dbba82a5a0f85d0)
根据crash日志提到的寄存器地址,通过NDK编译器进一步解析得到如下信息:
.omp_outlined..34
__kmp_invoke_microtask
context | 编译/运行环境 | バックグラウンド
Device:Redmi Note 9
OS:Android 10
CPU:联发科天玑800U
RAM:6GB
ncnn commit id:902954d73755afaf969815c3fe4c857e0dadd658
ANDROID_NDK:android-ndk-r21e
how to reproduce | 复现步骤 | 再現方法
1.下载最新ncnn库
2.编译Android版本库
cmake -DCMAKE_TOOLCHAIN_FILE=$ANDROID_NDK/build/cmake/android.toolchain.cmake -DANDROID_ABI="armeabi-v7a" -DANDROID_ARM_NEON=ON -DANDROID_PLATFORM=android-16 ..
make -j8
make install
cmake -DCMAKE_TOOLCHAIN_FILE=$ANDROID_NDK/build/cmake/android.toolchain.cmake -DANDROID_ABI="arm64-v8a" -DANDROID_PLATFORM=android-21 ..
make -j8
make install
3.将编译好的libncnn.so库加入Android推理应用工程中
4.编译运行应用
5.在代码运行到执行推理时应用崩溃
LOGI("---------- dbNet getTextBoxes from_pixels ----------");
ncnn::Mat input = ncnn::Mat::from_pixels(inputMat.data, ncnn::Mat::PIXEL_RGBA2BGR, inputMat.cols, inputMat.rows);
LOGI("---------- dbNet getTextBoxes create_extractor ----------");
ncnn::Extractor extractor = net->create_extractor();
LOGI("---------- dbNet getTextBoxes substract_mean_normalize ----------");
input.substract_mean_normalize(meanValues, normValues);
LOGI("---------- dbNet getTextBoxes input ----------");
extractor.input("x", input);
ncnn::Mat out;
LOGI("---------- dbNet getTextBoxes extract ----------");
extractor.extract("sigmoid_0.tmp_0", out); //这一步执行时应用崩溃
more | 其他 | その他
问题ncnn模型详见附件
bug_model.zip
经测试,已发现多台不同品牌CPU型号的设备出现这样的问题,均打印出类似的日志信息,并指向libncnn.so
出现崩溃的设备cpu还有:展锐SC9863A和高通骁龙Snapdragon 855 Plus
能正常运行的设备有:展锐SC9832E、高通MSM8917、高通MSM8953、KylinKirin970
麻烦帮忙分析一下是什么问题,不胜感激!
2条答案
按热度按时间w8biq8rn1#
小米系统 省电模式?
hfyxw5xn2#
小米系统 省电模式?
没有,都是正常使用的,展锐SC9863A(Android 10)和高通骁龙Snapdragon 855 Plus(Android 11)也出现了崩溃