Repository navigation
Replies: 1 comment 1 reply
|
+1 |
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Summary
DSH Desktop
0.2.0-rc.2通过应用内更新升级到 nightly0.2.1-rc.2(win-x64)时,静默安装器在「把旧安装目录改名为.old-{GUID}备份」这一步连续失败:MoveFileExW返回 Windows 错误 5(拒绝访问),10 次重试后回滚,安装器以退出码 2 结束。旧版本目录保持完好,但更新无法完成。2026-10-17 19:03–19:15 之间共 4 次完整安装器运行,全部以同一路径失败,每次都写出内容一致(除 GUID/时间外)的
directory-failure-*.log。失败报告只有
Windows error: 5与Attempts: backup: Windows error: 5×10,无法得知是哪个进程/文件造成占用。原因:安装器的应用检测只覆盖$INSTDIR\DeepSeek Harness.exe(InstallerFindProcess,完整镜像路径匹配 + 最多 10s 等待),任何其他进程(安装目录自带的 Python / Node / LibreOffice helper,或外部索引、预览、扫描程序)都不会被检测或等待。English summary: silent update from 0.2.0-rc.2 to 0.2.1-rc.2 fails while renaming the install directory to
.old-{GUID};MoveFileExWreturns ERROR_ACCESS_DENIED (5) for all 10 retries (~11.25 s total). The installer only waits forDeepSeek Harness.exe, so any other process holding an open file inside the install directory makes the update fail without identifying the locker. The old installation stays intact.与已有报告的关系
<install>.new-{GUID}后无法换入安装目录,当时没有任何错误可见。本报告是 0.2.1-rc.2 新引入目录替换重试/报告机制之后的同类失败:这次能拿到directory-failure-*.log(MoveFileExW5 ×10、约 11.25 s),但仍无法定位占用进程,且 4/4 稳定复现。Host did not complete graceful task teardown):本机这次交接通过了(安装器确实启动并进入 backup),因此不是同一个失败点;但 Windows desktop: GUI update always fails — Host never exits (koffi keeps the event loop alive) #9963 描述的「正常退出后进程树还会存活约 10–15 s」可能正是 swap 期间仍有句柄的诱因之一,建议两处一起看。DeepSeek Harness.exe后同一个安装器 24 s 成功)与本机观察一致:只要目录内文件句柄释放,替换就能成功。Reproduction
环境准备:
安装 DSH Desktop
0.2.0-rc.2到%LOCALAPPDATA%\Programs\DeepSeek Harness,完全退出应用。用另一个进程打开安装目录内任意一个文件并保持句柄(模拟被占用的目录),例如:
以静默更新模式运行
0.2.1-rc.2安装器(缓存里的installer.exe或pending\deepseek-harness-0.2.1-rc.2-win-x64.exe):预期观察:约 11.25 秒重试后安装器退出码为 2,
%LOCALAPPDATA%\@deepseek-aidsh-desktop-updater\installer-logs\生成directory-failure-*.log,内容与下方一致(backup: Windows error: 5×10,Restoration error: 0)。实际观察(本机未手工造占用,4/4 稳定失败):
%LOCALAPPDATA%\@deepseek-aidsh-desktop-updater\installer-logs\有 4 份失败日志:directory-failure-20261017-190309.log、-190756.log、-191410.log、-191514.log。%TEMP%中有对应的 NSIS 插件目录:nsf9A2A.tmp(19:02:27 创建)、nsrFD64.tmp(19:07:15)、nsn7432.tmp(19:13:13)、nslA0E0.tmp(19:13:24)、nss97B3.tmp(19:14:28)。customCheckAppRunning拦下」的情况;其余 4 次进入目录替换并在 backup 阶段失败。Current behavior
4 份失败日志(仅
DestinationGUID 与Time不同):directory-failure-20261017-190309.log
directory-failure-20261017-190756.log
directory-failure-20261017-191410.log
directory-failure-20261017-191514.log
0.2.0-rc.2),无.old-*/.new-*残留;失败属于回滚后的安全状态。Restoration error: 0= 备份尚未发生,无需恢复(不是恢复失败)。pending\deepseek-harness-0.2.1-rc.2-win-x64.exe与installer.exe仍在缓存中,可重试。本机旁证(用于排除权限与杀软)
DESKTOP-7MN9FS1\RTXwcz,FullControl;目录属性非只读。MoveFileExW对目录改名):与源码的对应关系
apps/desktop/scripts/installer-directories.nsh(dshDirectoryOperation):MoveFileExW仅对错误 5/32/33 重试,最多 10 次,Sleep为 250/500/…/2250 ms(合计约 11.25 s),失败后写directory-operations.log并回滚。apps/desktop/scripts/installer.nsh(customCheckAppRunning):InstallerFindProcess(w "$INSTDIR\${APP_EXECUTABLE_FILENAME}");静默更新(--updated)最多等 10 s,仍在运行则提示并以退出码 2 结束。apps/desktop/installer/window-frame.cpp中的InstallerFindProcess只返回「同名主 exe 且完整镜像路径等于$INSTDIR\DeepSeek Harness.exe」的进程。apps/desktop/README.md也写明:静默更新最多等受影响应用 10 s;并且「Windows may refuse replacement while an interpreter is still running」。因此当前实现存在一个盲区:除主 exe 外的任何进程(典型如安装目录自带的 Python / Node / LibreOffice helper,或外部索引、预览、同步、扫描程序)只要在安装目录内打开文件,就会让更新在 backup 阶段稳定失败,且报告无法定位占用者。
Expected behavior
至少满足其一:
dshDirectoryOperation最终失败时,通过 Restart Manager(RmStartSession/RmRegisterResources)或句柄枚举,列出「安装目录内被打开的文件 + 持有进程」,写入directory-operations.log与最终报告;非静默 UI 直接提示「请关闭 X 后重试」。DeepSeek Harness.exe):可以复用现有 Toolhelp 枚举,把QueryFullProcessImageNameW结果落在$INSTDIR前缀下的进程都纳入等待/提示。Environment
10.0.29671(x64;失败期间未重启)0.2.0-rc.2(安装于 2026-09-29),更新目标0.2.1-rc.2(nightly / win-x64;安装器构建时间 2026-10-17 17:21)version文件为44.0.0app-update.yml→provider: generic,channel: nightlyC:\Users\RTXwcz\AppData\Local\Programs\DeepSeek Harness(默认 per-user)%LOCALAPPDATA%\@deepseek-aidsh-desktop-updater临时规避(供其他用户参考)
完全退出 DSH(含托盘)或重启后再手动运行已下载的安装器;若仍失败,用 Process Explorer → Find Handle 搜安装目录路径,结束占用进程后重试。
All reactions