[Bug Report] 【Bug反馈】应用商店间歇性打不开:security-loader 启动握手竞态
Tofloor
poster avatar
绍贝格尔
deepin
2026-11-27 15:54
Author

问题描述

Deepin 25(crimson)上应用商店间歇性无法启动:点击启动器图标后约 5 秒无窗口弹出,进程静默退出;重试一两次又能正常打开。同一时段失败与成功交替出现,系统负载较高时(如后台有进程扫描网络共享)更容易失败。

环境

  • Deepin 25 社区版,内核 7.3.0-amd64-desktop-rolling
  • deepin-app-store 9.1.9 / deepin-home-appstore-daemon 9.1.9
  • deepin-security-loader 1.0.3,dbus 1.16.2-2deepin1

复现

  1. 确认商店未在运行(无 deepin-home-appstore-client 进程)
  2. 点击启动器中的应用商店图标
  3. 约 5 秒后无窗口,进程退出,systemd 单元报 Failed with result 'exit-code'
  4. 立即重试:有时成功,有时继续失败(本机 15 分钟内实测:成功 3 次、失败 6 次;图标启动和终端直接运行 deepin-home-appstore-client 失败率相近)

日志

每次失败 journalctl --user 都有同样的两条告警:

deepin-app-store[2612257]:  common.go:99: failed to read pipe read |0: file already closed
deepin-app-store[2612257]:  main.go:75: get unique message form cmd timeout
systemd[2321]: app-DDE-deepin-app-store@...service: Failed with result 'exit-code'.

初步分析

  • deepin-security-loader(Go,带 cap_setgid=ep)负责拉起 /usr/libexec/deepin/deepin-home-appstore-client,客户端以 --fd1 3 --fd2 4 运行,通过管道接收加载器传来的启动消息。
  • 失败时子进程读到 failed to read pipe: file already closed(写端已提前关闭)→ 再等 5 秒 → get unique message form cmd timeout 退出。推断加载器与客户端之间的启动消息传递存在竞态,加载器偶尔过早退出。
  • 与启动方式无关(图标 / systemd 临时单元 / 终端都能复现);期间 deepin-home-appstore-daemon(系统级 root 进程)工作正常,已有实例时的单实例转发("Another instance has already been running")也正常。

期望

点击图标应稳定启动;加载器与客户端之间的启动消息不应竞态丢失。

临时规避

失败后等约 5 秒再点一次图标,重试通常能成功。

Reply Favorite View the author
All Replies
avatar
huaqi
deepin
2026-11-27 16:20
#1

这是什么操作,有些看不懂了

Reply View the author