nsi卸载进程卡住:
自卸载 调用的函数:MoveFileEx (PendingFileRenameOperations MOVEFILE_DELAY_UNTIL_REBOOT 开机延迟删除 )
使用Process Explorer查看进程:
卡住的两个线程。
查看线程栈:
SeAccessCheckWithHint+0xb4a 卡住。
https://communities.vmware.com/thread/266408
查看 SeAccessCheckWithHint+0xb4a 以后有时间 再具体分析(应该跟 主机环境有关)
最后的结论是:0会话 启动gui进程 导致卡死
写了一个demo 进行排查 记录:
使用服务启动 gui进程 messageBox.exe
安装服务
服务启动配置:(启动MessageBox.exe 进程)
MessageBox.exe 正常启动:
启动服务 (根据配置启动MessageBox.exe):
用procexp查看 卡死线程
使用windbg 附加到 messageBox.exe(F6 )
查看线程(~)
查看线程0栈(~ 0 kv)
切换到线程0(~ 0 s)
查看线程0栈(kv)
查看MessageBoxIndirect( const MSGBOXPARAMS *lpmbp )
查看MSGBOXPARAMS ( dd 0020f9b8 (上图 MessageBoxIndirectW 的参数) )
查看 szText (du 013b2150)
查看szCaption (du 013b2180)
与上图的messageBox的内容一致 说明 MessageBoxIndirect 卡住了
ok
测试程序下载url:https://download.csdn.net/download/huanongying131/11228827