IBM Support

Collecting a thread dump on Solaris.

Technote (troubleshooting)


If the ITDS server appears hung or has generated a core file, it is important to collect a thread dump in order to identify the reason for the hang or crash condition.

Resolving the problem

Purpose: Gather ibmslapd (or any) processes thread stacks from Solaris system when a process got hung or got crashed.

1) Collect a thread dump from a hung server

1.1) Collect the process ID

From a command prompt, type:

ps -ef | grep ibmslapd

1.2) Collect the thread dump from the process
Use the pstack and pflags command :

pstack <pid> | tee <pid>_pstack1.out
pflags <pid> | tee <pid>_pflags1.out

where <pid> is the process ID obtained in step 1.1.

1.3) Wait for couple of minutes and repeat step 1.2 and redirect the output into separate files.

Provide both pstack and pflags output files.

2) Collect a thread dump and other debug info from a core file
Typically the core file for ibmslapd process (With V6.x) is located in the workdir folder of the instance location (e.g.: /export/home/ldapdb2/idsslapd-ldapdb2/workdir/ )

2.1) Use pstack and pflags commands:
pstack <core> | tee core1_pstack.out
pflags <core> | tee core1_pflags.out

where <core> is the fully qualified path to the core file.

2.2) Use adb (debugger available on Solaris) to gather

adb <path_to_ITDS_binary> <path_to_core_file> | tee /tmp/adb.out
(This command will just stay without returning back to command prompt - type the following adb commands - including the $ in the beginning part of the line.)
(Now the control will return back to command prompt)

The path of the binary (such as ibmslapd):
V6.0: /opt/IBM/ldap/V6.0/sbin/32/<program>
V6.1/V6.2/V6.3: /opt/IBM/ldap/<version>/sbin/64/<program>

adb /opt/IBM/ldap/V6.3/sbin/64/ibmslapd /export/home/ldapdb2/idsslapd-ldapdb2/workdir/core | tee /tmp/adb.out

Provide pstack, pflags output files and also the adb output file.

Product Alias/Synonym

IBM Tivoli Directory Server

Document information

More support for: IBM Security Directory Server

Software version: 5.2, 6.0, 6.1, 6.2, 6.3, 6.3.1

Operating system(s): Solaris

Reference #: 1268417

Modified date: 05 January 2015