How to troubleshoot a suspected memory leak in the vxconfigd process on Solaris

book

Article ID: 100037777

calendar_today

Updated On:

Description

Description

 Use the following procedure to collect information for a suspected memory leak in vxconfigd process. This procedure uses the libumem feature of the Solaris Operating System, the feature was first available in Solaris 9 update 3 and so can not be employed on a Solaris version prior to this. libumem is a library, developed by Sun, that is used to track memory allocations of userland processes and as such, can be used to help identify memory leaks.

It is required to restart vxconfigd in order for libumem to be used. Ensure that any applications that make use of vxconfigd will not be disrupted whilst the below procedure is carried out. For example it is recommended to freeze all Service Groups if Veritas Cluster Server (VCS) is in use. Check that vxconfigd is not carrying out any tasks (with vxtask list) prior to carrying out the procedure.

 # cd   /sbin

0. Stop vxconfigd process:

 

 

 

# vxdctl  stop

 

 

1. Capture ownership information and permissions of the vxconfigd file:

# ls -l vxconfigd

-r-xr-xr-x   1 root     sys      4324812 Oct  3 20:07 vxconfigd

 

2. Move vxconfigd to different name:

 

 

 

# mv vxconfigd vxconfigd.orig

 

 

 

3. Create wrapper script filename 'vxconfigd' with the following content (the following entry is all on one line):
 

 

 

UMEM_DEBUG=default UMEM_LOGGING=transaction LD_PRELOAD=libumem.so.1  /sbin/vxconfigd.orig $*

 

 

 

4. Set wrapper script to have same permissions and ownership as original vxconfigd file:

 

 

# chown root:sys vxconfigd

 

 

 5. Start vxconfigd process:

  # vxconfigd -k

6. Check process is running (note it should show that the '.orig' is running):
 
 #  ps -ef | grep vxconfigd
   root  8591     1  18 12:19:00 ?           0:06 /sbin/vxconfigd.orig -k
 
7. Once the problem has been reproduced, ensure the memory leak has occurred (the larger the leak that occurs the better). The solaris command 'pmap' can be used to monitor memory usage of the process for example:
 

# pmap -x `pgrep vxconfigd` 

 
 
8. Force the process to drop a core (change pid number accordingly to that identified in step 6 above):

 

 

# gcore 8591

 

9. Capture findleaks information from the core:
 
 # echo "::findleaks -dv" | mdb core.8591
 
10. As well as the output of the above command, send in core file the vxconfigd binary and shared libraries used by vxconfigd to support for analysis.

 

Issue/Introduction

How to troubleshoot a suspected memory leak in the vxconfigd process on Solaris