I am surprised to discover that somehow, recently, jstack stopped working on newer JDK 8. I am not sure around which release this happened but I do get:
36649: Unable to open socket file: target process not responding or HotSpot VM not loaded
The -F option can be used when the target process is not responding
ps -Af|grep 36649
conflue+ 36649 1 62 08:14 ? 00:48:28 /usr/lib/jvm/java-8-oracle/bin/java -Djava.util.logging.config.file=/opt/atlassian/confluence/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Xms15000m -Xmx15000m -Duser.timezone=UTC -Djava.awt.headless=true -Dconfluence.upgrade.recovery.file.enabled=false -Dmail.smtp.connectiontimeout=10000 -Dmail.smtp.timeout=10000 -XX:MaxMetaspaceSize=256m -XX:+UseG1GC -Djava.awt.headless=true -Xloggc:/opt/atlassian/confluence/logs/gc-2015-07-02_08-14-39.log -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=5 -XX:GCLogFileSize=2M -XX:-PrintGCDetails -XX:+PrintGCTimeStamps -XX:-PrintTenuringDistribution -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=8091 -Dcom.sun.management.jmxremote.local.only=false -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Djava.rmi.server.hostname=127.0.0.1 -Djava.endorsed.dirs=/opt/atlassian/confluence/endorsed -classpath /opt/atlassian/confluence/bin/bootstrap.jar:/opt/atlassian/confluence/bin/tomcat-juli.jar -Dcatalina.base=/opt/atlassian/confluence -Dcatalina.home=/opt/atlassian/confluence -Djava.io.tmpdir=/opt/atlassian/confluence/temp org.apache.catalina.startup.Bootstrap start
I am sure that the PID is right and I even tried the -F
mode, which seems to block the jstack, I waited many minutes and it seems not to respond at all.
If anyone can provide an alternative way to produce those thread-dump needed for investigating dead-locks and so, I will be more than willing to try them.
Additional system information
Ubuntu 14.04.2 LTS
>java -version
Java build 1.8.0_45-b14
>uname -r
3.13.0-55-generic
Make sure that you use jstack from java8. You run java-8-oracle, but it is possible, that default jvm is different :) Also, try sudo, to exclude access problems.