System.UnauthorizedAccessException在mscorwks.dll导致应用程序池崩溃 [英] System.UnauthorizedAccessException in mscorwks.dll causing app pool crashes

查看:609
本文介绍了System.UnauthorizedAccessException在mscorwks.dll导致应用程序池崩溃的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的应用程序池保持随机崩溃在IIS 6.0 MS Debug Diag指向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?

编辑:上述堆栈跟踪证明是一个症状,而不是原因。上述堆栈跟踪仅显示非托管堆栈,但托管代码中发生问题。我使用下面的答案中的步骤挖掘崩溃转储并解压缩托管异常。

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:


  1. 使用的 DebugDiag 在IIS回收应用程序池时捕获故障转储。

  2. windbg
  3. 在windbg命令行输入.loadby sos mscorwks(无引号)加载CLR调试工具

  4. 使用!PrintException命令打印出在崩溃转储中记录的最后一个异常。这很可能是导致IIS应用程序池回收的邮件

  5. 使用!clrstack命令查看当前线程上抛出异常的堆栈

  6. 更多关于windbg的命令参考可以在此处此处。最后,此MSDN博客提供了有关使用windbg的精彩教程。

  1. Use DebugDiag to capture a crash dump when IIS recycled the app pool.
  2. Open the crash dump in windbg.
  3. Type ".loadby sos mscorwks" (no quotes) at the windbg command line to load the CLR debug tools
  4. 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
  5. Use the !clrstack command to view the stack on the current thread that threw the exception
  6. More command references for windbg can be found here and here. Lastly, this MSDN blog has great tutorials on using windbg.

祝您在调试冒险中幸运!

Good luck on your debuging adventure!

这篇关于System.UnauthorizedAccessException在mscorwks.dll导致应用程序池崩溃的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆