Click here to Skip to main content
15,891,529 members
Home / Discussions / Java
   

Java

 
Questionjava Pin
Member 140430484-Nov-18 23:51
Member 140430484-Nov-18 23:51 
AnswerRe: java Pin
Richard MacCutchan5-Nov-18 5:17
mveRichard MacCutchan5-Nov-18 5:17 
AnswerRe: java Pin
mohit gite16-Nov-18 21:25
mohit gite16-Nov-18 21:25 
AnswerRe: java Pin
GiteHrudaya28-Nov-18 18:48
GiteHrudaya28-Nov-18 18:48 
AnswerRe: java Pin
GiteHrudaya2-Dec-18 22:59
GiteHrudaya2-Dec-18 22:59 
Questionjava Pin
mohit gite4-Nov-18 21:45
mohit gite4-Nov-18 21:45 
AnswerRe: java Pin
Richard MacCutchan4-Nov-18 23:05
mveRichard MacCutchan4-Nov-18 23:05 
AnswerRe: java Pin
GiteHrudaya29-Nov-18 23:13
GiteHrudaya29-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
Member 140430483-Nov-18 21:03 
AnswerRe: java Pin
Richard MacCutchan3-Nov-18 21:25
mveRichard MacCutchan3-Nov-18 21:25 
GeneralRe: java Pin
Member 140430483-Nov-18 21:38
Member 140430483-Nov-18 21:38 
GeneralRe: java Pin
Richard MacCutchan3-Nov-18 22:17
mveRichard MacCutchan3-Nov-18 22:17 
GeneralRe: java Pin
Member 140430483-Nov-18 22:25
Member 140430483-Nov-18 22:25 
GeneralRe: java Pin
Richard MacCutchan3-Nov-18 22:32
mveRichard MacCutchan3-Nov-18 22:32 
GeneralRe: java Pin
Member 140430483-Nov-18 23:02
Member 140430483-Nov-18 23:02 
GeneralRe: java Pin
Richard MacCutchan4-Nov-18 1:15
mveRichard MacCutchan4-Nov-18 1:15 
Questionjava Pin
mohit gite2-Nov-18 20:58
mohit gite2-Nov-18 20:58 
AnswerRe: java Pin
Richard MacCutchan2-Nov-18 23:06
mveRichard MacCutchan2-Nov-18 23:06 
GeneralRe: java Pin
mohit gite4-Nov-18 20:28
mohit gite4-Nov-18 20:28 
Questionjava Pin
Member 1402833822-Oct-18 4:12
Member 1402833822-Oct-18 4:12 
AnswerRe: java Pin
Richard MacCutchan22-Oct-18 5:55
mveRichard MacCutchan22-Oct-18 5:55 
GeneralRe: java Pin
Member 1402833822-Oct-18 6:56
Member 1402833822-Oct-18 6:56 
GeneralRe: java Pin
Richard MacCutchan22-Oct-18 8:42
mveRichard MacCutchan22-Oct-18 8:42 
GeneralRe: java. Troll Pin
Mycroft Holmes22-Oct-18 13:02
professionalMycroft Holmes22-Oct-18 13:02 
QuestionRuntime Error showing NumberFormatException: Kindly solve the error Pin
Member 1402130020-Oct-18 3:07
Member 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.