Windbg和Stack Overflow异常 - 崩溃转储但Windbg输出无意义

时间:2012-02-06 10:54:30

标签: asp.net windbg stack-overflow adplus

我试图在实时ASP.NET 4.0站点上找到间歇性Stack Overflow异常的来源。我使用ADPlus(adplus_old.vbs,而不是新的adplus.exe)使用自定义配置捕获了一些故障转储,忽略了所有其他类型的异常(请参阅此处的第一个答案:Help catching StackOverflowException with WinDbg and ADPlus)。

我在运行应用程序的同一台服务器上运行Windbg。该服务器基于Intel运行64位Win 2003.WinDbg版本为64位64位。我为程序集生成PDB文件,我怀疑异常来自并将它们放在站点的/ bin文件夹中(有几个程序集我没有PDB文件,但我认为它们不涉及此问题)。我将环境变量_NT_SYMBOL_PATH指向/ bin文件夹。 WinDbg将符号路径显示为:C:\ WINDOWS \ Microsoft.NET \ Framework64 \ v4.0.30319; D:\ InetPub \ LiveSites \ MySite \ bin

当我运行WinDbg时,在打开崩溃转储后,我运行.loadby sos clr然后!clrstack。输出非常小 - 当我在测试站点上设置故意的S / O时,我清楚地看到导致异常的方法。出了什么问题?

Microsoft (R) Windows Debugger Version 6.12.0002.633 AMD64
Copyright (c) Microsoft Corporation. All rights reserved.


Loading Dump File [F:\ADPlus\Crash_Mode__Date_02-03-2012__Time_14-36-11PM\PID-9212__W3WP.EXE_-MySite-__1st_chance_StackOverflow__full_0140_2012-02-04_00-24-45-123_23fc.dmp]
User Mini Dump File with Full Memory: Only application data is available

Comment: '1st_chance_StackOverflow_exception_in_W3WP.EXE_-MySite-_running_on_MyServer'
Symbol search path is: C:\WINDOWS\Microsoft.NET\Framework64\v4.0.30319;D:\InetPub\LiveSites\MySite\bin
Executable search path is: 
Windows Server 2003 Version 3790 (Service Pack 2) MP (8 procs) Free x64
Product: Server, suite: Enterprise TerminalServer SingleUserTS
Machine Name:
Debug session time: Sat Feb  4 00:24:50.000 2012 (UTC + 0:00)
System Uptime: 185 days 15:16:43.314
Process Uptime: 0 days 9:49:58.000
................................................................
................................................................
................................................................
................................................................
.....................................
Loading unloaded module list
..
This dump file has an exception of interest stored in it.
The stored exception information can be accessed via .ecxr.
(23fc.21ec): Stack overflow - code c00000fd (first/second chance not available)
*** ERROR: Symbol file could not be found.  Defaulted to export symbols for clr.dll - 
clr!LogHelp_TerminateOnAssert+0x49e13:
00000644`7f14d883 894c2448        mov     dword ptr [rsp+48h],ecx ss:00000000`0ee55fc8=00000000
0:054> .loadby sos clr
0:054> !clrstack
PDB symbol for clr.dll not loaded
OS Thread Id: 0x21ec (54)
Child SP         IP               Call Site
000000000eecf138 000006447f14d883 [GCFrame: 000000000eecf138] 
000000000eecf178 000006447f14d883 [ContextTransitionFrame: 000000000eecf178] 
000000000eecf1b8 000006447f14d883 [GCFrame: 000000000eecf1b8] 
000000000eecf3a0 000006447f14d883 [ComMethodFrame: 000000000eecf3a0] 

这是我的ADPlus命令:

adplus_old.vbs -p 12345 -c F:\ADPlus\DumpStackOverflow.cfg
(where 12345 is the PID of the w3wp.exe process I am attaching to.

这是我的ADPlus配置文件:

<ADPlus>
<Settings>
    <RunMode>CRASH</RunMode>
    <OutputDir>F:\ADPlus</OutputDir>
</Settings>
<Exceptions>
    <Option>FullDumpOnFirstChance</Option>
    <Option>MiniDumpOnSecondChance</Option>
    <Option>NoDumpOnFirstChance</Option>
    <Option>NoDumpOnSecondChance</Option>
    <Config>
        <Code>AllExceptions</Code>
        <Actions1>Void</Actions1>
        <Actions2>Void</Actions2>
        <ReturnAction1>GN</ReturnAction1>
        <ReturnAction2>GN</ReturnAction2>
    </Config>       
    <Config>
        <!--
        av = AccessViolation
        ch = InvalidHandle
        ii = IllegalInstruction
        dz =  IntegerDivide
        c000008e = FloatingDivide
        iov = IntegerOverflow
        lsq = InvalidLockSequence
        sov = StackOverflowException
        eh = CPlusPlusEH
        * = UnknownException
        clr = NET_CLR
        bpe = CONTRL_C_OR_Debug_Break
        ld = DLL_Load
        ud = DLL_UnLoad
        epr = Process_Shut_Down
        sbo = Stack_buffer_overflow
        -->
        <Code>sov;sbo</Code>
        <Actions1>Log;Time;Stack;FullDump;EventLog</Actions1>
        <CustomActions1>!runaway</CustomActions1>
        <Actions2>Log;Time;Stack;FullDump;EventLog</Actions2>
        <CustomActions2>!runaway</CustomActions2>
        <!--
        G = go
        GN = go unhandled exception
        GH = go handled exception
        Q = quit
        QD = quit and detach
        -->
        <ReturnAction1>GN</ReturnAction1>
        <ReturnAction2>GN</ReturnAction2>
    </Config>
    <Config>
        <Code>clr</Code>
        <Actions1>Void</Actions1>
        <Actions2>Log;Time;Stack;FullDump;EventLog</Actions2>
        <ReturnAction1>GN</ReturnAction1>
        <ReturnAction2>GN</ReturnAction2>
    </Config>
    <Config>
        <Code>epr</Code>
        <Actions1>Log;Time;Stack;FullDump;EventLog</Actions1>
        <Actions2>Void</Actions2>
        <ReturnAction1>GN</ReturnAction1>
        <ReturnAction2>GN</ReturnAction2>
    </Config>
</Exceptions>
</ADPlus>

1 个答案:

答案 0 :(得分:7)

运行“!analyze -v”可能会提供有关异常的更多信息。