进程中断问题定位思路

您可以按如下步骤定位问题,若无法解决问题,再联系技术支持。您可以获取日志后单击Link联系技术支持。

准备阶段,需收集CANN日志文件。如何收集CANN日志文件(包括Host侧应用类日志、Device侧系统类日志),请参见收集进程中断问题信息。收集的日志所存放的目录,下文以${HOME}/err_log_info/为例。

在Host应用类日志中${HOME}/err_log_info/log/[run|debug]/plog/plog-pid_*.log中,执行grep -rn "ERROR"命令,若首报错存在错误码(但E*9***类的错误除外,这部分错误码表示系统内部错误码),可以参见错误码参考中解决方法尝试解决,若无法解决再联系技术支持;若首报错不存在错误码,则继续下面的步骤排查问题。

  1. 排查接口使用类错误。

    从收集的Host应用类日志中,找到发生进程中断问题附近时间的日志${HOME}/err_log_info/log/[run|debug]/plog/plog-pid_*.log,检查日志中是否存在"acl***" 、“[drv api]”、“rt***”等接口报错,若不存在,则跳转到2继续排查;若存在对外发布接口的报错(一般acl开头的接口是对外接口),则需根据CANN API参考中的接口使用说明、参数说明排查,其它内部接口报错需联系技术支持进一步定位,典型问题案例请参见调用SetDevice接口错误导致无可用ContextrtMemcpyAsync异步参数校验报错

  2. 排查任务执行错误。

    按本步骤中的内容先排查算子执行类的任务报错,再排查其它任务执行报错,若存在任务执行报错,则需提供对应报错信息,联系技术支持进一步定位问题;若不存在,则跳转到3继续排查。
    1. 在Host应用类日志中${HOME}/err_log_info/log/[run|debug]/plog/plog-pid_*.log中,执行grep -rn "fault kernel_name"命令或执行grep -rn "kernelName"命令搜索关键字,若存在“fault kernel_name”关键字且其为首报错或者在“kernelName”关键字处存在报错,那么表示算子执行报错,这时需获取报错处的kernel名称,联系技术支持进一步定位问题;
      • 存在“fault kernel_name”首报错的日志示例:
        [ERROR] RUNTIME(539029,python3):2024-03-25-11:22:02.462.276 [stream.cc:1509]539029 GetError:[INIT][DEFAULT]Stream Synchronize failed, stream_id=2, retCode=0x31, [vector core exception].
        [ERROR] RUNTIME(539029,python3):2024-03-25-11:22:02.462.315 [stream.cc:1512]539029 GetError:[INIT][DEFAULT]report error module_type=5, module_name=EZ9999
        [ERROR] RUNTIME(539029,python3):2024-03-25-11:22:02.462.346 [stream.cc:1512]539029 GetError:[INIT][DEFAULT]Aicore kernel execute failed, device_id=0, stream_id=2, report_stream_id=2, task_id=1, flip_num=0, fault kernel_name=Add_ee98c6628030785f610b924ab1557b31_high_performance_210000000, fault kernel info ext=none, program id=0, hash=11042444066001143980.
        [INFO] GE(539029,python3):2024-03-25-11:22:02.462.391 [error_manager.cc:306]539029 ReportInterErrMessage:report error_message, error_code:EZ9999, work_stream_id:53903439029, error_mode:0
        [ERROR] RUNTIME(539029,python3):2024-03-25-11:22:02.462.626 [stream.cc:1512]539029 GetError:[INIT][DEFAULT]report error module_type=5, module_name=EZ9999
        [ERROR] RUNTIME(539029,python3):2024-03-25-11:22:02.462.650 [stream.cc:1512]539029 GetError:[INIT][DEFAULT][AIC_INFO] after execute:args print end
        [INFO] GE(539029,python3):2024-03-25-11:22:02.462.677 [error_manager.cc:306]539029 ReportInterErrMessage:report error_message, error_code:EZ9999, work_stream_id:53903439029, error_mode:0
        [ERROR] RUNTIME(539029,python3):2024-03-25-11:22:02.462.840 [logger.cc:488]539029 StreamSynchronize:[INIT][DEFAULT]Stream synchronize failed, stream_id=2
        [ERROR] RUNTIME(539029,python3):2024-03-25-11:22:02.462.883 [api_c.cc:782]539029 rtStreamSynchronize:[INIT][DEFAULT]ErrCode=507035, desc=[vector core exception], InnerCode=0x715005e
        [ERROR] RUNTIME(539029,python3):2024-03-25-11:22:02.462.913 [error_message_manage.cc:53]539029 FuncErrorReason:[INIT][DEFAULT]report error module_type=3, module_name=EE8888
      • 在“kernelName”关键字处存在报错的日志示例:
        [ERROR] RUNTIME(3280125,python3):2023-12-11-11:42:58.805.278 [task_info.cc:8323]3280125 DoCompIeteSuccForFftspIusTask:[LOAD][LOAD]fftsplus report error, retcode=0x10f,  [fftsplus task exception]. 
        [ERROR] RUNTIME(3280125,python3):2023-12-11-11:42:58.805.293 [stream.cc:1463]3280125 GetError:[LOAD][LOAD]Stream Synchronlze failed,  stream_id = 2,  retcode=0x10f,  [fftsplus task exception].
        [ERROR] RUNTIME(3280125,python3):2023-12-11-11:42:58.805.409 [task_info.cc:8196]3280125 PrintAicAivErrorInfoForFftsPlusTask:[LOAD][LOAD]fftsplus task execute failed,  dev_id=0, stream_id=2, task_id=1948, context_id=0, thread_id=0,  err_type=11[fftsplus aicore error], pcStart=0x124dbce99914, kernelName:IncreFlashAttetion_b79da629624fb10fa525b749f186c95f_high_performance_18_mix_aic
        [ERROR] RUNTIME(3280125,python3):2023-12-11-11:42:58.805.476 [task_info.cc:8196]3280125 TaskFailCallBackForFftsPlusTask:[LOAD][LOAD]fftsplus streamId=2, taskId=1948, context_id=0, expandtype=1, rtCode=0x715006c,[fftsplus task exception]
        [ERROR] RUNTIME(3280125,python3):2023-12-11-11:42:58.805.551 [engine.cc:3890]3280125 StarsResumeRtsq:[LOAD][LOAD]stop scheduling in abort failure mode: stream_id=2, sq_id=2, sq_head=1948, task_id=1948, taskType=52.
        [TRACE] GE(3280125,python3):2023-12-11-11:42:58.833.094 [status:STOP] [ge_api.cc:851]3280125 RunGraphWithStreamAsync:Session run graph with stream async finished.
        [ERROR] RUNTIME(3280125,python3):2023-12-11-11:42:58.841.081 [stream.cc:1463]3280125 GetError:[LOAD][LOAD]Stream Synchronize failed, stream_id=2, retCode=0x10f, [fftsplus task exception].
        [ERROR] RUNTIME(3280125,python3):2023-12-11-11:42:58.841.113 [stream.cc:1466]3280125 GetError:[LOAD][LOAD]report error module_type=7, module_name=EE9999
        [ERROR] RUNTIME(3280125,python3):2023-12-11-11:42:58.841.126 [stream.cc:1466]3280125 GetError:[LOAD][LOAD]fftsplus task execute failed, dev_id=0, stream_id=2, task_id=1948, context_id=0, thread_id=0.
    2. 在Host应用类日志中${HOME}/err_log_info/log/[run|debug]/plog/plog-pid_*.log中,若存在“Task run failed”关键字,且其为首报错,那么表示CANN内部组件执行任务报错。

      此时可以先使用ascend-dmi工具的故障诊断功能压测,提供压测报告以及报错日志,联系技术支持进一步定位问题。若暂时不具备压测环境,也可以在联系技术支持时提供报错日志,由技术支持进一步定位后,再决定是否进行压测。ascend-dmi工具在MindX DL软件包中,该软件与CANN的配套关系请单击Link查询,ascend-dmi工具的安装及详细使用指导请参见Link

      日志报错处的sqe_type表示报错组件或模块,当首错的sqe_type是notify wait时,注意区分是否为模型里的算子报错,在下面plog中查看Error报错,然后再继续搜索“fault kernel_name”找到具体报错的算子。

      报错日志示例如下:

      [ERROR]  RUNTIME(2237671,python3) :2024-01-02-11:47:51.222.069 [ engine.CC:4057 ]2479231 ProcLogicCqReport:[EXEC][EXEC]Task run failed, device_id=5,  stream_id=6,  task_id=73, sqe_type=0(ffts), errType=0x1(task exception), sqSwStatus=0
      [ERROR]  RUNTIME(2237671,python3) :2024-01-02-11:47:52.260.748 [device_error_proc.cc:1166]2479231 ProcessStarsCoreErrorInfo:[EXEC][EXEC]report error module_type=5, module_name=EZ9999
      [ERROR]  RUNTIME(2237671,python3) :2024-01-02-11:47:52.260.832 [device_error_proc.cc:1166]2479231 ProcessStarsCoreErrorInfo:[EXEC][EXEC]The error from device(chipId:5, dieId:0), serial number is 4, there is an aivec error exception, core id is 4, error code = 0x800000, dump info: pc start: 0x1240c144412c, current: 0x1240c1444210, vec error infor 0x5104540702, mte error info: 0x1003000072, ifu error info: 0x4289505b1ac00, ccu error info: 0x172d1b826001020, cube error info: 0, biu error info:0, aic error mask: 0x6500020bd000288, para base: 0x124100043000.
      [ERROR]  RUNTIME(2237671,python3) :2024-01-02-11:47:52.260.911 [device_error_proc.cc:1178]2479231 ProcessStarsCoreErrorInfo:[EXEC][EXEC]report error module_type=5, module_name=EZ9999
      [ERROR]  RUNTIME(2237671,python3) :2024-01-02-11:47:52.260.922 [device_error_proc.cc:1178]2479231 ProcessStarsCoreErrorInfo:[EXEC][EXEC]The extend info: errorcode:(0x800000, 0, 0) errorStr: The DDR address of the MTE instruction is out of range. fixp_error0 info: 0x3000072, fixp_error1: 0x10 fsmId:0, tslot:0, thread:0, ctxid:0, blk:0, sublk:0, subErrType:4

  3. 排查心跳丢失问题。

    • Host应用类日志${HOME}/err_log_info/log/[run|debug]/plog/plog-pid_*.log中存在“Device lost heartbeat”关键字,且Device侧黑匣子日志history.log(在${HOME}/err_log_info/report/*/hisi_logs目录下)中存在“HEARTBEAT EXCEPTION”关键字,则表示TaskScheduler CPU心跳丢失,需联系技术支持进一步定位问题。
    • Device侧syslog日志(${HOME}/err_log_info/report/*/message目录下)中存在“fatal panic”关键字,则表示Control CPU心跳丢失,需要联系技术支持进一步定位问题。

  4. 排查资源管理异常问题。

    Host应用类日志${HOME}/err_log_info/log/[run|debug]/plog/plog-pid_*.log日志中存在“RESOURCE_ALLOC_FAIL”关键字,表示存在资源未释放的情况,需检查应用程序的代码逻辑,在内存等资源使用完成后,需及时释放。