博客 / 詳情

返回

Office 已知問題 GROOVEEX.DLL 帶崩進程

這是一位老師向我反饋的問題,我的一個 WPF 應用程序在他的設備上,任何彈出保存文件對話框或打開文件對話框的功能,都會導致進程閃退。經過進一步調查,我發現他電腦上任何軟件彈出文件保存對話框都會閃爍,問題本身和 WPF 無關。最終調查到是 Office 的一個注入組件導致的問題

問題現象:

任何 32 位應用程序調用 Win32 的保存文件對話框或打開文件對話框時,將會導致進程閃退

問題分析:

通過 procdump 工具,執行如下命令撈取到 DUMP 文件

procdump -ma -t 10384

更多 procdump 工具介紹和用法,請參閲 dotnet 代碼調試方法

撈取到 DUMP 文件之後,用 7z 壓縮傳輸回我的開發設備,拖入 Visual Studio 開啓混合調試模式

可見進程崩潰的原因是 “該線程嘗試讀寫某個虛擬地址,而它對該地址不具有相應的訪問權限” 導致的,如下圖所示

此時的異常堆棧如下

>	msvcp140.dll!mtx_do_lock(_Mtx_internal_imp_t * mtx=0x7c041850, const xtime * target=0x00000000) 行 103	C++
 	msvcp140.dll!_Mtx_lock(_Mtx_internal_imp_t * mtx=0x7c041850) 行 176	C++
 	GROOVEEX.DLL!7bdf3702()	未知
 	[下面的框架可能不正確和/或缺失,沒有為 GROOVEEX.DLL 加載符號]	
 	GROOVEEX.DLL!7bdfbc8e()	未知
 	GROOVEEX.DLL!7bf05eb8()	未知
 	GROOVEEX.DLL!7bf05643()	未知
 	GROOVEEX.DLL!7bf0a7bb()	未知
 	combase.dll!7656b791()	未知
 	combase.dll!76568951()	未知
 	combase.dll!765688ff()	未知
 	combase.dll!765668bc()	未知
 	combase.dll!76564b85()	未知
 	combase.dll!76572e45()	未知
 	combase.dll!765e2cf5()	未知
 	combase.dll!765e2bad()	未知
 	combase.dll!765e2b31()	未知
 	combase.dll!7657230d()	未知
 	combase.dll!76572b4d()	未知
 	combase.dll!76572314()	未知
 	combase.dll!76572e45()	未知
 	combase.dll!7659a5a2()	未知
 	combase.dll!765dc1f6()	未知

異常信息如下

0x66A25883 (msvcp140.dll) (3ea524df923b4d8483fedff3e2e4b1a3.dmp 中)處有未經處理的異常: 0xC0000005: 讀取位置 0x00000000 時發生訪問衝突。

通過模塊窗口可見 GROOVEEX.DLL 的路徑是: C:\Program Files\Microsoft Office\root\vfs\ProgramFilesX86\Microsoft Office\Office16\GROOVEEX.DLL

出現問題的 GROOVEEX.DLL 文件的版本是 16.0.19509.20000

查看簽名文件確實是微軟的簽名,預計就是軟軟寫錯了什麼代碼導致的問題

嘗試將 C:\Program Files\Microsoft Office\root\vfs\ProgramFilesX86\Microsoft Office\Office16\GROOVEEX.DLL 文件幹掉後重啓電腦,就不會出現問題了。如此也可證明確實是 Office 投毒

在網上搜到了對 grooveex.dll 文件的描述:

The grooveex.dll is an application extension for OneDrive for Business (Groove.exe).

The new OneDrive sync client (OneDrive.exe) doesn’t use this file. As you mentioned that the issue is caused by the grooveex.dll, for this situation, we suggest you exclude the groove.exe when you install Office with Office Deployment Tool. Then you can use the new OneDrive sync client instead of the groove.exe.

和:

As Rena mentioned in the former thread, the GROOVEEX.DLL file is related to the legacy OneDrive for Business sync client. Before, this sync client will be automatically installed with the Office suite from Office 365 for Business plans. If it still causes some issues on your computer, you may consider removing it with the steps mentioned in Rena's post. To learn more, see Changes to the previous OneDrive sync client (Groove.exe) in Office 2016 Click-to-Run.

可見這是一個用在 OneDrive 上的組件

類似的 GROOVEEX.DLL 導致其他進程崩潰的記錄如下:

  • Grooveex.dll crashing vMix
  • Solved: Re: After effects crashes when the Explorer window... - Page 2 - Adobe Product Community - 9154276

如此可見 GROOVEEX.DLL 導致崩潰是一直都有人反饋的

特別感謝 lsj 的協助,讓我瞭解了更本質的原因。通過錯誤堆棧 msvcp140.dll!_Mtx_lock(_Mtx_internal_imp_t * mtx=0x7c041850) 在網上搜,可見這是 https://github.com/microsoft/STL/issues/4730 問題導致的。我的應用程序是自己帶 VC 運行時的,我自己帶的 VC 運行時比較舊,而 GROOVEEX.DLL 依賴新的 VC 運行時,此行為觸發了此 VC 運行時問題

這就意味着應用程序如果加載了自己帶的舊版本的 VC 運行時,那麼彈出文件對話框時,加載了 GROOVEEX.DLL 組件,將會由於 VC 版本兼容性問題導致進程崩潰

參考文檔:

  • GROOVEEX.DLL file is back in the folder - Microsoft Q&A

  • What does grooveex.dll do exactly? - Microsoft Q&A

  • VCRuntime incompatibility with older version in mutex code · Issue #4730 · microsoft/STL

  • Crash on specific builds, when OAL is compiled using VS 2022 with Multithread DLL · Issue #1035 · kcat/openal-soft

  • windows - First std::mutex::lock() crashes in application built with latest Visual Studio 2022 - Stack Overflow

user avatar
0 位用戶收藏了這個故事!

發佈 評論

Some HTML is okay.