Welcome To openEuler Community
Hey @goumenghao , thanks for your contribution to the community.
Bot Usage Manual
I'm the Bot here serving you. You can find the instructions on how to interact with me at Here . That means you can comment below every pull request or issue to trigger Bot Commands.
Contact Guide
If you have any questions, please contact the SIG: A-Tune ,
and any of the maintainers: @Vchanger, @chendh1, @hubin1305, @znzju ,


以下的要求不是强制性的, 未按模板评论时对issue无任何影响
issue处理注意事项:
1. 当前issue受影响的分支提交pr时, 须在pr描述中填写当前issue编号进行关联, 否则无法关闭当前issue;
2. 模板内容需要填写完整, 无论是受影响或者不受影响都需要填写完整内容,未引入的分支不需要填写, 否则无法关闭当前issue;
3. 以下为模板中需要填写完整的内容, 请复制到评论区回复, 注: 内容的标题名称(影响性分析说明, 缺陷严重等级, 受影响版本排查(受影响/不受影响), 修复是否涉及abi变化(是/否))不能省略,省略后defect-manager将无法正常解析填写内容.
评论区可能使用到的指令说明:
| 指令 | 指令说明 | 使用权限 |
|---|---|---|
| /check-issue | 触发defect-manager校验 | 不限 |
| /reason xxx | /reason +挂起或取消条件 | 不限 |
影响性分析说明:
缺陷严重等级:(Critical/High/Moderate/Low)
缺陷根因说明:
受影响版本排查(受影响/不受影响):
- openEuler-20.03-LTS-SP4:
- openEuler-22.03-LTS-SP3:
- openEuler-22.03-LTS-SP4:
- openEuler-24.03-LTS:
- openEuler-24.03-LTS-SP1:
- openEuler-24.03-LTS-SP2:
abi变化(是/否):
- openEuler-20.03-LTS-SP4:
- openEuler-22.03-LTS-SP3:
- openEuler-22.03-LTS-SP4:
- openEuler-24.03-LTS:
- openEuler-24.03-LTS-SP1:
- openEuler-24.03-LTS-SP2:
缺陷issue处理具体操作请参考:
https://atomgit.com/openeuler/cve-manager/blob/master/cve-vulner-manager/doc/md/defect-manager-manual.md
pr关联issue具体操作请参考:
https://docs.atomgit.com/docs/help/home/org_project/pullrequests/pr-related-issue


关键差异在 perf stat 的 stat_handle_error() 错误处理逻辑变更。
6.6 内核的行为
stat_handle_error() 有三种返回值:COUNTER_SKIP、COUNTER_RETRY、COUNTER_FATAL。
当 perf_event_open() 失败时,错误处理路径为:
- EINVAL/ENOSYS/ENOENT/ENXIO → COUNTER_SKIP(跳过该事件)
- evsel__fallback() 可以降级 → COUNTER_RETRY(重试)
- counter->skippable 为真 → COUNTER_SKIP(跳过)
- 以上都不满足 → COUNTER_FATAL(致命错误,perf stat 直接退出)
在 6.6 中,cycles 是 perf stat 的默认事件,默认事件会被标记为 skippable,所以即使 perf_event_open 失败(如在容器中无权限),也会走路径 3 → COUNTER_SKIP,perf stat 不会崩溃。
6.18 内核的行为(提交 2cc7aa995ce9)
这个提交重构了错误处理,核心变化:
- 删除了 COUNTER_FATAL——不再有"致命错误"概念
- 删除了 skippable 机制——所有事件失败都走统一逻辑
- 新增了 has_supported_counters 检查——如果所有事件都打开失败,则报 "No supported events found" 并返回 -1 退出
所以在新版 perf 中,cycles 事件在容器中打开失败后,counter->supported = false,然后走到 has_supported_counters 检查时发现没有任何事件成功,直接 err = -1; goto err_out;
所以是内核变化导致的行为发生了变更


@chendh1 未对受影响版本排查/abi变化进行分析


@chendh1 未对受影响版本排查/abi变化进行分析


构建日志:
https://eulermaker.openeuler.openatom.cn/package/build?osProject=openEuler-26.09-DevStation:everything&packageName=A-Tune
二、缺陷分析结构反馈
影响性分析说明:
缺陷严重等级:(Critical/High/Moderate/Low)
缺陷根因说明:
受影响版本排查(受影响/不受影响):
openEuler-20.03-LTS-SP4
openEuler-22.03-LTS-SP3
openEuler-22.03-LTS-SP4
openEuler-24.03-LTS
openEuler-24.03-LTS-SP1
openEuler-24.03-LTS-SP2
修复是否涉及abi变化(是/否):
openEuler-20.03-LTS-SP4
openEuler-22.03-LTS-SP3
openEuler-22.03-LTS-SP4
openEuler-24.03-LTS
openEuler-24.03-LTS-SP1
openEuler-24.03-LTS-SP2