已开启
x86_64_virt 模拟器镜像安装任意 hap 均失败(9568393):installd 进程上下文中 statx(STATX_ALL) 返回 EINVAL #328
guozejun创建于 4 天前
openharmony_ci
4 天前 评论:
4 天前 评论:
感谢提交Issue!关于Issue的交互操作,请访问OpenHarmony社区支持命令清单。如果有问题,请联系 [@JerryH1011](https://gitcode.com/JerryH1011) [@hehehe-li](https://gitcode.com/hehehe-li) [@ren_ze_hua](https://gitcode.com/ren_ze_hua) 。如果需要调整订阅PR、Issue的变更状态,请访问链接。
Thanks for submitting the issue. For more commands, please visit OpenHarmony Command List. If you have any questions, please refer to committer gitcode for help. If you need to change the subscription of a Pull Request or Issue, please visit the link.


4 天前 添加了label:waiting_for_assign
guozejun
4 天前 评论:
4 天前 评论:
勘误:对照组内核版本
前文两处「rk3568 …内核 5.10」有误,实测 uname -a:
- x86_64_virt 模拟器:
Linux 6.6.101-gc0c10d57367a-dirty #1 SMP PREEMPT_DYNAMIC x86_64(2026-11-13 构建,带未提交补丁的 dirty 构建) - rk3568(对照,安装成功):
Linux 6.6.101 #1 SMP aarch64(2026-11-11 构建)
即两边同为 6.6.101,差异在 arch 与内核 config(x86_64_virt 为 qemu 目标 + -dirty kcl 补丁构建),而非内核版本差异——排查方向建议对比两份 6.6 内核 config 中 fs-verity/xpm 相关项及 virt 构建所带补丁。


4 天前 修改了issue 的描述
3 天前 关联了pull request:Degrade fs-verity enforcement when capability probe fails or is unsupported
3 天前 关联了pull request:Degrade fs-verity enforcement when capability probe fails or is unsupported
问题描述
x86_64_virt 日构建模拟器镜像上,安装任何签名合法的 hap 均失败:
error: failed to install bundle. code:9568393 error: verify code signature failed。根因落在 code_sign 的
IsSupportFsVerity:installd 进程中裸syscall(__NR_statx, AT_FDCWD, path, 0, STATX_ALL, buf)返回 EINVAL(errno=22),被判为CS_ERR_FILE_INVALID(-256)后安装中止。同一 syscall、同一参数、同一文件,从 shell 进程执行完全正常——EINVAL 仅出现在 installd 进程上下文。环境信息
内核
uname -a:Linux localhost 6.6.101-gc0c10d57367a-dirty #1 SMP PREEMPT_DYNAMIC Fri Nov 13 04:19:00 CST 2026 x86_64(带未提交补丁的 dirty 构建)内核
uname -a:Linux localhost 6.6.101 #1 SMP Wed Nov 11 01:16:07 CST 2026 aarch64-dirty补丁,而非内核版本复现步骤
hdc install xxx-signed.hap现象/日志
Debug 级 hilog 显示 hap 内代码签名块解析正常(block_size:4096 / sig 2147B / Merkle root_hash 齐全),失败点在:
排查证据(已排除项)
/dev/block/vdf ext4。EnableCodeSignForFile: Enforcing file complete, ret = 0,安装成功。期望结果
x86_64_virt 模拟器镜像可以正常安装签名合法的 hap(installd 上下文 statx 不应返回 EINVAL,或对不支持 fs-verity 的环境有可用的降级/宽容路径)。
排查方向建议
对比 rk3568(aarch64)与 x86_64_virt 两份 6.6.101 内核构建:config 中 fs-verity / XPM 相关项(
CONFIG_FS_VERITY、CONFIG_OHOS_*),以及 virt 构建-gc0c10d57367a-dirty所携带的未提交补丁内容。