Repository navigation
fix: WAA VM 后台刷新走 paniclog,panic 时仍关闭 done - #6
Merged
Merged
Conversation
refreshVM 的后台 goroutine 原为裸 go func(),close(refresh.done) 不在 defer 中: nextVM 或换装新 VM 时 panic 会带崩进程,等待 proof 的调用方也会挂到 ctx 超时。 改为 paniclog.Go,收尾移入 defer,panic 时写入错误、清除 refreshing(仅当仍是本次重建)、 关闭 done 后再交给 paniclog 记录。顺带把 Linux 托盘 DBus 信号监听也改走 paniclog。
…请求)加 paniclog.Recover
xiaohai1314-sys
marked this pull request as ready for review
November 11, 2026 01:45
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
修复
internal/aistudio/runtime_go.gorefreshVM 的后台 goroutine(上游 4427292 引入):go func()改为paniclog.Go,panic 不再带崩进程refresh.err,清除runtime.refreshing(仅当仍指向本次重建),关闭refresh.done,再交给 paniclog 记录堆栈;等待 proof 的调用方立即拿到错误,不用挂到 ctx 超时,下一次调用会重新发起重建defer vmMu.Unlock()先执行,外层收尾再加锁,不会死锁顺带:
internal/desktop/tray_linux.go的 DBus 信号监听也改走 paniclog(desktop 构建标签,PR 的 Checks 不编译它,desktop-linux 构建会覆盖)。