1、版本
ncnn-20220216 release版本
2、崩溃堆栈
Tombstone maker: 'xCrash 3.0.0'
Crash type: 'native'
Start time: '2022-05-12T09:29:43.007+0800'
Crash time: '2022-05-12T09:32:34.929+0800'
App ID: 'com.xxxx.xxxx'
App version: '7.69.2'
Rooted: 'No'
API level: '29'
OS version: '10'
Kernel version: 'Linux version 4.14.116 #1 SMP PREEMPT Fri Aug 13 12:39:43 CST 2021 (aarch64)'
ABI list: 'arm64-v8a,armeabi-v7a,armeabi'
Manufacturer: 'HUAWEI'
Brand: 'HUAWEI'
Model: 'OCE-AN10'
Build fingerprint: 'HUAWEI/OCE-AN10/HWOCE-L:10/HUAWEIOCE-AN10/102.0.0.165C00:user/release-keys'
ABI: 'arm64'
pid: 6530, tid: 9959, name: FrescoBackgroun >>> com.xxxx.xxxx <<<
signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0
x0 0000000000000000 x1 0000007204933160 x2 0000007204933030 x3 0000007204933f38
x4 0000007204932fd0 x5 00000071a70c25a0 x6 00000071b2cafea8 x7 0000000000000001
x8 00000071d53a8e50 x9 0000000000000244 x10 000000719c9e0a08 x11 0000000000000001
x12 0000007204933058 x13 0000000000000001 x14 0000000000000002 x15 0000000000000002
x16 0000007222d97730 x17 0000000000000003 x18 00000071ccbba000 x19 0000007204932f20
x20 0000000000000001 x21 0000007204936020 x22 000000719bccc7a0 x23 0000007204933160
x24 0000000000000000 x25 0000000000000002 x26 0000007204933f38 x27 0000000000000004
x28 0000000000000002 x29 00000072049330e0
sp 0000007204932e70 lr 000000717e0c5a00 pc 000000717e151424
backtrace:
#00 pc 000000000022c424 /data/app/com.xxxx.xxxx-JiTtlniklULF9ubz2HBDfA==/lib/arm64/libncnn.so (_ZNK4ncnn18Convolution_vulkan7forwardERKNS_5VkMatERS1_RNS_9VkComputeERKNS_6OptionE+436)
#1 pc 00000000001a09fc /data/app/com.xxxx.xxxx-JiTtlniklULF9ubz2HBDfA==/lib/arm64/libncnn.so (_ZNK4ncnn10NetPrivate16do_forward_layerEPKNS_5LayerERNSt6__ndk16vectorINS_5VkMatENS4_9allocatorIS6_EEEERNS_9VkComputeERKNS_6OptionE+496)
#2 pc 00000000001a072c /data/app/com.xxxx.xxxx-JiTtlniklULF9ubz2HBDfA==/lib/arm64/libncnn.so (_ZNK4ncnn10NetPrivate13forward_layerEiRNSt6__ndk16vectorINS_3MatENS1_9allocatorIS3_EEEERNS2_INS_5VkMatENS4_IS8_EEEERNS_9VkComputeERKNS_6OptionE+1440)
#3 pc 00000000001a0754 /data/app/com.xxxx.xxxx-JiTtlniklULF9ubz2HBDfA==/lib/arm64/libncnn.so (_ZNK4ncnn10NetPrivate13forward_layerEiRNSt6__ndk16vectorINS_3MatENS1_9allocatorIS3_EEEERNS2_INS_5VkMatENS4_IS8_EEEERNS_9VkComputeERKNS_6OptionE+1480)
#4 pc 00000000001a0754 /data/app/com.xxxx.xxxx-JiTtlniklULF9ubz2HBDfA==/lib/arm64/libncnn.so (_ZNK4ncnn10NetPrivate13forward_layerEiRNSt6__ndk16vectorINS_3MatENS1_9allocatorIS3_EEEERNS2_INS_5VkMatENS4_IS8_EEEERNS_9VkComputeERKNS_6OptionE+1480)
#5 pc 00000000001a0754 /data/app/com.xxxx.xxxx-JiTtlniklULF9ubz2HBDfA==/lib/arm64/libncnn.so (_ZNK4ncnn10NetPrivate13forward_layerEiRNSt6__ndk16vectorINS_3MatENS1_9allocatorIS3_EEEERNS2_INS_5VkMatENS4_IS8_EEEERNS_9VkComputeERKNS_6OptionE+1480)
#6 pc 00000000001a0754 /data/app/com.xxxx.xxxx-JiTtlniklULF9ubz2HBDfA==/lib/arm64/libncnn.so (_ZNK4ncnn10NetPrivate13forward_layerEiRNSt6__ndk16vectorINS_3MatENS1_9allocatorIS3_EEEERNS2_INS_5VkMatENS4_IS8_EEEERNS_9VkComputeERKNS_6OptionE+1480)
#7 pc 00000000001a0754 /data/app/com.xxxx.xxxx-JiTtlniklULF9ubz2HBDfA==/lib/arm64/libncnn.so (_ZNK4ncnn10NetPrivate13forward_layerEiRNSt6__ndk16vectorINS_3MatENS1_9allocatorIS3_EEEERNS2_INS_5VkMatENS4_IS8_EEEERNS_9VkComputeERKNS_6OptionE+1480)
#8 pc 00000000001a0754 /data/app/com.xxxx.xxxx-JiTtlniklULF9ubz2HBDfA==/lib/arm64/libncnn.so (_ZNK4ncnn10NetPrivate13forward_layerEiRNSt6__ndk16vectorINS_3MatENS1_9allocatorIS3_EEEERNS2_INS_5VkMatENS4_IS8_EEEERNS_9VkComputeERKNS_6OptionE+1480)
#9 pc 00000000001a0754 /data/app/com.xxxx.xxxx-JiTtlniklULF9ubz2HBDfA==/lib/arm64/libncnn.so (_ZNK4ncnn10NetPrivate13forward_layerEiRNSt6__ndk16vectorINS_3MatENS1_9allocatorIS3_EEEERNS2_INS_5VkMatENS4_IS8_EEEERNS_9VkComputeERKNS_6OptionE+1480)
#10 pc 00000000001a0754 /data/app/com.xxxx.xxxx-JiTtlniklULF9ubz2HBDfA==/lib/arm64/libncnn.so (_ZNK4ncnn10NetPrivate13forward_layerEiRNSt6__ndk16vectorINS_3MatENS1_9allocatorIS3_EEEERNS2_INS_5VkMatENS4_IS8_EEEERNS_9VkComputeERKNS_6OptionE+1480)
#11 pc 00000000001a0754 /data/app/com.xxxx.xxxx-JiTtlniklULF9ubz2HBDfA==/lib/arm64/libncnn.so (_ZNK4ncnn10NetPrivate13forward_layerEiRNSt6__ndk16vectorINS_3MatENS1_9allocatorIS3_EEEERNS2_INS_5VkMatENS4_IS8_EEEERNS_9VkComputeERKNS_6OptionE+1480)
#12 pc 00000000001a0754 /data/app/com.xxxx.xxxx-JiTtlniklULF9ubz2HBDfA==/lib/arm64/libncnn.so (_ZNK4ncnn10NetPrivate13forward_layerEiRNSt6__ndk16vectorINS_3MatENS1_9allocatorIS3_EEEERNS2_INS_5VkMatENS4_IS8_EEEERNS_9VkComputeERKNS_6OptionE+1480)
#13 pc 00000000001a0754 /data/app/com.xxxx.xxxx-JiTtlniklULF9ubz2HBDfA==/lib/arm64/libncnn.so (_ZNK4ncnn10NetPrivate13forward_layerEiRNSt6__ndk16vectorINS_3MatENS1_9allocatorIS3_EEEERNS2_INS_5VkMatENS4_IS8_EEEERNS_9VkComputeERKNS_6OptionE+1480)
#14 pc 00000000001a958c /data/app/com.xxxx.xxxx-JiTtlniklULF9ubz2HBDfA==/lib/arm64/libncnn.so (_ZN4ncnn9Extractor7extractEiRNS_5VkMatERNS_9VkComputeE+304)
#15 pc 00000000001a8a58 /data/app/com.xxxx.xxxx-JiTtlniklULF9ubz2HBDfA==/lib/arm64/libncnn.so (_ZN4ncnn9Extractor7extractEiRNS_3MatEi+680)
#16 pc 00000000000051a8 /data/app/com.xxxx.xxxx-JiTtlniklULF9ubz2HBDfA==/lib/arm64/libvipSR.so (ZNK5VipSR13processMatRgbERKN4ncnn3MatERS1+188)
#17 pc 00000000000033dc /data/app/com.xxxx.xxxx-JiTtlniklULF9ubz2HBDfA==/lib/arm64/libvipSR.so (Java_com_vip_vipsr_VipSR_DoImageRgbSR+612)
#18 pc 0000000000150350 /apex/com.android.runtime/lib64/libart.so (art_quick_generic_jni_trampoline+144)
#19 pc 0000000000147334 /apex/com.android.runtime/lib64/libart.so (art_quick_invoke_stub+548)
#20 pc 00000000001561b4 /apex/com.android.runtime/lib64/libart.so (_ZN3art9ArtMethod6InvokeEPNS_6ThreadEPjjPNS_6JValueEPKc+252)
#21 pc 00000000002fd900 /apex/com.android.runtime/lib64/libart.so (_ZN3art11interpreter34ArtInterpreterToCompiledCodeBridgeEPNS_6ThreadEPNS_9ArtMethodEPNS_11ShadowFrameEtPNS_6JValueE+384)
#22 pc 00000000002f8bd0 /apex/com.android.runtime/lib64/libart.so (_ZN3art11interpreter6DoCallILb0ELb0EEEbPNS_9ArtMethodEPNS_6ThreadERNS_11ShadowFrameEPKNS_11InstructionEtPNS_6JValueE+912)
#23 pc 00000000005cb550 /apex/com.android.runtime/lib64/libart.so (MterpInvokeVirtual+648)
#24 pc 0000000000141814 /apex/com.android.runtime/lib64/libart.so (mterp_op_invoke_virtual+20)
#25 pc 00000000005cd060 /apex/com.android.runtime/lib64/libart.so (MterpInvokeInterface+1752)
#26 pc 0000000000141a14 /apex/com.android.runtime/lib64/libart.so (mterp_op_invoke_interface+20)
#27 pc 00000000005cdbfc /apex/com.android.runtime/lib64/libart.so (MterpInvokeDirect+1168)
#28 pc 0000000000141914 /apex/com.android.runtime/lib64/libart.so (mterp_op_invoke_direct+20)
#29 pc 00000000005cdbfc /apex/com.android.runtime/lib64/libart.so (MterpInvokeDirect+1168)
#30 pc 0000000000141914 /apex/com.android.runtime/lib64/libart.so (mterp_op_invoke_direct+20)
#31 pc 00000000005ce408 /apex/com.android.runtime/lib64/libart.so (MterpInvokeStatic+1136)
#32 pc 0000000000141994 /apex/com.android.runtime/lib64/libart.so (mterp_op_invoke_static+20)
#33 pc 00000000002ce22c /apex/com.android.runtime/lib64/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_6JValueEbb.llvm.10887373532384510885+320)
#34 pc 00000000005bc090 /apex/com.android.runtime/lib64/libart.so (artQuickToInterpreterBridge+1012)
#35 pc 0000000000150468 /apex/com.android.runtime/lib64/libart.so (art_quick_to_interpreter_bridge+88)
#36 pc 00000000003d8d08 /system/framework/arm64/boot.oat (java.util.concurrent.ThreadPoolExecutor.runWorker+984)
#37 pc 00000000003d5880 /system/framework/arm64/boot.oat (java.util.concurrent.ThreadPoolExecutor$Worker.run+64)
#38 pc 0000000000147334 /apex/com.android.runtime/lib64/libart.so (art_quick_invoke_stub+548)
#39 pc 00000000001561b4 /apex/com.android.runtime/lib64/libart.so (_ZN3art9ArtMethod6InvokeEPNS_6ThreadEPjjPNS_6JValueEPKc+252)
#40 pc 00000000002fd900 /apex/com.android.runtime/lib64/libart.so (_ZN3art11interpreter34ArtInterpreterToCompiledCodeBridgeEPNS_6ThreadEPNS_9ArtMethodEPNS_11ShadowFrameEtPNS_6JValueE+384)
#41 pc 00000000002f8bd0 /apex/com.android.runtime/lib64/libart.so (_ZN3art11interpreter6DoCallILb0ELb0EEEbPNS_9ArtMethodEPNS_6ThreadERNS_11ShadowFrameEPKNS_11InstructionEtPNS_6JValueE+912)
#42 pc 00000000005cccfc /apex/com.android.runtime/lib64/libart.so (MterpInvokeInterface+884)
#43 pc 0000000000141a14 /apex/com.android.runtime/lib64/libart.so (mterp_op_invoke_interface+20)
#44 pc 00000000002ce22c /apex/com.android.runtime/lib64/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_6JValueEbb.llvm.10887373532384510885+320)
#45 pc 00000000005bc090 /apex/com.android.runtime/lib64/libart.so (artQuickToInterpreterBridge+1012)
#46 pc 0000000000150468 /apex/com.android.runtime/lib64/libart.so (art_quick_to_interpreter_bridge+88)
#47 pc 0000000000217fc8 /system/framework/arm64/boot.oat (java.lang.Thread.run+72)
#48 pc 0000000000147334 /apex/com.android.runtime/lib64/libart.so (art_quick_invoke_stub+548)
#49 pc 00000000001561b4 /apex/com.android.runtime/lib64/libart.so (_ZN3art9ArtMethod6InvokeEPNS_6ThreadEPjjPNS_6JValueEPKc+252)
#50 pc 00000000004d8820 /apex/com.android.runtime/lib64/libart.so (_ZN3art12_GLOBAL__N_118InvokeWithArgArrayERKNS_33ScopedObjectAccessAlreadyRunnableEPNS_9ArtMethodEPNS0_8ArgArrayEPNS_6JValueEPKc+104)
#51 pc 00000000004d98b4 /apex/com.android.runtime/lib64/libart.so (_ZN3art35InvokeVirtualOrInterfaceWithJValuesERKNS_33ScopedObjectAccessAlreadyRunnableEP8_jobjectP10_jmethodIDPK6jvalue+416)
#52 pc 000000000051ca8c /apex/com.android.runtime/lib64/libart.so (_ZN3art6Thread14CreateCallbackEPv+1232)
#53 pc 00000000000cf700 /apex/com.android.runtime/lib64/bionic/libc.so (_ZL15__pthread_startPv+36)
#54 pc 00000000000720e8 /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64)
3条答案
按热度按时间5kgi1eie1#
堆栈信息看
ncnn/src/layer/vulkan/convolution_vulkan.cpp
Line 1010 in 6b2495c
| | padding->forward(bottom_blob, bottom_blob_bordered, cmd, opt_pad); |
padding NULL 导致 crash
azpvetkf2#
找到代码行的步骤
$ANDROID_NDK/toolchains/aarch64-linux-android-4.9/prebuilt/linux-x86_64/bin/aarch64-linux-android-objdump -d libncnn.so > libncnn.so.s
_ZNK4ncnn18Convolution_vulkan7forwardERKNS_5VkMatERS1_RNS_9VkComputeERKNS_6OptionE
0000000000203dc0 <_ZNK4ncnn18Convolution_vulkan7forwardERKNS_5VkMatERS1_RNS_9VkComputeERKNS_6OptionE>:
+436
= 0x203f74,找到行203f74: f9400008 ldr x8, [x0]
ncnn/src/layer/vulkan/convolution_vulkan.cpp
Line 983 in 6b2495c
| | intConvolution_vulkan::forward(const VkMat& bottom_blob, VkMat& top_blob, VkCompute& cmd, const Option& opt) const |
往上看,发现是多次判断 > 0 时候,进入
203f40
这正好对应于条件
ncnn/src/layer/vulkan/convolution_vulkan.cpp
Line 1005 in 6b2495c
| | if (pad_left > 0 || pad_right > 0 || pad_top > 0 || pad_bottom > 0) |
于是这段
对应于代码
203f74 正好是准备好了 padding->forward 4个参数后(x1 x2 x3 x4),调用前的地方
of1yzvn43#
看起来(not sure)是因为用了 dynamic weight 导致的