From dev-return-33725-archive-asf-public=cust-asf.ponee.io@mina.apache.org Mon Oct 29 19:35:07 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id 05A9118077A for ; Mon, 29 Oct 2018 19:35:06 +0100 (CET) Received: (qmail 53650 invoked by uid 500); 29 Oct 2018 18:35:06 -0000 Mailing-List: contact dev-help@mina.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@mina.apache.org Delivered-To: mailing list dev@mina.apache.org Received: (qmail 53626 invoked by uid 99); 29 Oct 2018 18:35:06 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 29 Oct 2018 18:35:06 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id A422C1A5B67 for ; Mon, 29 Oct 2018 18:35:05 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -110.301 X-Spam-Level: X-Spam-Status: No, score=-110.301 tagged_above=-999 required=6.31 tests=[ENV_AND_HDR_SPF_MATCH=-0.5, RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001, USER_IN_DEF_SPF_WL=-7.5, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id zE5GUsuiIAvO for ; Mon, 29 Oct 2018 18:35:04 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id 4E6F45F405 for ; Mon, 29 Oct 2018 18:35:04 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id B21E6E00A6 for ; Mon, 29 Oct 2018 18:35:03 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 3FCC727762 for ; Mon, 29 Oct 2018 18:35:03 +0000 (UTC) Date: Mon, 29 Oct 2018 18:35:03 +0000 (UTC) From: "Goldstein Lyor (JIRA)" To: dev@mina.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (SSHD-851) Last chunk of data lost into local port forwarding channel MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/SSHD-851?page=3Dcom.atlassian.j= ira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D166675= 76#comment-16667576 ]=20 Goldstein Lyor commented on SSHD-851: ------------------------------------- {quote} can you suggest another way to solve this issue ? {quote} Sorry, not off-hand. May I suggest you try and post this on the {{dev@mina.= apache.org}} mailing list - perhaps someone can come up with an idea (or ma= ybe convince me that it is OK to forego the asynchronous close...) > 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 accordi= ng to me. > All the data are transferred from the originating client to the Apache SS= H client and then go to the SSHD server through a local port forwarding cha= nnel. > When the client stops sending data, and the channel is being closed,=C2= =A0 the SSHD server fail to send the last chunk of data to the target desti= nation. > In the attached trace file the problem is isolated as the following: > *local port forwarding channel : [id=3D732 recipient=3D732]* > *Nio2Session[local=3D/0:0:0:0:0:0:0:0:50047, remote=3D/192.168.2.107:6228= 4 session against target server* > Looking through the traces I see that when the local port forwarding chan= nel is closed, the Nio2Session against the target server is closed graceful= ly, 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@/192.168.10.34:55335]]-threa= d-1] [AbstractCloseable.close] close(Nio2Session[local=3D/0:0:0:0:0:0:0:0:5= 0047, remote=3D/192.168.2.107:62284]) Closing gracefully > 2018-10-16 16:20:19,167 DEBUG [xdmzdriverssh@/192.168.10.34:55335]]-threa= d-2] [AbstractCloseable.close] close(org.apache.sshd.common.io.nio2.Nio2Con= nector@77fcff14) Closing immediately^M > 2018-10-16 16:20:19,167 DEBUG [xdmzdriverssh@/192.168.10.34:55335]]-threa= d-2] [AbstractCloseable.close] close(Nio2Session[local=3D/0:0:0:0:0:0:0:0:5= 0047, remote=3D/192.168.2.107:62284]) Closing immediately > After that=C2=A0 I see: > 2018-10-16 16:20:19,167 DEBUG [xdmzdriverssh@/192.168.10.34:55335]]-threa= d-2] [Nio2Session.doCloseImmediately] doCloseImmediately(Nio2Session[local= =3D/0:0:0:0:0:0:0:0:50047, remote=3D/192.168.2.107:62284]) signal write abo= rt for future=3DNio2DefaultIoWriteFuture[id=3D/192.168.2.107:62284][value= =3Dnull] > 2018-10-16 16:20:19,167 DEBUG [xdmzdriverssh@/192.168.10.34:55335]]-threa= d-2] [TcpipServerChannel.handleWriteDataFailure] handleWriteDataFailure(Tcp= ipServerChannel[id=3D732, recipient=3D732]-ServerSessionImpl[aixdmzdriverss= h@/192.168.10.34:55335])[SSH_MSG_CHANNEL_DATA] failed (WriteAbortedExceptio= n) to write len=3D16384: Write request aborted due to immediate session clo= se > =C2=A0 > These errors are repeated multiple times. > The sum of bytes not written are equal to the chunk of data missing ad th= e target server. > Can you troubleshoot this problem? > Let me know if you need more info. > =C2=A0 > Cheers > Roberto > =C2=A0 -- This message was sent by Atlassian JIRA (v7.6.3#76005)