多线程目标检测样例运行报错,Segmentation fault (core dumped) ${running_command}
收藏回复举报
多线程目标检测样例运行报错,Segmentation fault (core dumped) ${running_command}
t('forum.solved') 已解决
发表于2024-05-13 11:37:18
0 查看

一、问题现象:

多线程目标检测样例运行报错,内容如下:

[ERROR] ASCENDCL(10025,main):2024-05-10-10:05:49.237.779 [model.cpp:1201]10025 aclmdlGetIndexByName: [Get][Index]get index by name failed, cannot find tensor name[ascend_mbatch_shape_data]

/usr/local/Ascend/thirdpart/aarch64/common/sample_common.sh: line 261: 10025 Segmentation fault (core dumped) ${running_command}

二、软件版本:

-- CANN 版本 (e.g., CANN 3.0.x,5.x.x): 6.2RC2

--Python 版本 (e.g., Python 3.7.5):3.9.2

--操作系统版本:Ubuntu 22.04 LTS

--设备信息:Atlas 200I DK A2开发套件

三、测试步骤:

样例地址:https://www.hiascend.com/marketplace/mindx-sdk/case-studies/4698d6be-6156-4a1d-b747-d49dff77659a

前期环境配置:https://gitee.com/ascend/samples/blob/master/cplusplus/environment/catenation_environmental_guidance_CN.md

1、模型转换

按照样例提供的模型进行转换,转换是soc版本已设置为Ascend310B4,同时也尝试了Ascend310,但是都会报错。

cd $HOME/samples/cplusplus/level2_simple_inference/n_performance/1_multi_process_thread/YOLOV3_coco_detection_multi_thread_VENC/model  
wget https://obs-9be7.obs.cn-east-2.myhuaweicloud.com/003_Atc_Models/AE/ATC%20Model/Yolov3/yolov3.caffemodel
wget https://obs-9be7.obs.cn-east-2.myhuaweicloud.com/003_Atc_Models/AE/ATC%20Model/Yolov3/yolov3.prototxt
wget https://obs-9be7.obs.cn-east-2.myhuaweicloud.com/models/YOLOV3_coco_detection_multi_thread_VENC/aipp_bgr.cfg
atc --model=yolov3.prototxt --weight=yolov3.caffemodel --framework=0 --output=yolov3 --soc_version=Ascend310B4 --insert_op_conf=aipp_bgr.cfg

2、样例编译

cd $HOME/samples/cplusplus/level2_simple_inference/n_performance/1_multi_process_thread/YOLOV3_coco_detection_multi_thread_VENC/scripts

bash sample_build.sh

编译输出正常:

3、样例运行

bash sample_run.sh

出现错误,报错信息:

具体报错:

[INFO] The sample starts to run

[EVENT] PROFILING(10025,main):2024-05-10-10:05:44.489.407 [msprof_callback_impl.cpp:310] >>> (tid:10025) Started to register profiling ctrl callback.

[EVENT] ASCENDCL(10025,main):2024-05-10-10:05:44.837.371 [acl_resource_manager.cpp:90]10025 GetRuntimeV2Env: runtime v2 flag : model flag = 1, singleOp flag = 1

[EVENT] PROFILING(10025,main):2024-05-10-10:05:45.821.044 [msprof_callback_impl.cpp:79] >>> (tid:10025) MsprofCtrlCallback called, type: 255

[EVENT] RUNTIME(10025,main):2024-05-10-10:05:45.821.740 [runtime.cc:3831] 10025 GetVisibleDevices: ASCEND_RT_VISIBLE_DEVICES param was not set

[INFO] Acl init ok

[EVENT] TDT(10025,main):2024-05-10-10:05:45.846.021 [thread_mode_manager.cpp:34][Open][tid:10025] [ThreadModeManager] enter into open process deviceId[0] rankSize[0]

[EVENT] TDT(10025,main):2024-05-10-10:05:45.847.595 [thread_mode_manager.cpp:209][HandleAICPUPackage][tid:10025] begin load aicpu package path[/usr/local/Ascend/ascend-toolkit/latest/opp/Ascend/aicpu/] file[Ascend-aicpu_syskernels.tar.gz]

[EVENT] TDT(10025,main):2024-05-10-10:05:45.847.745 [package_worker.cpp:321][LoadAICPUPackageForThreadMode][tid:10025] Package checkcode is [42542610]

[EVENT] TDT(10025,main):2024-05-10-10:05:45.869.969 [thread_mode_manager.cpp:106][SetAICPUProfilingCallback][tid:10025] [ThreadModeManager] profiling callback is nullptr, skip set aicpu profiling callback

[EVENT] CCECPU(10025,main):2024-05-10-10:05:45.870.161 [aicpusd_lastword.cpp:33][RegLastwordCallback][tid:10025] Reg lastword mark[aicpu sd event mng] key[0].

[EVENT] CCECPU(10025,main):2024-05-10-10:05:45.870.258 [aicpusd_interface_process.cpp:464][GetCurrentRunMode][tid:10025] Current aicpu mode is offline (call by api).

[EVENT] CCECPU(10025,main):2024-05-10-10:05:45.870.296 [aicpusd_drv_manager.cpp:323][MarkMdc][tid:10025] Get hardware version[7] success.

[EVENT] CCECPU(10025,main):2024-05-10-10:05:45.870.327 [aicpusd_drv_manager.cpp:186][GetNormalAicpuInfo][tid:10025] aicpuBitMap[8], aicpuNum[1]

[EVENT] CCECPU(10025,main):2024-05-10-10:05:45.870.350 [aicpusd_drv_manager.cpp:220][GetCcpuInfo][tid:10025] ccpuBitMap[7]

[EVENT] CCECPU(10025,main):2024-05-10-10:05:45.870.390 [aicpusd_drv_manager.cpp:106][GetNormalAicpuDCpuInfo][tid:10025] GetNormalAicpuDCpuInfo, deviceId[0], aicpu_num[1], aicpu_os_sched[281470681743361], ccpu_num[255082402676739], ccpu_os_sched[255082402676737], dcpu_num[255082402676736], dcpu_os_sched[281470681743361], tscpu_num[187651416129536], tscpu_os_sched[0]

[EVENT] CCECPU(10025,main):2024-05-10-10:05:45.870.408 [aicpusd_drv_manager.cpp:302][InitDrvMgrCaluniqueVfId][tid:10025] InitDrvMgr uniqueVfId_:0 deviceVec[0]:0

[EVENT] CCECPU(10025,main):2024-05-10-10:05:45.870.421 [aicpusd_drv_manager.cpp:373][InitDrvMgr][tid:10025] host pid[10025], host proc name[], vf id[0], first aicpu index[0], aicpu num[1], dcpu base index[3], dcpu num[0]

[EVENT] CCECPU(10025,main):2024-05-10-10:05:45.870.632 [aicpusd_resource_manager.cpp:247][InitBufManager][tid:10025] Aicpu schedule SetBuffCfg successed!

[EVENT] CCECPU(10025,main):2024-05-10-10:05:45.871.222 [aicpusd_worker.cpp:66][ThreadPool][tid:10025] ThreadPool

[EVENT] CCECPU(10025,main):2024-05-10-10:05:45.871.522 [aicpusd_worker.cpp:294][AddPidToTask][tid:10028] Bind pid by hal.

[EVENT] CCECPU(10025,main):2024-05-10-10:05:45.871.552 [aicpusd_worker.cpp:296][AddPidToTask][tid:10028] AddPidToTask by halBindCgroup

[EVENT] CCECPU(10025,main):2024-05-10-10:05:45.890.784 [aicpusd_worker.cpp:344][SetAffinityBySelf][tid:10028] [hw]SetAffinityBySelf, physIndex[3], devNum[0]

[EVENT] CCECPU(10025,main):2024-05-10-10:05:45.890.840 [aicpusd_worker.cpp:401][SetAffinity][tid:10028] aicpu bind tid by self, index[0], deviceId[0], res[0].

[EVENT] CCECPU(10025,main):2024-05-10-10:05:45.892.079 [aicpusd_cust_so_manager.cpp:77][InitAicpuCustSoManager][tid:10025] cust so dir name is /root/cust_aicpu_0_0_10025/.

[EVENT] DRV(10025,main):2024-05-10-10:05:45.900.083 [grp_mng.c:81][bufmng] [halGrpCreate 81] Create grp. (grp_name=private_buff_grp_10025; grp_id=4; max_size=0; cache_flag=0)

[EVENT] DRV(10025,main):2024-05-10-10:05:45.900.138 [grp_mng.c:149][bufmng] [halGrpAddProc 149] add grp succ, name:private_buff_grp_10025, pid:10025, grp_id:4, admin:1 alloc:1 read:1 write:1

[EVENT] DRV(10025,main):2024-05-10-10:05:45.900.396 [buff_recycle.c:706][bufmng] [procMngInit 706] poolId 4 add task node uid 5 pid 10025

[EVENT] DRV(10025,main):2024-05-10-10:05:45.900.418 [drv_buff_mbuf.c:65][bufmng] [mbufSetPrivFlag 65] Set mbuf priv flag sucess. (flag=0, g_mbuf_priv_flag=0)

[EVENT] DRV(10025,main):2024-05-10-10:05:45.900.432 [grp_mng.c:217][bufmng] [halGrpAttach 217] grp attach, grp_name:private_buff_grp_10025, grp_id:4, timeout:1000

[EVENT] DRV(10025,main):2024-05-10-10:05:45.900.448 [drv_buff_memzone.c:450][bufmng] [memzone_cfg 450] BuffCfg success. (cfg num=4; huge_prior=393216; normal=393216; huge_only=393216; dvpp_huge_prior=393216; dvpp_normal=393216; dvpp_huge_only=393216)

[EVENT] TDT(10025,main):2024-05-10-10:05:45.904.754 [tsd_client.cpp:150][TsdCapabilityGet][tid:10025] TsdCapabilityGet begin.

[EVENT] TDT(10025,main):2024-05-10-10:05:45.926.492 [client_manager.cpp:153][SetProfilingCallback][tid:10025] [TsdClient] set profiling callback success.

[INFO] Open device 0 ok

[INFO] Use default context currently

[EVENT] GE(10025,main):2024-05-10-10:05:48.082.363 [davinci_model.cc:441]10025 InitFeatureMapAndP2PMem:[IMAS]InitFeatureMapAndP2PMem graph_0 MallocMemory type[F] memaddr[0x255086844445184] mem_size[17160192]

[INFO] Load model ../model/yolov3.om success

[INFO] Create model description success

[INFO] Create model(../model/yolov3.om) output success

[INFO] Init model ../model/yolov3.om success

[ERROR] ASCENDCL(10025,main):2024-05-10-10:05:49.237.779 [model.cpp:1201]10025 aclmdlGetIndexByName: [Get][Index]get index by name failed, cannot find tensor name[ascend_mbatch_shape_data]

/usr/local/Ascend/thirdpart/aarch64/common/sample_common.sh: line 261: 10025 Segmentation fault (core dumped) ${running_command}

我要发帖子