已关闭
[Bug]: 测试FireRedASR的mindir模型推理时出现double free引起的core #220
LiuZhenJie创建于  3月3日关闭于  3月10日
LiuZhenJie
LiuZhenJie
3月3日 创建

Checklist


[x] 1. 我已经搜索过相关问题,但没有得到预期的帮助.

[x] 2. 最新版本中该错误尚未修复.

[ ] 3. 请注意,如果您提交的Bug描述缺少相应的环境信息和最小可复现的demo,我们将很难复现和解决该问题,从而降低收到反馈的可能性,甚至该问题将被关闭.

🐞 问题详细描述

问题:测试FireRedASR的mindir模型推理时出现double free引起core,
开启动态分档+免拷贝三个输出,2个输出申请的mslite tensor放在device侧,1个输出申请的mslite tensor放在host侧

尝试:

  1. 最小化测试脚本,仅用于初始化免拷贝内存,并且设计了一个相同输入输出的demo小模型
  2. 同一个测试脚本,仅更换了加载的mindir模型,fsr模型测试时稳定复现double free,demo小模型则正常
    `double free or corruption (!prev)
    Fatal Python error: Aborted

Current thread 0x0000ffff89220020 (most recent call first):
File "/home/miniconda3/envs/fireredasr2s/lib/python3.10/site-packages/mindspore_lite/base_model.py", line 116 in predict
File "/home/miniconda3/envs/fireredasr2s/lib/python3.10/site-packages/mindspore_lite/model.py", line 526 in predict`
3. 修改测试脚本,三个输出均放在device侧,fsr模型测试正常,demo小模型测试正常

详细的环境信息描述

拉取fireredASR源码并创建python虚拟环境
$ conda create --name fireredasr2s python=3.10
$ conda activate fireredasr2s
$ git clone https://github.com/FireRedTeam/FireRedASR2S.git
$ cd FireRedASR2S # or fireredasr2s

其他辅助信息

版本信息

cann 8.5+mindspore 2.8.0
使用镜像swr.cn-south-1.myhuaweicloud.com/mindspore/mindspore-ascend-a2:2.8.0

Thanks for contributing 🎉!

likedislike
LiuZhenJieLiuZhenJie
3月3日 问题后端类型 由 [] 改变为 [Ascend]
LiuZhenJieLiuZhenJie
3月3日 关联组件 由 [] 改变为 [B-SIG-InnerDelivery]
LiuZhenJieLiuZhenJie
3月3日 关联分支 由 [] 改变为 [master]
Lliuf9成员
3月10日 issue状态由 TODO 改变为 ACCEPTED
Lliuf9成员
3月10日 issue状态由 ACCEPTED 改变为 WIP
liuf9成员
3月10日 评论:

已检视相关pipeline代码,仅输出的t_scores单独切换成CPU tensor存在segfault报错。检查导出的onnx模型后,发现pipeline中的decoder_odim与onnx模型的-1维(8667)不一致,导致申请t_scores的buffer时小于应申请大小,引起后续报错。非mslite框架问题,问题关闭。

likedislike
Lliuf9成员
3月10日 issue状态由 WIP 改变为 DONE
Lliuf9成员
3月10日 关闭了 issue