登录
注册
开源
企业版
高校版
搜索
帮助中心
使用条款
关于我们
开源
企业版
高校版
私有云
模力方舟
AI 队友
登录
注册
代码拉取完成,页面将自动刷新
仓库状态说明
开源项目
>
服务器应用
>
容器/虚拟机
&&
人工智能
>
大模型
&&
捐赠
捐赠前请先登录
取消
前往登录
扫描微信二维码支付
取消
支付完成
支付提示
将跳转至支付宝完成支付
确定
取消
Watch
不关注
关注所有动态
仅关注版本发行动态
关注但不提醒动态
26
Star
29
Fork
26
Ascend
/
ascend-docker-runtime
暂停
代码
Issues
4
Pull Requests
5
Wiki
统计
流水线
服务
质量分析
Jenkins for Gitee
腾讯云托管
腾讯云 Serverless
悬镜安全
阿里云 SAE
Codeblitz
SBOM
开发画像分析
我知道了,不再自动展开
更新失败,请稍后重试!
移除标识
内容风险标识
本任务被
标识为内容中包含有代码安全 Bug 、隐私泄露等敏感信息,仓库外成员不可访问
ascend-docker-runtime 出现内存非法访问 invalid memory address or nil pointer dereference
DONE
#IB5420
缺陷
Nativu5
创建于
2024-11-18 15:41
**一、问题现象(附报错日志上下文):** 运行以下命令: ```bash /usr/local/Ascend/Ascend-Docker-Runtime/ascend-docker-runtime --debug create -b ubuntu ubuntu ``` 出现以下报错: ``` 2024/11/18 15:15:43 runtime error: invalid memory address or nil pointer dereference ``` 相关日志: ``` [INFO] 2024/11/18 15:15:43.050665 1 hwlog/api.go:108 runtime-run.log's logger init success [INFO] 2024/11/18 15:15:43.051839 1 process/process.go:543 devices is: [0] [INFO] 2024/11/18 15:15:43.051959 1 process/process.go:253 vnpu split done: vdevice: -1 ``` **二、软硬件版本:** **软件:** - 操作系统版本: openEuler 22.03 LTS - runc:runc version 1.2.2 - ascend-docker-runtime 版本:Ascend-docker-runtime_6.0.RC3_linux-aarch64.run - 镜像:ubuntu:latest **硬件:** - CPU:Kunpeng-920 - GPU:910B3 **三、测试步骤:** 1. 安装 runc、skopeo 和 umoci: 使用 skopeo 拉取镜像,使用 umoci 解压镜像、runc 作为运行时。 ```bash dnf install skopeo wget https://github.com/opencontainers/runc/releases/download/v1.2.2/runc.arm64 mv runc.arm64 /usr/bin/runc ``` ```bash git clone https://github.com/opencontainers/umoci.git cd umoci/ make cp umoci /usr/bin/ ``` 2. 下载和解压镜像: ```bash skopeo copy docker://ubuntu:latest oci:ubuntu:latest umoci unpack --rootless --image ubuntu:latest ubuntu ``` 3. 编辑 config.json: 编辑刚刚获得的 OCI Bundle 中的 `config.json`。修改三项: - `terminal` 设置为 `false`; - `args` 设置为 `npu-smi`; - `env` 添加 `ASCEND_VISIBLE_DEVICES=0`。 修改后的参考配置为: ```json { "ociVersion": "1.0.2", "process": { "terminal": false, "user": { "uid": 0, "gid": 0 }, "args": [ "npu-smi" ], "env": [ "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin", "TERM=xterm", "HOME=/root", "ASCEND_VISIBLE_DEVICES=0" ], "cwd": "/", "capabilities": { "bounding": [ "CAP_AUDIT_WRITE", "CAP_KILL", "CAP_NET_BIND_SERVICE" ], "effective": [ "CAP_AUDIT_WRITE", "CAP_KILL", "CAP_NET_BIND_SERVICE" ], "inheritable": [ "CAP_AUDIT_WRITE", "CAP_KILL", "CAP_NET_BIND_SERVICE" ], "permitted": [ "CAP_AUDIT_WRITE", "CAP_KILL", "CAP_NET_BIND_SERVICE" ], "ambient": [ "CAP_AUDIT_WRITE", "CAP_KILL", "CAP_NET_BIND_SERVICE" ] }, "rlimits": [ { "type": "RLIMIT_NOFILE", "hard": 1024, "soft": 1024 } ], "noNewPrivileges": true }, "root": { "path": "rootfs" }, "hostname": "umoci-default", "mounts": [ { "destination": "/proc", "type": "proc", "source": "proc" }, { "destination": "/dev", "type": "tmpfs", "source": "tmpfs", "options": [ "nosuid", "strictatime", "mode=755", "size=65536k" ] }, { "destination": "/dev/pts", "type": "devpts", "source": "devpts", "options": [ "nosuid", "noexec", "newinstance", "ptmxmode=0666", "mode=0620" ] }, { "destination": "/dev/shm", "type": "tmpfs", "source": "shm", "options": [ "nosuid", "noexec", "nodev", "mode=1777", "size=65536k" ] }, { "destination": "/dev/mqueue", "type": "mqueue", "source": "mqueue", "options": [ "nosuid", "noexec", "nodev" ] }, { "destination": "/sys", "type": "bind", "source": "/sys", "options": [ "rbind", "nosuid", "noexec", "nodev", "ro" ] }, { "destination": "/etc/resolv.conf", "type": "bind", "source": "/etc/resolv.conf", "options": [ "rbind", "ro" ] } ], "annotations": { "org.opencontainers.image.architecture": "arm64", "org.opencontainers.image.author": "", "org.opencontainers.image.created": "2024-10-16T09:25:40.778855786Z", "org.opencontainers.image.exposedPorts": "", "org.opencontainers.image.os": "linux", "org.opencontainers.image.ref.name": "ubuntu", "org.opencontainers.image.stopSignal": "", "org.opencontainers.image.version": "24.04" }, "linux": { "uidMappings": [ { "containerID": 0, "hostID": 0, "size": 1 } ], "gidMappings": [ { "containerID": 0, "hostID": 0, "size": 1 } ], "namespaces": [ { "type": "cgroup" }, { "type": "pid" }, { "type": "ipc" }, { "type": "uts" }, { "type": "mount" }, { "type": "user" } ], "maskedPaths": [ "/proc/kcore", "/proc/latency_stats", "/proc/timer_list", "/proc/timer_stats", "/proc/sched_debug", "/sys/firmware", "/proc/scsi" ], "readonlyPaths": [ "/proc/asound", "/proc/bus", "/proc/fs", "/proc/irq", "/proc/sys", "/proc/sysrq-trigger" ] } } ``` 4. 创建容器: ```bash /usr/local/Ascend/Ascend-Docker-Runtime/ascend-docker-runtime --debug create -b ubuntu ubuntu ``` 创建容器时出现内存非法访问的报错(见上方)。 **四、日志信息:** 日志信息如上。 **五、其他信息:** 测试了 crun 和 runc,均不能正常使用,报错内容一致。请问能否提供 ascend-docker-runtime 的正确配置和使用方案,谢谢!
**一、问题现象(附报错日志上下文):** 运行以下命令: ```bash /usr/local/Ascend/Ascend-Docker-Runtime/ascend-docker-runtime --debug create -b ubuntu ubuntu ``` 出现以下报错: ``` 2024/11/18 15:15:43 runtime error: invalid memory address or nil pointer dereference ``` 相关日志: ``` [INFO] 2024/11/18 15:15:43.050665 1 hwlog/api.go:108 runtime-run.log's logger init success [INFO] 2024/11/18 15:15:43.051839 1 process/process.go:543 devices is: [0] [INFO] 2024/11/18 15:15:43.051959 1 process/process.go:253 vnpu split done: vdevice: -1 ``` **二、软硬件版本:** **软件:** - 操作系统版本: openEuler 22.03 LTS - runc:runc version 1.2.2 - ascend-docker-runtime 版本:Ascend-docker-runtime_6.0.RC3_linux-aarch64.run - 镜像:ubuntu:latest **硬件:** - CPU:Kunpeng-920 - GPU:910B3 **三、测试步骤:** 1. 安装 runc、skopeo 和 umoci: 使用 skopeo 拉取镜像,使用 umoci 解压镜像、runc 作为运行时。 ```bash dnf install skopeo wget https://github.com/opencontainers/runc/releases/download/v1.2.2/runc.arm64 mv runc.arm64 /usr/bin/runc ``` ```bash git clone https://github.com/opencontainers/umoci.git cd umoci/ make cp umoci /usr/bin/ ``` 2. 下载和解压镜像: ```bash skopeo copy docker://ubuntu:latest oci:ubuntu:latest umoci unpack --rootless --image ubuntu:latest ubuntu ``` 3. 编辑 config.json: 编辑刚刚获得的 OCI Bundle 中的 `config.json`。修改三项: - `terminal` 设置为 `false`; - `args` 设置为 `npu-smi`; - `env` 添加 `ASCEND_VISIBLE_DEVICES=0`。 修改后的参考配置为: ```json { "ociVersion": "1.0.2", "process": { "terminal": false, "user": { "uid": 0, "gid": 0 }, "args": [ "npu-smi" ], "env": [ "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin", "TERM=xterm", "HOME=/root", "ASCEND_VISIBLE_DEVICES=0" ], "cwd": "/", "capabilities": { "bounding": [ "CAP_AUDIT_WRITE", "CAP_KILL", "CAP_NET_BIND_SERVICE" ], "effective": [ "CAP_AUDIT_WRITE", "CAP_KILL", "CAP_NET_BIND_SERVICE" ], "inheritable": [ "CAP_AUDIT_WRITE", "CAP_KILL", "CAP_NET_BIND_SERVICE" ], "permitted": [ "CAP_AUDIT_WRITE", "CAP_KILL", "CAP_NET_BIND_SERVICE" ], "ambient": [ "CAP_AUDIT_WRITE", "CAP_KILL", "CAP_NET_BIND_SERVICE" ] }, "rlimits": [ { "type": "RLIMIT_NOFILE", "hard": 1024, "soft": 1024 } ], "noNewPrivileges": true }, "root": { "path": "rootfs" }, "hostname": "umoci-default", "mounts": [ { "destination": "/proc", "type": "proc", "source": "proc" }, { "destination": "/dev", "type": "tmpfs", "source": "tmpfs", "options": [ "nosuid", "strictatime", "mode=755", "size=65536k" ] }, { "destination": "/dev/pts", "type": "devpts", "source": "devpts", "options": [ "nosuid", "noexec", "newinstance", "ptmxmode=0666", "mode=0620" ] }, { "destination": "/dev/shm", "type": "tmpfs", "source": "shm", "options": [ "nosuid", "noexec", "nodev", "mode=1777", "size=65536k" ] }, { "destination": "/dev/mqueue", "type": "mqueue", "source": "mqueue", "options": [ "nosuid", "noexec", "nodev" ] }, { "destination": "/sys", "type": "bind", "source": "/sys", "options": [ "rbind", "nosuid", "noexec", "nodev", "ro" ] }, { "destination": "/etc/resolv.conf", "type": "bind", "source": "/etc/resolv.conf", "options": [ "rbind", "ro" ] } ], "annotations": { "org.opencontainers.image.architecture": "arm64", "org.opencontainers.image.author": "", "org.opencontainers.image.created": "2024-10-16T09:25:40.778855786Z", "org.opencontainers.image.exposedPorts": "", "org.opencontainers.image.os": "linux", "org.opencontainers.image.ref.name": "ubuntu", "org.opencontainers.image.stopSignal": "", "org.opencontainers.image.version": "24.04" }, "linux": { "uidMappings": [ { "containerID": 0, "hostID": 0, "size": 1 } ], "gidMappings": [ { "containerID": 0, "hostID": 0, "size": 1 } ], "namespaces": [ { "type": "cgroup" }, { "type": "pid" }, { "type": "ipc" }, { "type": "uts" }, { "type": "mount" }, { "type": "user" } ], "maskedPaths": [ "/proc/kcore", "/proc/latency_stats", "/proc/timer_list", "/proc/timer_stats", "/proc/sched_debug", "/sys/firmware", "/proc/scsi" ], "readonlyPaths": [ "/proc/asound", "/proc/bus", "/proc/fs", "/proc/irq", "/proc/sys", "/proc/sysrq-trigger" ] } } ``` 4. 创建容器: ```bash /usr/local/Ascend/Ascend-Docker-Runtime/ascend-docker-runtime --debug create -b ubuntu ubuntu ``` 创建容器时出现内存非法访问的报错(见上方)。 **四、日志信息:** 日志信息如上。 **五、其他信息:** 测试了 crun 和 runc,均不能正常使用,报错内容一致。请问能否提供 ascend-docker-runtime 的正确配置和使用方案,谢谢!
评论 (
3
)
登录
后才可以发表评论
状态
DONE
TODO
WIP
DONE
CLOSED
REJECTED
负责人
未设置
标签
未设置
项目
未立项任务
未立项任务
里程碑
未关联里程碑
未关联里程碑
Pull Requests
未关联
未关联
关联的 Pull Requests 被合并后可能会关闭此 issue
分支
未关联
分支 (
-
)
标签 (
-
)
开始日期   -   截止日期
-
置顶选项
不置顶
置顶等级:高
置顶等级:中
置顶等级:低
优先级
不指定
严重
主要
次要
不重要
预计工期
(小时)
参与者(2)
Go
1
https://gitee.com/ascend/ascend-docker-runtime.git
git@gitee.com:ascend/ascend-docker-runtime.git
ascend
ascend-docker-runtime
ascend-docker-runtime
点此查找更多帮助
搜索帮助
Git 命令在线学习
如何在 Gitee 导入 GitHub 仓库
Git 仓库基础操作
企业版和社区版功能对比
SSH 公钥设置
如何处理代码冲突
仓库体积过大,如何减小?
如何找回被删除的仓库数据
Gitee 产品配额说明
GitHub仓库快速导入Gitee及同步更新
什么是 Release(发行版)
将 PHP 项目自动发布到 packagist.org
评论
仓库举报
回到顶部
登录提示
该操作需登录 Gitee 帐号,请先登录后再操作。
立即登录
没有帐号,去注册