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 jcmd, I receive AttachNotSupportedException.
I only managed to do a thread dump using jstack -F, and using JDK version in sync with JRE version, JRE version that was used to start the java process.
The only thing I can think of, is that maybe the OS Scheduler does not allow CPU time for the Java process, and if I do a jstack -F I force it to allow it to run?
Any feedback will be appreciated.
Regards,
Cristi