Repository navigation
Conversation
Member
|
修复相关移至net6分支pr |
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.
问题说明
安装版 hang dump 捕获到两条会阻塞 WPF UI 的全局 finalizer 等待路径:
ProcessProtectionManager.WithWriteAccess中强制完整 GC 并同步等待所有 finalizer。日志、配置等普通文件写入会因此等待与目标文件无关的终结器;dump 中 finalizer 曾停在 WPF UI Automation 的RawUiaNodeRelease。GC.GetTotalMemory(forceFullCollection: true)会触发完整回收并等待 finalizer。2026-10-21 的 dump 中,UI 线程正停在AutomaticDumpTimer_Tick -> DumpToFile -> BuildReport -> AppendGcSection -> GC.GetTotalMemory(true),finalizer 同时停在 UI Automation 节点释放。修改内容
WithWriteAccess的正常路径及门闩超时降级路径移除强制完整 GC 和同步 finalizer 等待;保留显式句柄释放、写入、门闩和保护锁恢复逻辑。验证情况
D:\ICC-HangDumps\install-backups\20261021_091056。范围说明
自动收纳检查中的 UI Automation 查询及其同步 Dispatcher 等待仍是独立风险,本 PR 未改变其业务行为。