MINA SSHD
  1. MINA SSHD
  2. SSHD-178

Possible deadlock in client when getting SSH_MSG_DISCONNECT on invalid channel

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.7.0
    • Fix Version/s: 0.9.0
    • Labels:
      None
    • Environment:
      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.

        Issue Links

          Activity

          Alon Bar-Lev created issue -
          Guillaume Nodet made changes -
          Field Original Value New Value
          Link This issue is related to SSHD-238 [ SSHD-238 ]
          Guillaume Nodet made changes -
          Summary client lockup when getting SSH_MSG_DISCONNECT on invalid channel Possible deadlock in client when getting SSH_MSG_DISCONNECT on invalid channel
          Guillaume Nodet made changes -
          Status Open [ 1 ] Resolved [ 5 ]
          Assignee Guillaume Nodet [ gnt ]
          Fix Version/s 0.9.0 [ 12323301 ]
          Resolution Fixed [ 1 ]

            People

            • Assignee:
              Guillaume Nodet
              Reporter:
              Alon Bar-Lev
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development