Memory Leak Detection Steps

Memory Leak Detection Steps

Procedure Steps

  1. Install Debugging Tools for Windows from http://msdn.microsoft.com/en-us/windows/hardware/gg463009.aspx.
  2. Stop the process (Ex: LS Linkage Server) that will have the memory dumps captured for it.
  3. Open a command prompt as Administrator, and then navigate to the Debugging Tools for Windows directory (Ex: C:\Program Files (x86)\Debugging Tools for Windows).
  4. Update the flags for the executable:
    Run gflags.exe.
    On the Image File tab, enter the executable name (Ex: LSLServer.exe) and then Tab to refresh the UI.
    Make sure Create user mode stack trace database is selected.
    Click the Apply button.
  5. Restart the "to-be-monitored-process" (Ex: LS Linkage Server).
  6. Allow the process to run for a period of time to start up (approximately 10 minutes).
  7. Open Task Manager to determine the Process Identifier (PID) for the process:
    Select the Processes tab.
    If the PID column is not displayed, open View\Select Columns, and select the PID column.
    Find the process to be diagnosed and note it’s PID.
  8. Capture the first memory snapshot using the command prompt (see step 3) by executing the following command from C:\Program Files (x86)\Debugging Tools for Windows:
    umdh -p:[PID] -f:startMemory.txt
  9. Wait until the memory consumption has grown substantially; typically this take several hours of runtime.
  10. Capture the second memory snapshot using the command prompt (see step 3) by executing the following command from C:\Program Files (x86)\Debugging Tools for Windows:
    umdh -p:[PID] -f:endMemory.txt
  11. Capture a memory dump of the currently running process to aid in the troubleshooting.
    Open the WinDdg program found in the Start Menu in the Debugging Tools for Windows program group (run the application as Administrator).
    Press the F6 key (File\Attach to a Process).
    Select the By Executable option.
    Select the processes to be diagnosed (Ex: LSLServer.exe), and then click OK.
    A new window will open. At the bottom of the window is a text area where commands can be entered. Type the following command in the text area: .dump /mfh ProcessDump.dmp
    Wait until the message "Dump successfully written" is displayed.
    Close out of WinDbg.
  12. Open the directory [C:\Program Files (x86)\Debugging Tools for Windows] and send Lenel the following files:
    startMemory.txt
    endMemory.txt
    ProcessDump.dmp
  13. Repeat steps 2-5 except now you will be disabling the option to Create user mode stack trace database.

Applies To

OnGuard (All versions)

Additional Information