Capturing Data

Use both Microsoft UMDH and Windbg together to capture the best set of data for diagnosing a memory leak. Ideally, if you suspect a memory leak, gather the data using a test environment to reduce interruptions in the production environment, and for better control of the environment.

Prerequisites
These Microsoft Debugging Tools must be installed:
  • GFlags
  • UMDH
Task
  1. Enable GFlags by running command gflags –i obmo.exe +ust from the Windows Command Prompt window.
  2. Restart the SAP Mobile Server service. Restart is necessary for the gflags change to take effect.
  3. Wait for few minutes for the service to finish its startup tasks.
  4. Open Windows Task Manager, and locate the process ID for OBMO.exe. You will need this information in a later step, so best to write it down.
  5. Take a UMDH snapshot by running the command umdh –p:<ProcessID> -f:<filename0> from the Windows Command Prompt window.
  6. Run the operations that may produce the suspected memory leak.
  7. Take another UMDH snapshot by running the command umdh –p:<ProcessID> -f<filenameNN> from the Windows Command Prompt window.
  8. Repeat steps 6 and 7 at least more time (the more times, the more data you will have to analyze).
  9. Take a process dump:
    1. Attach the windbg to the obmo.exe.
    2. Use the .dump /ma <filename.dmp> command in the windbg command window.
  10. Disable GFlags by running the command gflags –i obmo.exe –ust from the Windows Command Prompt window.
    Note: UDMH can work with process name as well, but this procedure intentionally uses the process ID to ensure capturing data from the same instance.
Next
The data is ready to be analyzed.