Click here to Skip to main content
14,237,088 members
   

Java

 
Questionjava Pin
Member 140430484-Nov-18 23:51
memberMember 140430484-Nov-18 23:51 
AnswerRe: java Pin
Richard MacCutchan5-Nov-18 5:17
protectorRichard MacCutchan5-Nov-18 5:17 
AnswerRe: java Pin
mohit gite16-Nov-18 21:25
membermohit gite16-Nov-18 21:25 
AnswerRe: java Pin
GiteHrudaya28-Nov-18 18:48
memberGiteHrudaya28-Nov-18 18:48 
AnswerRe: java Pin
GiteHrudaya2-Dec-18 22:59
memberGiteHrudaya2-Dec-18 22:59 
Questionjava Pin
mohit gite4-Nov-18 21:45
membermohit gite4-Nov-18 21:45 
AnswerRe: java Pin
Richard MacCutchan4-Nov-18 23:05
protectorRichard MacCutchan4-Nov-18 23:05 
AnswerRe: java Pin
GiteHrudaya29-Nov-18 23:13
memberGiteHrudaya29-Nov-18 23:13 
Quote:
A deadlock occurs when two or more threads in the JVM form a cyclic dependency with each other.

Quote:
Click to Tweet
So, How to Diagnose and Troubleshoot Java Deadlocks?
There are various options available to troubleshoot deadlock situations.

1. The naïve way: Kill the process and cross your fingers

You could kill the application server process and hope that when the application server starts again, the problem will go away. However, restarting the application server is a temporary fix that will not resolve the root-cause. Deadlocks could get triggered again when the application server comes back up.

2. The laborious way: Take thread dumps in your cluster of JVMs



You could take thread dumps. To trigger a thread dump, send a SIGQUIT signal to the JVM. (On UNIX, that would be a “kill -3” command and on Windows, that would be a “Ctrl-Break” in the console).

Typically, you would need to capture a series of thread dumps (example: 6 thread dumps spaced 20 seconds apart) to infer any thread patterns – just a static thread dump snapshot may not suffice


modified 5-Dec-18 6:43am.

Questionjava Pin
Member 140430483-Nov-18 21:03
memberMember 140430483-Nov-18 21:03 
AnswerRe: java Pin
Richard MacCutchan3-Nov-18 21:25
protectorRichard MacCutchan3-Nov-18 21:25 
GeneralRe: java Pin
Member 140430483-Nov-18 21:38
memberMember 140430483-Nov-18 21:38 
GeneralRe: java Pin
Richard MacCutchan3-Nov-18 22:17
protectorRichard MacCutchan3-Nov-18 22:17 
GeneralRe: java Pin
Member 140430483-Nov-18 22:25
memberMember 140430483-Nov-18 22:25 
GeneralRe: java Pin
Richard MacCutchan3-Nov-18 22:32
protectorRichard MacCutchan3-Nov-18 22:32 
GeneralRe: java Pin
Member 140430483-Nov-18 23:02
memberMember 140430483-Nov-18 23:02 
GeneralRe: java Pin
Richard MacCutchan4-Nov-18 1:15
protectorRichard MacCutchan4-Nov-18 1:15 
Questionjava Pin
mohit gite2-Nov-18 20:58
membermohit gite2-Nov-18 20:58 
AnswerRe: java Pin
Richard MacCutchan2-Nov-18 23:06
protectorRichard MacCutchan2-Nov-18 23:06 
GeneralRe: java Pin
mohit gite4-Nov-18 20:28
membermohit gite4-Nov-18 20:28 
Questionjava Pin
Member 1402833822-Oct-18 4:12
memberMember 1402833822-Oct-18 4:12 
AnswerRe: java Pin
Richard MacCutchan22-Oct-18 5:55
protectorRichard MacCutchan22-Oct-18 5:55 
GeneralRe: java Pin
Member 1402833822-Oct-18 6:56
memberMember 1402833822-Oct-18 6:56 
GeneralRe: java Pin
Richard MacCutchan22-Oct-18 8:42
protectorRichard MacCutchan22-Oct-18 8:42 
GeneralRe: java. Troll Pin
Mycroft Holmes22-Oct-18 13:02
memberMycroft Holmes22-Oct-18 13:02 
QuestionRuntime Error showing NumberFormatException: Kindly solve the error Pin
Member 1402130020-Oct-18 3:07
memberMember 1402130020-Oct-18 3:07 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.