Jetson nano benchmarkncnn crash

9wbgstp7  于 4个月前  发布在  其他
关注(0)|答案(2)|浏览(36)

error log | 日志或报错信息 | ログ

crash 时候的 callstack

Thread 1 "benchncnn" received signal SIGSEGV, Segmentation fault.                                                                                                                                           
0x0000007fb34480e0 in ?? () from /usr/lib/aarch64-linux-gnu/tegra/libnvidia-eglcore.so.32.6.1                                                                                                               
(gdb) bt                                                                                                                                                                                                    
#0  0x0000007fb34480e0 in ?? ()               
   from /usr/lib/aarch64-linux-gnu/tegra/libnvidia-eglcore.so.32.6.1
#1  0x0000007fb34484e0 in ?? ()                                                                                                                                                         
   from /usr/lib/aarch64-linux-gnu/tegra/libnvidia-eglcore.so.32.6.1                                                                                                                  
#2  0x0000007fb355bd30 in ?? ()                                                                                                                          
   from /usr/lib/aarch64-linux-gnu/tegra/libnvidia-eglcore.so.32.6.1                                                                                                                                  
#3  0x0000007fb356220c in ?? ()                                                                                                                 
   from /usr/lib/aarch64-linux-gnu/tegra/libnvidia-eglcore.so.32.6.1                                                                                                                      
#4  0x00000055557ad2ec in ncnn::VkBlobAllocator::fastFree (this=0x5557ce6950, ptr=0x5557ce1a30)
    at /home/khj/ncnn/src/allocator.cpp:1045
#5  0x00000055557bac8c in ncnn::VkImageMat::release (this=0x5556d40060)                                                                                                                               
    at /home/khj/ncnn/src/mat.h:1804                                                                                
#6  ncnn::VulkanDevicePrivate::destroy_dummy_buffer_image (this=0x5556d3fdf0)
    at /home/khj/ncnn/src/gpu.cpp:1676
#7  0x00000055557bc978 in ncnn::VulkanDevice::~VulkanDevice (this=0x5556d3eba0,
    __in_chrg=<optimized out>) at /home/khj/ncnn/src/gpu.cpp:2062
#8  0x00000055557ba774 in ncnn::destroy_gpu_instance () at /home/khj/ncnn/src/gpu.cpp:1493
#9  0x00000055557c3b48 in ncnn::__ncnn_vulkan_instance_holder::~__ncnn_vulkan_instance_holder (
    this=0x5556a54680 <ncnn::g_instance>, __in_chrg=<optimized out>)
    at /home/khj/ncnn/src/gpu.cpp:55
#10 0x0000007fb7b2ae54 in __run_exit_handlers (status=0, listp=0x7fb7c495a0 <__exit_funcs>,
    run_list_atexit=127, run_list_atexit@entry=true, run_dtors=run_dtors@entry=true)
    at exit.c:108
#11 0x0000007fb7b2af8c in __GI_exit (status=<optimized out>) at exit.c:139
#12 0x0000007fb7b16724 in __libc_start_main (main=0x0, argc=0, argv=0x0, init=<optimized out>,
    fini=<optimized out>, rtld_fini=<optimized out>, stack_end=<optimized out>)
---Type <return> to continue, or q <return> to quit---
   tart.c:344
#13 0x00000055557a8714 in _start ()

看了一下崩到了 mat.h dtor 的 vkDestroyImageView(vkdev->vkdevice(), ptr->imageview, 0);
再看变量,好像都正常,也没有啥 nullptr

(gdb) p data                                                                        
$1 = (ncnn::VkImageMemory *) 0x5557ce1a30
(gdb) p allocator                                                         
$2 = (ncnn::VkAllocator *) 0x5557ce6950                                                       
(gdb) f 4                                                                      
#4  0x00000055557ad2ec in ncnn::VkBlobAllocator::fastFree (this=0x5557ce6950, ptr=0x5557ce1a30) at /home/khj/ncnn/src/allocator.cpp:1045
1045            vkDestroyImageView(vkdev->vkdevice(), ptr->imageview, 0);
(gdb) p vkdev                      
$3 = (const ncnn::VulkanDevice *) 0x5556d3eba0                            
(gdb) p *vkdev
$4 = {info = @0x5556d3fb00, vkBindBufferMemory2KHR = 0x7fb3558708, vkBindImageMemory2KHR = 0x7fb3558710, vkCmdBeginRenderPass2KHR = 0x7fb35587e8, vkCmdEndRenderPass2KHR = 0x7fb35587f8,
  vkCmdNextSubpass2KHR = 0x7fb35587f0, vkCreateRenderPass2KHR = 0x7fb35587e0, vkCreateDescriptorUpdateTemplateKHR = 0x7fb3558608, vkDestroyDescriptorUpdateTemplateKHR = 0x7fb3558610,
  vkUpdateDescriptorSetWithTemplateKHR = 0x7fb3558618, vkGetImageMemoryRequirements2KHR = 0x7fb35586e0, vkGetBufferMemoryRequirements2KHR = 0x7fb35586e8,
  vkGetImageSparseMemoryRequirements2KHR = 0x7fb35586f0, vkTrimCommandPoolKHR = 0x7fb35585f0, vkGetDescriptorSetLayoutSupportKHR = 0x7fb3558768, vkCmdPushDescriptorSetWithTemplateKHR = 0x7fb35585e0,
  vkCmdPushDescriptorSetKHR = 0x7fb35585d0, vkCreateSamplerYcbcrConversionKHR = 0x7fb35586f8, vkDestroySamplerYcbcrConversionKHR = 0x7fb3558700,
  vkCreateSwapchainKHR = 0x7fb7f08948 <terminator_CreateSwapchainKHR>, vkDestroySwapchainKHR = 0x7fb3558308, vkGetSwapchainImagesKHR = 0x7fb3558318, vkAcquireNextImageKHR = 0x7fb3558328,
  vkQueuePresentKHR = 0x7fb3558338, d = 0x5556d3fdf0}
(gdb) p *ptr     
$5 = {image = 0x5557ce6d40, imageview = 0x5556e30160, width = 1, height = 1, depth = 1, format = VK_FORMAT_R32_SFLOAT, memory = 0x5557ce2230, mapped_ptr = 0x0, bind_offset = 0, bind_capacity = 1024,
  access_flags = 96, image_layout = VK_IMAGE_LAYOUT_GENERAL, stage_flags = 2048, command_refcount = 0, refcount = 0}

context | 编译/运行环境 | バックグラウンド

Jetson nano, 编译命令

cmake -DCMAKE_TOOLCHAIN_FILE=../toolchains/jetson.toolchain.cmake -DNCNN_VULKAN=ON  -DNCNN_SYSTEM_GLSLANG=OFF -DCMAKE_BUILD_TYPE=Debug ..

how to reproduce | 复现步骤 | 再現方法

./benchmarkncnn 20 1 0 0 0

给点思路? 目前没想法,再学习。

9fkzdhlc

9fkzdhlc1#

你有復現作者的結果嗎? 我用 vulkan 跑慢很多

nihui/ncnn-small-board#2

1tuwyuhd

1tuwyuhd2#

复现了啊,和作者速度一样。

相关问题