如何调试 w3wp clr.dll 错误 [英] How to debug w3wp clr.dll error

查看:24
本文介绍了如何调试 w3wp clr.dll 错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的客户在两台生产服务器上安装了一个 ASP.NET 应用程序(与 NLB 平衡,但这无关紧要).两台服务器每 3-4 小时都会崩溃一次,并显示以下事件查看器记录的错误:

My client has an ASP.NET application installed on two production servers (balanced with NLB, but that's irrelevant). Both servers crash every 3-4 hours with the following event viewer logged error:

错误的应用程序名称:w3wp.exe,版本:7.5.7601.17514,时间戳:0x4ce7afa2
错误模块名称:clr.dll,版本:4.0.30319.18034,时间戳:0x50b5a783
异常代码:0xc00000fd 故障偏移:0x000000000001a840
错误的进程 ID:0xd50
错误的应用程序启动时间:0x01ce97fe076d27b4
错误的应用程序路径:c:windowssystem32inetsrvw3wp.exe
错误模块路径:C:WindowsMicrosoft.NETFramework64v4.0.30319clr.dll 报告 ID:e0c90a5f-0455-11e3-8f0e-005056891553

Faulting application name: w3wp.exe, version: 7.5.7601.17514, time stamp: 0x4ce7afa2
Faulting module name: clr.dll, version: 4.0.30319.18034, time stamp: 0x50b5a783
Exception code: 0xc00000fd Fault offset: 0x000000000001a840
Faulting process id: 0xd50
Faulting application start time: 0x01ce97fe076d27b4
Faulting application path: c:windowssystem32inetsrvw3wp.exe
Faulting module path: C:WindowsMicrosoft.NETFramework64v4.0.30319clr.dll Report Id: e0c90a5f-0455-11e3-8f0e-005056891553

我不知道如何调试或从哪里开始.当崩溃即将发生时,服务器处理器使用率会跃升至 100% 并保持在那里.出错的进程是 w3wp.exe.我什至不确定我的代码是否产生了错误.这是 IIS 7.5.任何指针将不胜感激.

I have no idea how to debug or where to start. When the crash is about to happen the server processor usage jumps to 100% and stays there. The process at fault is w3wp.exe. I'm not even sure if my code is generating the error or not. It's IIS 7.5. Any pointers would be greatly appreciated.

推荐答案

看起来你有一个 StackOverflow 异常,这是由无限递归(一个函数重复调用自身等)引起的.这不能被常规的 try/catch 块捕获.您可以使用 DebugDiagWinDbg 跟踪问题.

It looks like you have a StackOverflow Exception, which is caused by unbounded recursion (a function repeatedly calling itself, etc). This can't be caught by regular try/catch block. You can track the problem down using DebugDiag and WinDbg.

DebugDiag 可以配置为在发生 StackOverflowException 时生成故障转储.在 https://www.microsoft.com/en- 下载us/download/details.aspx?id=58210.

DebugDiag can be configured to generate a crash dump when the StackOverflowException occurs. Download at https://www.microsoft.com/en-us/download/details.aspx?id=58210.

  1. 打开 DebugDiag 并点击添加规则.
  2. 崩溃"应该已经被选中了.点击下一步.
  3. 选择特定的 IIS Web 应用程序池";然后点击下一步.
  4. 选择应用程序池,然后单击下一步.
  5. 您应该位于高级配置"窗口.点击高级设置下的例外.
  6. 单击添加异常"并选择堆栈溢出",操作类型为完整用户转储"
  7. 单击确定"并保存并关闭.

下次发生 StackOverflowException 时,您将有一个崩溃转储.现在需要解释转储文件.

Next time a StackOverflowException occurs, you'll have a crash dump. Now to need to interpret the dump file.

Windows 调试工具是 Windows SDK 的一部分,可以从 http://msdn.microsoft.com/en-US/windows/hardware/gg463009/.

Debugging tools for Windows is part of the Windows SDK and can be downloaded at http://msdn.microsoft.com/en-US/windows/hardware/gg463009/.

  1. 要使用 WinDbg,您需要获取符号文件.下载符号文件并将它们放在本地文件夹中.莉>
  2. 打开 WinDbg.在文件菜单上,单击符号文件路径.
  3. 在符号路径框中,文档说要键入以下命令:SRV*your local folder for symbols*http://msdl.microsoft.com/download/symbols,但是我只是将符号放在本地文件夹中,效果很好.
  4. 退出并再次打开 WinDbg,然后打开 Crash Dump 并找到 DebugDiag 创建的转储文件.
  5. 在命令行中输入 .loadby sos clr
  6. 现在输入 !CLRStack
  1. To use WinDbg, you'll need to get the symbols files. Download the symbol files and put them in a local folder.
  2. Open up WinDbg. On the File menu, click Symbol File Path.
  3. In the Symbol path box, the documentation says to type the following command: SRV*your local folder for symbols*http://msdl.microsoft.com/download/symbols, however I just put in the local folder for the symbols and it worked fine.
  4. Exit out and open WinDbg again, and Open Crash Dump and locate the dump file that was created by DebugDiag.
  5. In the command line, type .loadby sos clr
  6. Now type !CLRStack

在结果中,应该清楚问题是什么(您可能会看到一堆行显示重复调用的函数).

In the results, it should be clear what the problem is (you'll likely see a BUNCH of lines showing the function(s) that was repeatedly being called).

这篇关于如何调试 w3wp clr.dll 错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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