调用Device失败

适用场景

现象描述

调用Device失败(容器内),日志中报以下类似信息:

日志信息(1):日志中有打印ERROR信息“drvDeviceOpen”失败字样,如下所示。

[ascend][ERROR][2021-06-26-17:53:15:689064][curpid: 32707, 32707][devdrv][drvDeviceOpen 79]get phys failed, devId(0), phy_devId(0)

日志信息(2):查看内核日志(dmesg)中有打印“device is in used”字样。如下所示。

[52783.010878] [ascend] [ERROR] [devdrv] [devdrv_manager_container_table_devlist_add_ns 832] <drv_hlt_dsmi_te:5615> device is in used
[52783.010881] [ascend] [ERROR] [tsdrv] [devdrv_open 194] <drv_hlt_dsmi_te:5615> add to list failed. dev_id(0)
[52783.013546] [ascend] [devdrv] [devdrv_manager_container_get_devnum 1306] <drv_hlt_dsmi_te:5615> weird device number, dev_num = 0
[52783.013547] [ascend] [ERROR] [devdrv] [devdrv_manager_container_get_devlist_ns 1210] <drv_hlt_dsmi_te:5615> some devices are used by other docker, mnt_ns = 0xffff8d33a5963720
[52783.013548] [ascend] [ERROR] [devdrv] [devdrv_manager_container_get_davinci_devlist 1248] <drv_hlt_dsmi_te:5615> get davinci devlist failed, ret(-22).

可能原因

针对调用Device失败,可能原因如下:

处理步骤