Sun Directory Server Enterprise Edition 7.0 Troubleshooting Guide

Troubleshooting Memory Leaks

This section describes how to troubleshoot a memory leak.

Possible Causes of a Memory Leak

Memory leaks are caused by problems allocating memory, either in Directory Server itself or in custom plug-ins. Troubleshooting these problems can be very difficult, particularly in the case of custom plug-ins.

Collecting Data About a Memory Leak

It is important to do the following before collecting data about your memory leak:

Once you have done the above, run the prstat -L utility and check the VSZ column if it grows.

Collect the generic Directory Server data, as described in Collecting Generic Data. This data includes the version of Directory Server that you are running, logs from the test run, in particular the audit log, and the Directory Server configuration file.

With the data you collected, you can now contact the Sun Support Center for assistance with your problem.

Analyzing Memory Leaks Using the libumem Library

On Solaris systems, the libumem library is a memory agent library that is helpful for analyzing the cause of a memory leak. For more information about the libumem library, see the technical article at the following location:

Restart the Directory Server using the following command:

UMEM_DEBUG=contents,audit=40,guards UMEM_LOGGING=transaction ./dsadm start

The libumem library is now loaded before the Directory Server starts, instead of using the Directory Server memory allocation.

Next, run the gcore command several times, once before the memory use started to grow and once after. The gcore command will dump a memory image in the current directory.

# gcore core.process-id

Finally, use the mdb tool to analyze the results.