Taking Thread and Heap Dumps

In some very rare cases AggreGate Server or AggreGate Client may get unresponsive due to a memory leak, 100% CPU use, or thread deadlock. These are erroneous situations that more likely to happen in Early Access Program versions of AggreGate.

In most cases, Tibbo engineers are solving such cases via a remote connection to a machine running AggreGate. However, if remote access is restricted, e.g. due to security reasons, customers might need to make thread and heap (memory) dumps to provide them to Tibbo for further analysis.

Creating a Stack Trace of a Hanged or Unresponsive AggreGate Server or AggreGate Client

To create a thread dump that is used for diagnosing inefficient thread locking and thread deadlocks:

1. Check version of Java Runtime Environment (JRE) that is used to run AggreGate by running %AggreGate Server Folder%/jre/bin/java.exe -version

2. Install Java Development Kit (JDK) of the same version as JRE used to run AggreGate

3. Find out Process ID (PID) of the AggreGate process:

  • Using Task Manager on Windows.
  • By running ps ax|grep java on Linux.

4. Run %JDK Folder%/bin/jstack -l PID > stack.txt

5. Send resulting stack.txt file to AggreGate team for analysis

Creating a Heap Dump of an AggreGate Server or AggreGate Client with High Java Memory Usage

Note 1: memory usage of an AggreGate Server can be tracked using the Server Memory Usage tracker.

Note 2: memory usage of an AggreGate Client can be tracked using JVisualVM utility that is bundled with Java Development Kit (JDK).

Note 3: heap dump can be successfully analyzed if server memory usage was constantly growing for several days and it has grew up to 200-300% of the initial memory usage that was registered after server startup.

Note 4: creating a chart of Server Memory Usage tracker history will clearly show the growing memory usage.

To create a heap dump that is used to diagnose memory leaks:

1. Install Java Development Kit (JDK) of the same version as JRE used to run AggreGate

2. Find out Process ID (PID) of the AggreGate process:

  • Using Task Manager on Windows.
  • By running ps ax|grep java on Linux.

3. Run jmap -dump:format=b,file=dump.bin PID command

4. Compress resulting dump.bin file and share it with AggreGate team for analysis

Was this page helpful?