How to find both threads deadlock?

We have a classic spring / hibernate / mysql stack running in Tomcat 5.5. From time to time, we get a dead end when a timeout attempt blocks a table row. Some sort of deadlock exception is thrown.

The exception becomes clear, and the stack trace indicates what went wrong. But it does not show another thread that holds the actual lock. If I do not know that this thread makes it all just a needle in a haystack.

QUESTION: Is there a way to find another thread?

Thank!

Jan

+5
source share
4 answers

MySQL , . .

SHOW INNODB STATUS

, , (, ). , . , .

, , .

+1

, , , . , , .

  • on * nix QUIT ( "kill -3 pid" )
  • jconsole/jvisualvm
  • JDK jstack ( -F -l )
  • , pstack .

, / , . , . Btw JVM , .

, .

.

,

0

, jconsole .

0

All Articles