How to debug why w3wp.exe crashes randomly?

39

Solution 1

A step-by-step guide is included here from Tess Ferrandez's blog:

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

Essentially, you will setup DebugDiag 1.2 x64 to trigger on that exception code, and create a full userdump. After the dump is created, you can use DebugDiag to analyze the dump for you. Although with that particular exception, you probably need to use WinDbg+SOS.

Some of the more relevant information:

"For stack overflows as most of you probably know, the most common reason is that we are in some type of recursive loop, so what we really would like to know here is what is on this stack… The reason why it is showing up with just addresses and not method names, is because debug diag doesn’t understand .net so we’ll have to bring the dump to windbg to analyze it and check out the .net stack.

"In windbg we can then load up sos (.loadby sos mscorwks) and run !clrstack on the active stack to get the callstack."

(If you are running .NET 4, the command to load sos is: .loadby sos clr)

Ultimately, what you are looking for is the offending code in your application that is causing the recursion. The method names that appear in WinDbg when SOS is loaded will probably get you pointed in the right direction.

Solution 2

Get ProcDump and configure it to generate dumps when w3wp.exe processes crash. Once you have a dump inspect it with Visual Studio or Windbg.

Share:
39

Related videos on Youtube

Jay
Author by

Jay

Updated on September 18, 2022

Comments

  • Jay
    Jay over 1 year

    using jackson2, java have a json as follows and need help how to parse the value which is in a xml like structure with tags attributes and value. jsonml does not seem to ending tags and so forth but this does.

    {
        "id": "1",
        "label": "complexvalue",
        "value": "[example uid=\"147366048682873771\" description=\"Example description\"]examplevalue[/example]"
      }
    

    I can parse it as string by removing special chars and then splitting them but want to find a better way using jackson2. Any help is greatly appreciated.