Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-24035

Fix the deadlock issue caused by buffer listeners may not be notified

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    Description

      The buffer listeners are not notified when the the local buffer pool receives available notification from the global pool. This may cause potential deadlock issue:

      1. A LocalBufferPool is created, but there is no available buffers in the global NetworkBufferPool.
      2. The LocalBufferPool registers an available buffer listener to the global NetworkBufferPool.
      3. The BufferManager requests buffers from the LocalBufferPool but no buffer is available. As a result, it registers an available buffer listener to the LocalBufferPool.
      4. A buffer is recycled to the global pool and the local buffer pool is notified about the available buffer.
      5. The local buffer pool requests the available buffer from the global pool but the registered available buffer listener of BufferManager is not notified and it can never get a chance to be notified so deadlock occurs.

      Attachments

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            kevin.cyj Yingjie Cao
            kevin.cyj Yingjie Cao
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment