It may happen a thread is waiting on an object monitor and never wakes up because no other thread is notifying it (which of course is a bug...).
Using the jstack
utility I see all threads and their name and status.
Is it possible to interrupt a thread (so it throws an InterruptedException
) from the command line or anyway from within a different process?
I know about the https://github.com/jglick/jkillthread utility but that one simply kills the thread and I need the thread to be interrupted.
The reason for the question is that I got this situation in a production environment that I cannot simply restart....