Tutorial 10 - Investigating .NET Heap Memory Leaks :Part1 Collecting the data

Sign in to queue

Description

This video is the first in a two-part video on investigating a GC memory 'leak'.   This video discusses a real world memory leak that was found and corrected in PerfView itself.   This first part discusses how you likely found the leak (by observing memory growth using TaskManager or a simmiar utility), and that some care is needed because not all memory growth is a leadk.   The hallmark of a leak is unbounded growth when repeating an operation.  

Also discussed is the  the basic theory of taking two snapshots, one as a baseline, and another after doing an operation that should return the application to the same memory configuration.   

Aftet watching this you should watch part two of this video.   If you have not already done so, you should watch the video on GC Memory Investigation Basics. You may also be interested in the whole PerfView Tutorial Series.

Embed

Download

Download this episode

The Discussion

  • User profile image
    Magic​Andre1981

    When I click on "Dump GC Heap" the capture tool crashes with a stack overflow error:

    Error: HeapDump failed with exit code -1073741571
    #define STATUS_STACK_OVERFLOW            ((DWORD   )0xC00000FDL)  
    0022396c 0049c976 clrmemdiag!MemoryDiagnostics.RealTimeMemGCHeap.GetElementType+0xd6
    00223988 0049c886 clrmemdiag!MemoryDiagnostics.RealTimeMemGCHeapType.get_ElementType+0x16
    00223990 0049c976 clrmemdiag!MemoryDiagnostics.RealTimeMemGCHeap.GetElementType+0xd6
    002239ac 0049c886 clrmemdiag!MemoryDiagnostics.RealTimeMemGCHeapType.get_ElementType+0x16
    002239b4 0049c976 clrmemdiag!MemoryDiagnostics.RealTimeMemGCHeap.GetElementType+0xd6
    002239d0 0049c886 clrmemdiag!MemoryDiagnostics.RealTimeMemGCHeapType.get_ElementType+0x16
    002239d8 0049c976 clrmemdiag!MemoryDiagnostics.RealTimeMemGCHeap.GetElementType+0xd6
    002239f4 0049c886 clrmemdiag!MemoryDiagnostics.RealTimeMemGCHeapType.get_ElementType+0x16
    002239fc 0049c976 clrmemdiag!MemoryDiagnostics.RealTimeMemGCHeap.GetElementType+0xd6
    00223a18 0049c886 clrmemdiag!MemoryDiagnostics.RealTimeMemGCHeapType.get_ElementType+0x16
    00223a20 0049c976 clrmemdiag!MemoryDiagnostics.RealTimeMemGCHeap.GetElementType+0xd6
    00223a3c 0049c886 clrmemdiag!MemoryDiagnostics.RealTimeMemGCHeapType.get_ElementType+0x16
    00223a44 0049c976 clrmemdiag!M
    
    FOLLOWUP_IP: 
    +0
    004946c6 8bd0            mov     edx,eax
    
    SYMBOL_STACK_INDEX:  1
    
    SYMBOL_NAME:  clrmemdiag!MemoryDiagnostics.RealTimeMemGCHeap.GetGCHeapType+56
    
    MODULE_NAME: clrmemdiag
    
    DEBUG_FLR_IMAGE_TIMESTAMP:  0
    
    STACK_COMMAND:  _EFN_StackTrace ; ** Pseudo Context ** ; kb
    
    FAILURE_BUCKET_ID:  WRONG_SYMBOLS_c00000fd_ClrMemDiag.dll!MemoryDiagnostics.RealTimeMemGCHeap.GetGCHeapType
    
    BUCKET_ID:  APPLICATION_FAULT_WRONG_SYMBOLS_STACK_OVERFLOW_clrmemdiag!MemoryDiagnostics.RealTimeMemGCHeap.GetGCHeapType+56
    
    IMAGE_NAME:  ClrMemDiag.dll
    
    WATSON_STAGEONE_URL:  http://watson.microsoft.com/StageOne/HeapDump_exe/1_0_0_0/503f6784/unknown/0_0_0_0/bbbbbbb4/c00000fd/00494a00.htm?Retriage=1
    
    ---------
    
     
    

    My VS2010 uses 1GB of RAM and I would like to know what uses 300MB managed heap.

Comments closed

Comments have been closed since this content was published more than 30 days ago, but if you'd like to send us feedback you can Contact Us.