Uploaded image for project: 'MINA SSHD'
  1. MINA SSHD
  2. SSHD-72

Deadlock in ChannelOutputStream

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Critical
    • Resolution: Not A Problem
    • None
    • None
    • None

    Description

      Its possible for ChannelOutputStream to cause an NioProcessor to deadlock.

      ChannelOutputStream takes and holds the lock on itself during write(), flush() and close().

      The AbstractSession tries to take the lock on ChannelOutputStream when it calls close() when a client disconnects and a stream is still active.

      If the ChannelOutputStream writes the full window size, during flush(), while the lock is held, it goes to sleep until the window notifies it of having more data available. With the lock held, the NioProcessor can't call close(), and deadlocks.

      Attachments

        Issue Links

          Activity

            People

              spearce Shawn Pearce
              spearce Shawn Pearce
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: