Skip to content

[Bug] AstrBot 在关机收尾时调用了系统 taskkill.exe,但调用时机太晚。导致 taskkill.exe 初始化失败 0xc0000142。 #8672

@Luck2058

Description

@Luck2058

What happened / 发生了什么

详情请看Codex(gpt5.5)给的说明:

对,就是这个。这里终于抓到真正父进程了。

关键记录是这一条:

TimeCreated : 2026/6/8 12:19:27
新进程名称: C:\Windows\System32\taskkill.exe
创建者进程名称: D:\AstrBot\astrbot-desktop-tauri.exe
进程命令行: "taskkill" /pid 15488 /t
结论:这次 taskkill.exe 0xc0000142 是 AstrBot 调起来的,不是 QQ、WPS、微信,也不是 taskkill 本身坏了。

你文件里还有很多 16:03、16:04、16:12 的 taskkill,父进程是:

D:\WindowsApps\OpenAI.Codex_...\codex.exe
这些是我这边运行工具时产生的,不是你开机报错的元凶,可以忽略。

现在建议先做验证,不删除:

打开启动文件夹:
shell:startup
或者直接到:

C:\Users\Lenovo\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup
暂时把这个快捷方式移出启动文件夹,或右键禁用:
AstrBot.lnk
重启/关机测试一次。
如果禁用 AstrBot 自启动后 taskkill.exe 0xc0000142 不再出现,元凶就坐实是:

D:\AstrBot\astrbot-desktop-tauri.exe
更准确地说,是 AstrBot 在退出/清理子进程时执行了:

taskkill /pid 15488 /t
但系统已经进入关机流程,导致 taskkill.exe 初始化失败 0xc0000142。

下一步处理方向:更新 AstrBot,或者保留 AstrBot 但取消开机自启动,手动启动使用。

Reproduce / 如何复现?

是的,按这次证据看,基本就是这个链路:

AstrBot 正在后台运行
你关机/重启
AstrBot 收到退出/清理流程
AstrBot 调用 taskkill 去结束某个子进程:
"taskkill" /pid 15488 /t
此时 Windows 已经进入关机阶段
taskkill.exe 初始化失败
弹出 0xc0000142
所以不是 taskkill.exe 本身坏,也不是病毒伪装。它是 AstrBot 在关机收尾时调用了系统 taskkill.exe,但调用时机太晚。

处理建议:

优先:关机前手动退出 AstrBot
验证:取消 AstrBot 开机自启动,观察是否还弹
长期:更新 AstrBot,或向 AstrBot 反馈“关机阶段调用 taskkill 导致 0xc0000142”
QQ.exe 仍然有单独崩溃问题,但这次 taskkill 的直接父进程已经抓到是 D:\AstrBot\astrbot-desktop-tauri.exe。

AstrBot version, deployment method (e.g., Windows Docker Desktop deployment), provider used, and messaging platform used. / AstrBot 版本、部署方式(如 Windows Docker Desktop 部署)、使用的提供商、使用的消息平台适配器

当前版本: 4.23.6 Windows部署

OS

Windows

Logs / 报错日志

TimeCreated : 2026/6/8 12:19:27
新进程名称: C:\Windows\System32\taskkill.exe
创建者进程名称: D:\AstrBot\astrbot-desktop-tauri.exe
进程命令行: "taskkill" /pid 15488 /t

Are you willing to submit a PR? / 你愿意提交 PR 吗?

  • Yes!

Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:coreThe bug / feature is about astrbot's core, backendbugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions