mina-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (SSHD-851) Last chunk of data lost into local port forwarding channel
Date Tue, 23 Oct 2018 10:04:00 GMT

    [ https://issues.apache.org/jira/browse/SSHD-851?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16660375#comment-16660375

ASF GitHub Bot commented on SSHD-851:

GitHub user robertodeandrea opened a pull request:


    Br ssh851

    This is my proposed code change to fix SSHD-851.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/robertodeandrea/mina-sshd br-SSH851

Alternatively you can review and apply these changes as the patch at:


To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #73
commit 9f2d49a97963d9f4330d96578142d67e06b44c07
Author: roberto.deandrea <roberto.deandrea@...>
Date:   2018-10-09T07:37:46Z

    SSHD-848 Proposed change code

commit ffc29c475cb6b0240807c7f20680e5a5a2c0db76
Author: roberto.deandrea <roberto.deandrea@...>
Date:   2018-10-10T06:48:44Z

    SSHD-848 Removed misleading comment.

commit 851b22fc431e4ed6ba440874f236d93a6aca9827
Author: roberto.deandrea <roberto.deandrea@...>
Date:   2018-10-15T14:43:59Z

    SSHD-849 Potential fix

commit 1970d8d045e1a40e64864157cc6d21591e1ca69e
Author: roberto.deandrea <roberto.deandrea@...>
Date:   2018-10-16T06:53:43Z

    Merge remote-tracking branch 'upstream/master'
    # Conflicts:
    #	sshd-core/src/main/java/org/apache/sshd/common/forward/DefaultForwardingFilter.java

commit 4523138ee2b4efa483bc956e8769eafb13eff05d
Author: roberto.deandrea <roberto.deandrea@...>
Date:   2018-10-22T12:00:19Z

    SSHD-849 Working code for us

commit d2d8d84293c5c50413747cc7ab00217d16e8f39e
Author: roberto.deandrea <roberto.deandrea@...>
Date:   2018-10-23T10:01:22Z

    [SSHD-851] Proposed fix for this issue


> Last chunk of data lost into local port forwarding channel
> ----------------------------------------------------------
>                 Key: SSHD-851
>                 URL: https://issues.apache.org/jira/browse/SSHD-851
>             Project: MINA SSHD
>          Issue Type: Bug
>    Affects Versions: 2.1.1
>            Reporter: Roberto Deandrea
>            Priority: Major
>         Attachments: sshd.agent.trace
> Hi Lyor,
> I found another problem transferring data through a local port forwarding channel.
> It seems that the problem is located into Apache SSHD server code according to me.
> All the data are transferred from the originating client to the Apache SSH client and
then go to the SSHD server through a local port forwarding channel.
> When the client stops sending data, and the channel is being closed,  the SSHD server
fail to send the last chunk of data to the target destination.
> In the attached trace file the problem is isolated as the following:
> *local port forwarding channel : [id=732 recipient=732]*
> *Nio2Session[local=/0:0:0:0:0:0:0:0:50047, remote=/ session against
target server*
> Looking through the traces I see that when the local port forwarding channel is closed,
the Nio2Session against the target server is closed gracefully, but instead of waiting to
complete pending socket writes to the target server the Nio2Session is then closed immediately
causing write failures.
> In the traces I see:
> 2018-10-16 16:20:19,167 DEBUG [xdmzdriverssh@/]]-thread-1] [AbstractCloseable.close]
close(Nio2Session[local=/0:0:0:0:0:0:0:0:50047, remote=/]) Closing gracefully
> 2018-10-16 16:20:19,167 DEBUG [xdmzdriverssh@/]]-thread-2] [AbstractCloseable.close]
close(org.apache.sshd.common.io.nio2.Nio2Connector@77fcff14) Closing immediately^M
> 2018-10-16 16:20:19,167 DEBUG [xdmzdriverssh@/]]-thread-2] [AbstractCloseable.close]
close(Nio2Session[local=/0:0:0:0:0:0:0:0:50047, remote=/]) Closing immediately
> After that  I see:
> 2018-10-16 16:20:19,167 DEBUG [xdmzdriverssh@/]]-thread-2] [Nio2Session.doCloseImmediately]
doCloseImmediately(Nio2Session[local=/0:0:0:0:0:0:0:0:50047, remote=/])
signal write abort for future=Nio2DefaultIoWriteFuture[id=/][value=null]
> 2018-10-16 16:20:19,167 DEBUG [xdmzdriverssh@/]]-thread-2] [TcpipServerChannel.handleWriteDataFailure]
handleWriteDataFailure(TcpipServerChannel[id=732, recipient=732]-ServerSessionImpl[aixdmzdriverssh@/])[SSH_MSG_CHANNEL_DATA]
failed (WriteAbortedException) to write len=16384: Write request aborted due to immediate
session close
> These errors are repeated multiple times.
> The sum of bytes not written are equal to the chunk of data missing ad the target server.
> Can you troubleshoot this problem?
> Let me know if you need more info.
> Cheers
> Roberto

This message was sent by Atlassian JIRA

View raw message