2010-09-02 76 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打开支持案例和大家分享微软支持团队的转储。

我怀疑你没有捕获正确的转储,或者你去了一个错误的例外。但谁知道没有正确的转储?