2010-09-02 77 views
0

我有一個自定義EXE崩潰的完整轉儲文件。當我回顧線程時,我看到System.IO.IOException並且打印異常給了我下面的錯誤。由於我們使用的是未安裝病毒掃描程序或索引服務的香草Windows2008(x64)服務器,因此我懷疑有某種線索競賽導致了這種情況。任何想法來調試與WinDbg賽車線程?WinDbg來調試System.IO.IOException

Exception object: 0000000000ffd230 
Exception type: System.IO.IOException 
Message: The process cannot access the file 'C:\Logs\20100901.log' because it is being used by another process. 
InnerException: <none> 
StackTrace (generated): 
    SP    IP    Function 
    00000000002DD460 000007FEF8E62F18 System.IO.__Error.WinIOError(Int32, System.String) 
    00000000002DD4C0 000007FEF8497B25 System.IO.FileStream.Init(System.String, System.IO.FileMode, System.IO.FileAccess, Int32, Boolean, System.IO.FileShare, Int32, System.IO.FileOptions, SECURITY_ATTRIBUTES, System.String, Boolean) 
    00000000002DD650 000007FEF84970AB System.IO.FileStream..ctor(System.String, System.IO.FileMode, System.IO.FileAccess, System.IO.FileShare, Int32, System.IO.FileOptions, System.String, Boolean) 
    00000000002DD6E0 000007FEF84987F3 System.IO.FileStream..ctor(System.String, System.IO.FileMode, System.IO.FileAccess, System.IO.FileShare, Int32, System.IO.FileOptions) 
    00000000002DD770 000007FEF84D198C System.IO.StreamReader..ctor(System.String, System.Text.Encoding, Boolean, Int32) 
    00000000002DD7F0 000007FEF844F8D2 System.IO.StreamReader..ctor(System.String, System.Text.Encoding, Boolean) 
    00000000002DD830 000007FF00196971 Astea.Diagnostics.AsteaLogFileListener.GetFileEncoding(System.String) 
    00000000002DD8A0 000007FF00196581 Astea.Diagnostics.AsteaLogFileListener.GetStream() 

回答

1

System.IO.FileStream..ctor調試器內部的BP,並得到使用!clrstack調用堆棧。有了這些信息,我認爲你可以找出哪些其他代碼正在創建一個獨佔訪問文件導致問題。

爲了確保同一過程持續訪問文件,我將使用procmon 來標識此文件。

HTH

0

如果可能的話,通過http://support.microsoft.com打開支持案例和大家分享微軟支持團隊的轉儲。

我懷疑你沒有捕獲正確的轉儲,或者你去了一個錯誤的例外。但誰知道沒有正確的轉儲?