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

Possible deadlock in client when getting SSH_MSG_DISCONNECT on invalid channel

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 0.7.0
    • 0.9.0
    • None
    • java version "1.7.0_05"
      OpenJDK Runtime Environment (IcedTea7 2.2.1) (Gentoo build 1.7.0_05-b21)
      OpenJDK 64-Bit Server VM (build 23.0-b21, mixed mode)

    Description

      In some cases the channel closes before the last message is sent (or so I understand from the log)

      I can reproduce this easily when running very short commands.


      6265 [NioProcessor-20] INFO org.apache.sshd.client.channel.ChannelExec - Send SSH_MSG_CHANNEL_REQUEST exec
      6373 [NioProcessor-20] INFO org.apache.sshd.client.channel.ChannelExec - Received SSH_MSG_CHANNEL_REQUEST on channel 0
      6374 [main] INFO org.apache.sshd.client.channel.ChannelExec - Send SSH_MSG_CHANNEL_OPEN on channel 1
      7374 [NioProcessor-20] INFO org.apache.sshd.client.session.ClientSessionImpl - Received SSH_MSG_DISCONNECT (reason=2, msg=Received data for nonexistent channel 0.)

      When getting this SSH_MSG_DISCONNECT message the client is timed out waiting for CLOSED/EOF.

      Not sure where the problem is, but it seems like the client is closed and the program is not notified, or the message on the closed channel alter the behaviour.

      If add some debug messages it happens less frequent, so I guess this is race/synchronization issue.

      I will happy to provide any additional required information.

      Attachments

        Issue Links

          Activity

            People

              gnodet Guillaume Nodet
              alonbl Alon Bar-Lev
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: