Questions tagged [thread-dump]

When debugging it becomes necessary to dump the thread state of the application, this is usually to find a deadlock, lock contention or leaking connections.

When debugging it becomes necessary to dump the thread state of the application, this is usually to find a deadlock, lock contention or leaking connections.

  • Java:
    • kill -HUP
      • stdout
      • application log file that captures stdout
    • kill -3
      • stdout
      • application log file that captures stdout
    • JDK based, the JRE does not install these programs
      • jstack > dump.txt
      • output is always to stdout, regardless of the logging configuration
      • jvisualvm
      • UI based, has many other features
221 questions
17
votes
3 answers

kill -3 or jstack : What is the difference?

I want to get the thread dump of my web app that running on a jboss server. I found two solutions for my problem : Using the unix command : kill -3 Using the jstack tool that exists in the JDK. Can anyone explain to me the difference between…
Anass
  • 6,132
  • 6
  • 27
  • 35
17
votes
2 answers

100 threads TIMED_WAITING in tomcat, causing it to stall as total number of threads crosses 200

Recently one of our production tomcat server became unresponsive because tomcat's busy threads shot upto 200. When we took thread dump before restarting we got 100 threads in TIMED_WAITING state like these 3 threads: ""http-bio-7007"-exec-241"…
ThinkFloyd
  • 4,981
  • 6
  • 36
  • 56
16
votes
2 answers

Analysis of 90% threads in java.lang.Thread.State: WAITING (parking)

Thread count in my tomcat application server is growing every day. When I have taken thread dump for analysis. I found that out of 430 threads 307 threads are with this status. Sample stacktrace "pool-283-thread-1" #2308674 prio=5 os_prio=0…
Patan
  • 17,073
  • 36
  • 124
  • 198
14
votes
2 answers

Java thread dump: WAITING (on object monitor) - what is it waiting on?

there was a similar question asked java-thread-dump-waiting-on-object-monitor-line-not-followed-by-waiting-on, but there was no concrete answer, so I will ask my question in hopes to get more info... In the following thread dump I see that the…
Marina
  • 3,894
  • 9
  • 34
  • 41
13
votes
4 answers

Analyzing thread dump of a java process

I have Java EE based application running on tomcat and I am seeing that all of a sudden the application hangs after running for couple of hours. I collected the thread dump from the application just before it hangs and put it in TDA for…
peakit
  • 28,597
  • 27
  • 63
  • 80
10
votes
5 answers

Generate a Java thread dump without restarting.

I'd like to create a thread that keeps track of the memory usage and cpu usage. If the application reaches a high level, I want to generate an heap dump or a thread dump. Is there a way to generate a Thread dump runtime without restarting?
Matteo Gatto
  • 616
  • 11
  • 28
9
votes
2 answers

Fatal error crashing on latest version of Java on Windows 10 machine

A customer is seeing this error on Windows 10 Build 1703 machine, I'm not getting it They got this with Java 1.8.0_111-b14) EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x0000000076fd6adf, pid=3164, tid=0x00000000000027d4 I got them to update…
Paul Taylor
  • 13,411
  • 42
  • 184
  • 351
9
votes
1 answer

How to collect heap dumps of any java process

I am new to Heaps , can anyone suggest how can i take heap dump of any java process (like Jmeter). I read about jmap command , but i am not getting where and how to execute / write it (in eclipse or cmd). It might be a very basic question but still…
Pratha
  • 147
  • 1
  • 1
  • 11
9
votes
1 answer

hidden.edu.emory.mathcs.backport*

In application thread dump I can see threadpool with five threads like following: "pool-1-thread-5" prio=10 tid=0x000000000101a000 nid=0xe1f in Object.wait() [0x00007f3c66086000] java.lang.Thread.State: WAITING (on object monitor) at…
valodzka
  • 5,535
  • 4
  • 39
  • 50
8
votes
3 answers

How can I view memory usage, thread dump for java programs, from command line?

Is there any known command line tool to ask the JVM to see memory usage and thread dumps of a java program. something like a headless jvisualvm?
stackoverflow
  • 18,348
  • 50
  • 129
  • 196
8
votes
1 answer

What are those java threads starting with "pool"?

I have a problem with a Tomcat server that is unable to shutdown gracefully. I have taken a thread dump after I issued the shutdown command, and it looks like this: http://pastebin.com/7SW4wZN9 The thread which I believe is the "suspect" that does…
mavroprovato
  • 8,023
  • 5
  • 37
  • 52
8
votes
3 answers

Java Thread Dump Summarisation Tool

I sometimes have to look at thread dumps from a Tomcat server. However, this is a very slow process as my application uses thread pools with a couple of hundred threads. Most of the thread dumps I look at include the same stack trace for many of the…
mchr
  • 6,161
  • 6
  • 52
  • 74
8
votes
1 answer

Analysing thread dump - lot of blocked threads on sun.misc.Unsafe.park

Working on fixing performance issue in a Java play with akka framework application. Basically consumes and processes messages from a queue. And uses external service APIs heavily while processing each message. I get in to CPU load issue at certain…
Krishna Shetty
  • 1,361
  • 4
  • 18
  • 39
8
votes
4 answers

Is there a way to generate a periodic java thread dump using JVMTI?

There are multiple ways to generate thread dumps in java. I'd like to use JVMTI (the C API) to generate it, in order to evaluate its performance impact on a running JVM. (I am aware of jstack and JMX ; this question is not generally about getting…
Ovesh
  • 5,209
  • 11
  • 53
  • 73
8
votes
4 answers

Thread dump programmatically /JDI (Java Debugger Interface)

I like to generate a thread dump programmatically. I've learned that there a basically two ways to do it: Use the "Java Virtual Machine Tool Interface" JVM-TI Use the higher abstracted "Java Debugger Interface" JDI For the JVM-TI I was able to…
user31157
1
2
3
14 15