开发者

How to debug Crashed Dump File?

开发者 https://www.devze.com 2023-03-06 01:37 出处:网络
I run Debug Diagnostic tool on my windows server 2008. It created dump files. Because my asp.net application gives an exception time to time.

I run Debug Diagnostic tool on my windows server 2008. It created dump files. Because my asp.net application gives an exception time to time.

I need step by step instruction how to debug dump file. Do I need to debug in production server or locally? What do I need to have? How to configure?

How to determine where in application is the problem?

Is there any other ways how to read Dump files?

Here is the开发者_开发知识库 post I found it has pretty good explanation about dump files but they didn't explain the debugging part

http://blogs.msdn.com/b/tess/archive/2009/03/20/debugging-a-net-crash-with-rules-in-debug-diag.aspx


All you need to debug the dump is WinDbg, which can be downloaded from Microsoft and SOS which ships with the framework.

Start WinDbg and load the dump file from the File menu. This will tell you some initial information about the dump. This will tell you the kind of dump you're looking at.

Set up symbols by using the command .symfix.

Load SOS by using the command .loadby sos clr (.NET 4) or .loadby sos mscorwks (previous versions of .NET).

Take a look at the threads in the dump file using the !threads command. Notice the exception column on the far right. If you see any exceptions in this column use the !pe <EXCEPTION OBJECT> command to get the details.

For additional info read some of the posts on Tess' blog.


I think there is no easy answer to your question because there are so many different scenarios.

Yet, I can give you some basic flow but you will need to definitely look at books or websites to find more info.

First, if you have your pdb file and source code for that application, try to load them and point them to your source code. Once you have them, try to view all the loaded module by typing 'lm' and if you do not see your module, you can load it by typing '.reload /f your-module.exe'

Second, try 'analyze -v' command after you load your crash dump in windbg.

If you have configured correctly, windbg might be able to point out the exact source code line where it faced crash.

Lastly, when you configure symbols, please also add Microsoft symbol server to ease your debugging session.

There are many books and websites that you can help with but I think codeproject tutorial series is pretty good.

Here is the first series. http://www.codeproject.com/KB/debug/cdbntsd.aspx


I think you might want to buy Advanced Windows Debugging. There isn't anything nearly good enough on the web for you to learn this well.

http://www.amazon.com/Advanced-Windows-Debugging-Mario-Hewardt/dp/0321374460/ref=sr_1_1?ie=UTF8&qid=1305567440&sr=8-1

You can check out the book site here:

http://www.advancedwindowsdebugging.com/

For some other resources

0

精彩评论

暂无评论...
验证码 换一张
取 消