已合并
fix:修复dump文件未完整落盘 #3266
yring_8创建于 6月30日
fix:修复dump文件未完整落盘 #3266
已合并
yring_8创建于 6月30日
已删除 :9.1.0合入到cann/runtime9.1.0
yring_8成员
6月30日

Pull Request

描述

修复 adump 记录模块在进程退出时的数据丢失问题。
核心方案:
1)改进 AdxDumpRecord 的关闭流程:在 UnInit 中通过加锁、设置停止标志、唤醒消费者线程并 join 等待,确保队列中的残留 dump 数据在退出前全部落盘。
2)引入 pthread_atfork 相关的 PrepareFork / PostForkParent / PostForkChild 回调,解决 fork 子进程中继承的队列和线程状态不一致导致的死锁/挂死风险。
3)Host 侧的 AdxDataDumpServerUnInit 改为"先停生产者、再排空消费者"的顺序,并保证即使 Server 退出失败也能回收 record 线程。

变更类型

请选择本次引入的变更类型:

关联的Issue

#653

如何测试

描述测试此变更的步骤和前提条件:

  1. 执行bash tests/build_ut.sh --ut=adump -c命令,dump的UT测试用例通过。
  2. 开启datadump,能够正常落盘数据。

核对清单

其他信息

在此添加任何其他关于本次 PR 的说明。

likedislike
Pull Request已成功合入, 合并人@CANN-robot
(感谢 yring_8 的贡献)
Yyring_8成员
6月30日 添加了label:enhancement
Yyring_8成员
6月30日 创建了 pull request,commit 2064b371
CANN-robotCANN-robot成员
6月30日 添加了label:cann-cla/yes
CANN-robot
CANN-robot成员
6月30日 评论:

Thanks for your pull-request.
The full list of commands accepted by me can be found at here
You can get sig-info at here


PR Approval Progress

Congratulations! All modules have met the lgtm and approve requirements.

Module Approval Details

module lgtm status approve status
** gcw_kUomxQ2l, 王涛 (2/2) gcw_kUomxQ2l (1/1)

💡 Tip:

  • Committer can comment /approve or /lgtm
  • Commenting /approve implies both code review (lgtm) and intent to merge (approve)

CLA Signature Pass

yring_8, thanks for your pull request. All authors of the commits have signed the CLA. 👍

likedislike
yring_8成员
6月30日 评论:

compile

likedislike
此处折叠了50条消息 查看更多
wangtao成员
7月6日 评论:

/lgtm

likedislike
CANN-robot
CANN-robot成员
7月6日 评论:

The following users do not have permission to comment /lgtm or /approve on any module in this PR:
newstarzj, zhuliangying

likedislike
CANN-robotCANN-robot成员
7月6日 添加了label:lgtm
CANN-robotCANN-robot成员
7月6日 解决了最后一个问题
CANN-robotCANN-robot成员
7月6日 合入了pull request