c# - Debugging a disappearing .NET app with ADPlus, getting CONTRL_C_OR_Debug_Break exception -


recently, we've had 64-bit .net 4.0 process unmanaged code crash disappearing. no event viewer entries, no windows error dialogs, , our current logging , trace statements don't indicate obvious. code base large, adding additional trace statements time-consuming.

we have several third-party dlls in use, have access pdb files need. crash happens throughout day, not @ regular intervals. our group suspects mishandied multicast traffic might cause, we're not 100% sure.

we've used adplus debug process in crash mode:

adplus -crash -p <pid> -o c:\temp 

and we've been getting strange behavior ... last minidump when crash occurs first chance "contrl_c_or_debug_break exception"; not hitting "ctrl+c". every time we've attached debugger, we've gotten minidump anywhere 10 minutes 2 hours after launch. no second chance exceptions, , no out-of-control memory or cpu.

i admittedly novice when comes cdb/adplus/windbg, know @ least few windbg/sos commands swim around few crash dumps; on minidump, stumped.

am going diagnosing problem right way? else can do?

update

after getting correct windows server 2008 symbol files, appears stack. what's best way hunt down possible heap corruption?

0:039> k   *** stack trace last set context - .thread/.cxr resets child-sp          retaddr           call site 00000000`2d06f4f0 00000000`77834736 ntdll!rtlreportcriticalfailure+0x2f 00000000`2d06f5c0 00000000`77835942 ntdll!rtlpreportheapfailure+0x26 00000000`2d06f5f0 00000000`778375f4 ntdll!rtlpheaphandleerror+0x12 00000000`2d06f620 00000000`777ddc8f ntdll!rtlplogheapfailure+0xa4 00000000`2d06f650 00000000`7767307a ntdll! ?? ::fnodobfm::`string'+0x10c54 00000000`2d06f6d0 00000000`72a88cc4 kernel32!heapfree+0xa 00000000`2d06f700 00000000`6ea37ffb msvcr100!free+0x1c 00000000`2d06f730 00000000`eb692d6c jvm+0x187ffb 00000000`2d06f738 00000000`2d06f7a8 0xeb692d6c 00000000`2d06f740 00000000`00000000 0x2d06f7a8 

update 2

it turns out combination of our app + newer version of jdk indeed corrupting heap. caught crash dump setting in gflags:

gflags -p /enable myprocess.exe /full 

still not sure why, downgrading our jvm fixed problem now. big @marcsherman , @sevatitov helping in comments.

here's did find root of heap corruption:

  1. installed debugging tools windows "standalone" component.
  2. enabled full heap verification gflags:

    gflags -p /enable myprocess.exe /full 
  3. caught resulting crash dump adplus:

    adplus.exe -crash -o <outputdirectory> -p <pid> 
  4. opened resulting crash dump in windbg , ran:

    !analyze -v 

thanks @marcsherman , @sevatitov in comments.


Comments

Popular posts from this blog

node.js - Bad Request - node js ajax post -

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -