IBM Support

Collecting a thread dump on Solaris.

Technote (troubleshooting)


If the Directory Server program(s) 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. Collect the process ID - From a command prompt / login shell, type:
      ps -ef | grep ibmslapd
    2. As "root" user - collect the thread dump from the hung 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 ii.
    3. Wait for 30 seconds and repeat step ii and redirect the output into separate files. Repeat for 5 times.
    4. Provide all 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/ )
    1. As "root" user - 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. As "root" user - use adb (debugger available on Solaris) to gather output file as below:

      Find the <program> which caused the core using "file" command:
      file <corefile>

      (This adb command will just stay without returning back to command prompt - type the following adb commands - including the $ in the beginning part of the line.)

      adb <path_to_ITDS_binary> <path_to_core_file> | tee /tmp/adb.out

      (Now the control will return back to command prompt)

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

      adb /opt/IBM/ldap/V6.3/sbin/64/ibmslapd /export/home/ldapdb2/idsslapd-ldapdb2/workdir/core | tee /tmp/adb.out
    3. Provide pstack, pflags output files and also the adb output file.

Product Alias/Synonym

IBM Tivoli Directory Server
Security Directory Server
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, 6.4

Operating system(s): Solaris

Reference #: 1268417

Modified date: 05 January 2015

Translate this page: