Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
1.16.0
-
None
Description
After adding the logic of recycling buffers in CompositeBuffer in https://issues.apache.org/jira/browse/FLINK-28373, when reading data and recycling buffers simultaneously, the deadlock between the lock of SortMergeResultPartition and the lock of SingleInputGate may occur.
In short, the deadlock may occur as follows.
1. SingleInputGate.getNextBufferOrEvent (SingleInputGate lock)
CompositeBuffer.getFullBufferData -> CompositeBuffer.recycleBuffer -> waiting for
SortMergeResultPartition lock;
2. ResultPartitionManager.releasePartition (SortMergeResultPartition lock) ->
SortMergeSubpartitionReader.notifyDataAvailable ->
SingleInputGate.notifyChannelNonEmpty -> waiting for SingleInputGate lock.
The possibility of this deadlock is very small, but we should fix the bug as soon as possible.
Attachments
Issue Links
- is caused by
-
FLINK-28373 Read a full buffer of data per file IO read request for sort-shuffle
-
- Resolved
-
- links to