已合并
fix: prevent atrace dir aging race #2658
fix: prevent atrace dir aging race #2658
已合并
GuoWenbo创建于 6月6日
GuoWenbo成员
6月6日

修复 atrace 目录老化导致 open ENOENT 刷屏的问题。

变更:

  • 已存在目录复用,不重复加入老化链表,保持按目录时间戳顺序老化。
  • TraceRecorderGetFd 持有管理锁直到 TraceOpen 完成,避免目录创建后 open 前被并发老化删除。
  • 补充重复目录、并发老化、时间戳顺序老化等 UT。

验证:

  • cmake --build build --target utrace_utest -j1
  • TraceRecorderUtest.* 20 tests passed
  • TraceClientUtest.TraceClient_GetFdFailed passed
  • git diff --check passed
likedislike
Pull Request已成功合入, 合并人@CANN-robot
(感谢 GuoWenbo 的贡献)
GGuoWenbo成员
6月6日 创建了 pull request,commit 8bdcc03e
CANN-robotCANN-robot成员
6月6日 添加了label:cann-cla/yes
CANN-robot
CANN-robot成员
6月6日 评论:

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
src/dfx zhuliangying, newstarzj (2/2) zhuliangying (1/1)
tests/ut/atrace zhuliangying, newstarzj (2/2) zhuliangying (1/1)

💡 Tip:

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

CLA Signature Pass

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

likedislike
GuoWenbo成员
6月6日 评论:

/compile

likedislike
GGuoWenbo成员
6月6日 update merge request[project id: 8810053, iid: 2658, commit_id: c3ad07cbc759a7b2eac12016c3f901fcd68cb7d5] virtual merging success
CANN-robotCANN-robot成员
6月6日 添加了label:ci-pipeline-running
CANN-robot
CANN-robot成员
6月6日 评论:

流水线任务触发成功
任务链接 [9f90783808244b53b11737f9b5f69a0d][流水线指导]

任务名称状态日志下载链接
Compile_Ascend_X86 ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_ARM ✅ SUCCESS >>>>> >>>>>
pre_comment ✅ SUCCESS >>>>>
Compile_Ascend_X86_ubuntu24 ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_ARM_ubuntu24 ✅ SUCCESS >>>>> >>>>>
UT_Test_acl ✅ SUCCESS >>>>>
UT_Test_rts_v201 ✅ SUCCESS >>>>>
UT_Test_rts_c ✅ SUCCESS >>>>>
UT_Test_rts_david ✅ SUCCESS >>>>>
UT_Test_rts_910b ✅ SUCCESS >>>>>
UT_Test_rts_common ✅ SUCCESS >>>>>
UT_Test_platform ✅ SUCCESS >>>>>
UT_Test_qs ✅ SUCCESS >>>>>
UT_Test_aicpusd ✅ SUCCESS >>>>>
UT_Test_tsd ✅ SUCCESS >>>>>
UT_Test_error_manager ✅ SUCCESS >>>>>
UT_Test_slog ✅ SUCCESS >>>>>
UT_Test_atrace ✅ SUCCESS >>>>>
UT_Test_msprof ✅ SUCCESS >>>>>
UT_Test_adump ✅ SUCCESS >>>>>
UT_Test_mmpa ✅ SUCCESS >>>>>
UT_Test_camodel_check ✅ SUCCESS
API_Check ✅ SUCCESS >>>>>
PreSmoke_A900_npupool ✅ SUCCESS >>>>>
UT_Test_rts_report ✅ SUCCESS >>>>>

[2026-06-06 14:52:06]    CI执行结束

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

流水线任务触发成功
任务链接 [f2f4dbebeaa048da86d1f4a1eedaf2ad][流水线指导]

任务名称状态日志下载链接
codecheck ✅ SUCCESS >>>>>
SCA ✅ SUCCESS >>>>>
antipoison ✅ SUCCESS >>>>>
codecheck_Check_Pr ✅ SUCCESS
codecheck_style ✅ SUCCESS >>>>>
codecheck_precommit ⚠️ WARNING >>>>> >>>>>

[2026-06-06 14:43:02]    CI执行结束

likedislike
CANN-robotCANN-robot成员
6月6日 添加了label:api-check-pass
CANN-robotCANN-robot成员
6月6日 删除了label:ci-pipeline-running
CANN-robotCANN-robot成员
6月6日 添加了label:ci-pipeline-passed
zhuliangying成员
6月9日 评论:

/approve

likedislike
CANN-robotCANN-robot成员
6月9日 添加了label:approved
zhangjie
zhangjie成员
6月9日 评论:

/lgtm

likedislike
CANN-robotCANN-robot成员
6月9日 添加了label:lgtm
CANN-robotCANN-robot成员
6月9日 删除了label:ci-pipeline-passed
CANN-robot
CANN-robot成员
6月9日 评论:

The following label is not ready.

ci-pipeline-passed: The ci-pipeline-passed label is expired. Please compile again.

likedislike
GuoWenbo成员
6月9日 评论:

/compile

likedislike
GGuoWenbo成员
6月9日 update merge request[project id: 8810053, iid: 2658, commit_id: 5bfc9294c5fee1ca2bae628bb6d3d04fdf32c879] virtual merging success
CANN-robotCANN-robot成员
6月9日 删除了label:api-check-pass
CANN-robotCANN-robot成员
6月9日 添加了label:ci-pipeline-running
CANN-robot
CANN-robot成员
6月9日 评论:

流水线任务触发成功
任务链接 [b613ee338e534d0e9adea21a0b4c22fd][流水线指导]

任务名称状态日志下载链接
Compile_Ascend_X86 ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_ARM ✅ SUCCESS >>>>> >>>>>
pre_comment ✅ SUCCESS >>>>>
Compile_Ascend_X86_ubuntu24 ✅ SUCCESS >>>>> >>>>>
Compile_Ascend_ARM_ubuntu24 ✅ SUCCESS >>>>> >>>>>
UT_Test_acl ✅ SUCCESS >>>>>
UT_Test_rts_v201 ✅ SUCCESS >>>>>
UT_Test_rts_c ✅ SUCCESS >>>>>
UT_Test_rts_david ✅ SUCCESS >>>>>
UT_Test_rts_910b ✅ SUCCESS >>>>>
UT_Test_rts_common ✅ SUCCESS >>>>>
UT_Test_platform ✅ SUCCESS >>>>>
UT_Test_qs ✅ SUCCESS >>>>>
UT_Test_aicpusd ✅ SUCCESS >>>>>
UT_Test_tsd ✅ SUCCESS >>>>>
UT_Test_error_manager ✅ SUCCESS >>>>>
UT_Test_slog ✅ SUCCESS >>>>>
UT_Test_atrace ✅ SUCCESS >>>>>
UT_Test_msprof ✅ SUCCESS >>>>>
UT_Test_adump ✅ SUCCESS >>>>>
UT_Test_mmpa ✅ SUCCESS >>>>>
UT_Test_camodel_check ✅ SUCCESS
API_Check ✅ SUCCESS >>>>>
PreSmoke_A900_npupool ✅ SUCCESS >>>>>
UT_Test_rts_report ✅ SUCCESS >>>>>

[2026-06-09 19:34:34]    CI执行结束

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

流水线任务触发成功
任务链接 [03743d64dd36439d82bdb2ea4e8ca421][流水线指导]

任务名称状态日志下载链接
codecheck ✅ SUCCESS >>>>>
SCA ✅ SUCCESS >>>>>
antipoison ✅ SUCCESS >>>>>
codecheck_Check_Pr ✅ SUCCESS
codecheck_style ✅ SUCCESS >>>>>
codecheck_precommit ⚠️ WARNING >>>>> >>>>>

[2026-06-09 19:23:13]    CI执行结束

likedislike
CANN-robotCANN-robot成员
6月9日 添加了label:api-check-pass
CANN-robotCANN-robot成员
6月9日 删除了label:ci-pipeline-running
CANN-robotCANN-robot成员
6月9日 添加了label:ci-pipeline-passed
CANN-robotCANN-robot成员
6月9日 合入了pull request