Generating Log Files with the Microsoft User-Mode Dump Heap Tool (UMDH.exe)

June 14, 2018 | KB: 1013969
Laserfiche

Summary

This article explains how to obtain heap dumps of the Laserfiche Server process using Microsoft's UMDH.exe tool for troubleshooting purposes.

More Information

Purpose: Get stack traces of all heap allocations in LFS.exe in 60 second intervals.

Instructions:

  1. Download the following zip file: GetHeapDumps.zip.
  2. Extract all files in the zip file to a directory of your choice.
  3. Run 01PREPARE.ps1 by opening the Windows Powershell terminal, navigating to the directory containing the extracted files, and entering the following command:

    .\01PREPARE.ps1.

  4. Restart the computer. This step cannot be skipped.
  5. Find the PID of the lfs.exe process as follows. Open the Task Manager, click on the Details tab, and scroll down to the lfs.exe line. The PID of this process is listed under the PID column.
  6. Open the Windows Powershell terminal as an administrator. When the memory leak starts happening, run 02GETINFO.ps1 with the following command:

    .\02GETINFO.ps1 x y

    where x is the PID of lfs.exe and y is the number of heap dumps to get (y MUST be at least 3 to make this useful). This step can be done through the Windows task scheduler if you know when the leak is expected to happen. This step will produce a number of dump logs equal to y.
  7. Run 03CLEANUP.ps1 with the command

    .\03CLEANUP.ps1

    Your server will take a performance hit if you skip this step.
  8. Restart the Laserfiche Server service. You do not have to restart the computer.

GetHeapDumps.zip has the following contents:

  • gflags.exe
  • umdh.exe
  • dbghelp.dll
  • 01PREPARE.ps1
  • 02GETINFO.ps1
  • 03CLEANUP.ps1

Related Links

See the Microsoft documentation for additional information on the User-Mode Dump Heap (UMDH) tool and the GFlags tool.