1

I've got an Application which occasionally deadlocks (say once a month).

Right now I managed for the first time to reproduce this condition while running in eclipse debugger.

It seems as if all threads are waiting for the WriteLock to get released.

What I need is a way to find out which one (of the 200) Threads is holding the lock.

But pausing the threads in eclipse and inspecting has yielded no results because eclipse tells me it can't access the variables I want to view because the thread was manually suspended.

I don't want to restart the application because I don't know if I can manage to get into this deadlock a second time.

So what to do to find the lock holder?

EDIT: I've already tried jstack to make me a thread dump. But I can only find threads waiting for the lock but none holding it.

Scheintod
  • 7,953
  • 9
  • 42
  • 61
  • firstly, release pause in eclipse, then with jvisualvm attach to process and generate a thread dump. in thread dump you can see locks and analyze lock owners (I think) – guleryuz Feb 06 '16 at 12:34
  • I've already tried jstack to make me a threaddump. But I can only find threads waiting for the lock but none holding it. – Scheintod Feb 06 '16 at 13:57

0 Answers0