System.UnauthorizedAccessException的中的Mscorwks.dll导致应用程序池崩溃 [英] System.UnauthorizedAccessException in mscorwks.dll causing app pool crashes
问题描述
我的应用程序池保持IIS随机崩溃6.0 MS调试诊断分KERNEL32.DLL每一次。
My app pools keep randomly crashing in IIS 6.0 MS Debug Diag points to kernel32.dll every time.
该入口点是总是mscorwks!CreateApplicationContext + BBEF,结果始终是一个System.UnauthorizedAccessException的
The entry point is always mscorwks!CreateApplicationContext+bbef and the result is always a System.UnauthorizedAccessException.
堆栈跟踪:
Function Arg 1 Arg 2 Arg 3
kernel32!RaiseException+3c e0434f4d 00000001 00000001
mscorwks!GetMetaDataInternalInterface+84a9 18316b3c 00000000 00000000
mscorwks!GetAddrOfContractShutoffFlag+ac01 18316b3c 00000000 023cfbd8
mscorwks!GetAddrOfContractShutoffFlag+ac73 00000000 000e8c88 8038b2d0
mscorwks!GetAddrOfContractShutoffFlag+aca4 18316b3c 00000000 023cfbe4
mscorwks!GetAddrOfContractShutoffFlag+acb2 18316b3c acc05c33 7a399bf0
mscorwks!CoUninitializeCor+67be 00000000 023cfc1c 023cfc8c
mscorwks!CoUninitializeCor+87a1 001056e8 79fd87f6 023cfeb0
mscorwks!CorExitProcess+4ad3 023cfeb0 023cfd20 79f40574
mscorwks!CorExitProcess+4abf 001056e8 79f405a6 023cfd04
mscorwks!CorExitProcess+4b3e 000e8c88 00000000 023cfda7
mscorwks!StrongNameErrorInfo+1ddab 00000000 00000000 023cfeb0
mscorwks!StrongNameErrorInfo+1e07c 023cfeb0 00000000 00000000
mscorwks!CoUninitializeEE+4e0b 023cfeb0 023cfe5c 79f7762b
mscorwks!CoUninitializeEE+4da7 023cfeb0 acc05973 00000000
mscorwks!CoUninitializeEE+4ccd 023cfeb0 00000000 001056e8
mscorwks!GetPrivateContextsPerfCounters+f1cd 79fc24f9 00000008 023cff14
mscorwks!GetPrivateContextsPerfCounters+f1de 79fc24f9 acc058c3 00000000
mscorwks!CorExeMain+1374 00000000 00000003 00000002
mscorwks!CreateApplicationContext+bc35 000e9458 00000000 00000000
kernel32!GetModuleHandleA+df 79f9205f 000e9458 00000000
有谁知道这意味着什么,以及如何解决它?
Does anybody know what this means and how to fix it?
编辑:上面的堆栈跟踪的竟然是一种症状,而不是原因。上面的堆栈跟踪仅显示了非托管堆栈但问题发生在管理code。我用我的回答如下步骤挖掘到崩溃转储并提取管理例外。
The above stack trace turned out to be a symptom and not the cause. The above stack trace only shows the unmanaged stack but the problem happened in managed code. I used the steps in my answer below to dig into the crash dump and extract the managed exception.
推荐答案
提及的Mscorwks.dll是问题的唯一症状。的Mscorwks.dll是包含公共语言运行库的DLL。
The reference to mscorwks.dll was only a symptom of the problem. mscorwks.dll is the dll that contains the common language runtime.
要诊断问题的根本原因,我也跟着下面的步骤:
To diagnose the root cause of the problem, I followed the following steps:
- 使用<一个href="http://www.microsoft.com/DOWNLOADS/details.aspx?FamilyID=28bd5941-c458-46f1-b24d-f60151d875a3&displaylang=en"相对=nofollow> DebugDiag资料捕获崩溃转储当IIS回收应用程序池。
- 在的WinDbg 打开崩溃转储。
- 键入.loadby索斯mscorwks(不含引号)在WinDbg的命令行来加载CLR调试工具
- 使用!PrintException命令打印出记录在崩溃转储的最后一个异常。这是最有可能导致一个IIS应用程序池回收
- 使用!clrstack命令来查看抛出异常的当前线程的堆栈
- 更多命令WinDbg的引用可以发现这里和这里。最后,这个MSDN博客对使用WinDbg的伟大的教程。
- Use DebugDiag to capture a crash dump when IIS recycled the app pool.
- Open the crash dump in windbg.
- Type ".loadby sos mscorwks" (no quotes) at the windbg command line to load the CLR debug tools
- Use the !PrintException command to print out the last exception recorded in the crash dump. This is most likely the one that caused the IIS app pool recycle
- Use the !clrstack command to view the stack on the current thread that threw the exception
- More command references for windbg can be found here and here. Lastly, this MSDN blog has great tutorials on using windbg.
祝您debuging冒险!
Good luck on your debuging adventure!
这篇关于System.UnauthorizedAccessException的中的Mscorwks.dll导致应用程序池崩溃的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!