获取IIS工作进程崩溃转储 [英] Getting IIS Worker Process Crash dumps
问题描述
我把问题缩小到了我的HTTP爬虫,这是一个多线程的野兽,在被要求时抓取网站进行有用的信息。在我开始抓取并重新部署应用程序的顶部,而不是正常卸载appDomain并重新加载,IIS工作进程将崩溃(弹出崩溃消息)并继续重新加载应用程序域。
当这个崩溃发生时,在哪里可以找到崩溃转储进行分析?
下载调试工具对于Windows:
http://www.microsoft.com/whdc/ DevTools / Debugging / default.mspx
适用于Windows的调试工具有一个脚本(ADPLUS),允许您在进程CRASHES时创建转储:
http://support.microsoft.com/kb/286350
命令应该是(如果你使用IIS6):
cscript adplus。 vbs -crash -pn w3wp.exe
此命令将将调试器附加到工作进程。当崩溃发生时,它将生成一个转储(* .DMP文件)。
您可以在WinDBG(也包括在Windows的调试工具中)中打开它。文件>打开崩溃转储...
默认情况下,WinDBG将显示您(在命令行旁边)该进程崩溃。
您需要在WinDBG中执行的第一件事是加载.NET Framework扩展:
.loadby sos mscorwks
然后,您将显示被管理的callstack:
!clrstack
如果线程没有运行托管代码,那么您需要检查本机堆栈:
kpn 200
这应该给你一些想法。要继续排除故障,建议您阅读以下文章:
http://msdn.microsoft.com/en-us/library/ee817663.aspx
I'm doing something bad in my ASP.NET app. It could be the any number of CTP libraries I'm using or I'm just not disposing something properly. But when I redeploy my ASP.NET to my Vista IIS7 install or my server's IIS6 install I crash an IIS worker process.
I've narrowed the problem down to my HTTP crawler, which is a multithreaded beast that crawls sites for useful information when asked to. After I start a crawler and redeploy the app over the top, rather than gracefully unloading the appDomain and reloading, an IIS worker process will crash (popping up a crash message) and continue reloading the app domain.
When this crash happens, where can I find the crash dump for analysis?
Download Debugging tools for Windows: http://www.microsoft.com/whdc/DevTools/Debugging/default.mspx
Debugging Tools for Windows has has a script (ADPLUS) that allows you to create dumps when a process CRASHES: http://support.microsoft.com/kb/286350
The command should be something like (if you are using IIS6):
cscript adplus.vbs -crash -pn w3wp.exe
This command will attach the debugger to the worker process. When the crash occurs it will generate a dump (a *.DMP file).
You can open it in WinDBG (also included in the Debugging Tools for Windows). File > Open Crash dump...
By default, WinDBG will show you (next to the command line) the thread were the process crashed.
The first thing you need to do in WinDBG is to load the .NET Framework extensions:
.loadby sos mscorwks
then, you will display the managed callstack:
!clrstack
if the thread was not running managed code, then you'll need to check the native stack:
kpn 200
This should give you some ideas. To continue troubleshooting I recommend you read the following article:
http://msdn.microsoft.com/en-us/library/ee817663.aspx
这篇关于获取IIS工作进程崩溃转储的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!