Linked Questions
133 votes
10 answers
219k views
kill -3 to get java thread dump
I am using kill -3 command to see the JVM's thread dump in unix. But where can I find the output of this kill command? I am lost!!
106 votes
5 answers
100k views
Running jmap getting Unable to open socket file
I had to run jmap in order to take heap dump of my process. but jvm returned: Unable to open socket file: target process not responding or HotSpot VM not loaded The -F option can be used when the ...
67 votes
16 answers
50k views
Deadlock detection in Java
Long time ago, I saved a sentence from a Java reference book: "Java has no mechanism to handle deadlock. it won't even know deadlock occurred." (Head First Java 2nd Edition, p.516) So, what is about ...
4 votes
6 answers
10k views
AttachNotSupportedException while running jMockit tests on IBM JRE
I am getting the below exception when I try to run a simple jMockit/JUnit test using IBM JDK. Has anyone faced this issue? I tried given -Dcom.ibm.tools.attach.enable=yes as VM argument but no luck. ...
3 votes
2 answers
12k views
Java - AttachNotSupportedException: Unable to open socket file: HotSpot VM not loaded
When attempting to attach an agent jar file onto another process running in java, I have came across the exception: com.sun.tools.attach.AttachNotSupportedException: Unable to open socket file: ...
6 votes
4 answers
6k views
Mockito shipped within Spring Boot fails to attach to JVM (OpenJDK 11)
I have a bunch of Spring Boot 2.5.6 applications that use Mockito for unit testing. The version of Mockito that is used is the one that comes shipped within SB itself (3.9.0). The JDK is OpenJDK 11.0....
2 votes
1 answer
5k views
Issue Taking Java Heap Dump
I'm trying to take a java heap dump to help investigate a memory leak. Whenever I use this: jmap -J-d64 -dump:format=b,file=myheapdump -F 29498 The heap dump file gets to about 16,048 kb and stops ...
1 vote
2 answers
2k views
Running jcmd using JDK-11 on JDK-8 java process not running successfully
I am trying to monitor native memory of tomcat using jcmd but getting following exception: Command: jcmd 14533<pid of tomcat> VM.native_memory summary I have installed 2 jdk's jdk-11 AND jdk-8. ...
3 votes
1 answer
1k views
Java process not respoding but resuming after I do a thread dump with jstack -F
I have an weird issue with a Java process which is stuck (once/twice per day) and it only recovers after I execute: jstack -F ${PID} While the Java process is stuck, If I try to do a thread dump with ...
1 vote
0 answers
772 views
Create JVM heap dump of tomcat service running on Window
While trying to create a heap dump from a Tomcat Service running as windows service, get "Access is denied" error. I started the command prompt as "Run as Administrator" Erorr ...