Details
-
Bug
-
Status: Resolved
-
Normal
-
Resolution: Fixed
-
None
-
Availability - Unavailable
-
Normal
-
Normal
-
User Report
-
All
-
None
-
Description
Recently, I found a cassandra(3.11.4) node stuck in STARTING status for a long time.
I used jstack to saw what happened. The main thread stuck in AbstractCommitLogSegmentManager.awaitAvailableSegment
The strange thing is COMMIT-LOG-ALLOCATOR thread state was runnable but it was not actually running.
And then I used pstack to troubleshoot. I found COMMIT-LOG-ALLOCATOR block on java class initialization.
This is a deadlock obviously. CommitLog waits for a CommitLogSegment when initializing. In this moment, the CommitLog class is not initialized and the main thread holds the class lock. After that, COMMIT-LOG-ALLOCATOR creates a CommitLogSegment with exception and call CommitLog.handleCommitError(static method). COMMIT-LOG-ALLOCATOR will block on this line because CommitLog class is still initializing.
Attachments
Attachments
Issue Links
- causes
-
CASSANDRA-15692 NPE in ConnectionBurnTest
- Resolved
- links to