How to generate a memory dump for eDirectory on Windows

  • 7007195
  • 11-Nov-2010
  • 26-Apr-2012

Environment

Novell eDirectory 8.8.x for Windows Platforms

Situation

If eDirectory on Windows is failing or hanging, it may be necessary to capture a memory dump for Novell Technical Services to analyze it. The purpose of this document is to explain the steps and tools required to do so.

When eDirectory fails in eDirectory, an error entry is made in the Event Viewer, with a message like:
Faulting application name: dhost.exe, version: 205.5.7.0, time stamp: 0x4c99dfd9

Resolution

There are different tools available on Windows to capture a memory dump. The two main ones are Dr. Watson and ADPlus. The rest of this document will focus on Adplus as the main tool to capture memory dumps.

For more information on ADPlus, including instructions on how to download it, refer to this Microsoft document: How to use ADPlus to troubleshoot "hangs" and "crashes"

ADPlus is not installed by default in a Windows Server. To install it, the "Debugging Tools for Windows" component needs to be installed. On Windows 2003 (and previous versions) the package is available on the install media as a msi package (in the support folder). On Windows 2008, the component needs to be installed following the instructions in the link above. Notice that for ADPlus to work, it's not necessary to install the full .Net Framework 4 component, that the install suggests you need.

Getting a memory dump on a crash

Many systems might generate one automatically with Dr. Watson. They are normally “mini-dumps”, that include very little information (like the current function stack info). If Dr. Watson is configured to generate a full dump, then it may not be necessary to generate another one with ADPlus.
In order to gather a memory dump of eDirectory, ADPlus needs to be passed the Process ID (or PID) of dhost.exe. To determine the PID of dhost.exe, open the Task Manager | Processes tab and add the PID column. This will show the PIDs of all processes. Locate the one for dhost.exe.

You can then issue the following command:
adplus -crash -p <dhost PID> -o c:\temp
(the parameter -o is not mandatory, but it allows specifying where the crash files will be stored). This command will attach to dhost and generate a memory dump in the event of a crash.

Grabbing a memory image

Sometimes it may be necessary to grab a memory dump of a running process. This can be of use for example when a server doesn't get to crash but is unresponsive or hangs.
ADPlus can be used as well to generate a crash file of a running process. To do so, get the PID (as instructed earlier) and use the command:
adplus -hang -p <dhost PID> -o c:\temp

This command will attach to dhost, grab a memory dump of the running process and allow the process to continue running. The process will not be interrupted by default.