[Note] Java class initialization deadlock deadlock once Cassandra troubleshooting

background

Recently, when the measured pressure of Cassandra, Cassandra found that a process has not been initialized. After investigation we found that the deadlock problem, this article will lead us to review the whole investigation process, learn how to troubleshoot Java deadlock problem, is a very worthwhile learning experience.

Investigation

1. problems found

After the first start is by Cassandra command nodetool netstatsobservation when to enter the NORMAL state. As shown below:
image
However, after a long time did not enter the NORMAL, it has been in the STARTING state.

2.jstack investigation

STARTING want to know why has been in a state, of course, it is Jstack to observe the process in the end what to do.
image

jstack display the main thread in the WAITING state. This is consistent with the phenomenon we observe, because it really has been stuck in the STARTING state did not go. The place is jammed main thread
AbstractCommitLogSegmentManager.awaitAvaila

Guess you like

Origin yq.aliyun.com/articles/718250