You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2022/03/31 13:52:00 UTC

[jira] [Work logged] (SSHD-1257) Shell is not getting closed if the command has already closed the OutputStream it is using.

     [ https://issues.apache.org/jira/browse/SSHD-1257?focusedWorklogId=750994&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-750994 ]

ASF GitHub Bot logged work on SSHD-1257:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 31/Mar/22 13:51
            Start Date: 31/Mar/22 13:51
    Worklog Time Spent: 10m 
      Work Description: Vlatombe opened a new pull request #214:
URL: https://github.com/apache/mina-sshd/pull/214


   [SSHD-1257](https://issues.apache.org/jira/browse/SSHD-1257)
   
   If the command implementation closes the output stream at the end of its execution, the ssh server hangs.
   This changes the `ChannelOutputStream#flush` to become a no-op if it has been closed already.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@mina.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Issue Time Tracking
-------------------

            Worklog Id:     (was: 750994)
    Remaining Estimate: 0h
            Time Spent: 10m

> Shell is not getting closed if the command has already closed the OutputStream it is using.
> -------------------------------------------------------------------------------------------
>
>                 Key: SSHD-1257
>                 URL: https://issues.apache.org/jira/browse/SSHD-1257
>             Project: MINA SSHD
>          Issue Type: Bug
>    Affects Versions: 2.9.0
>            Reporter: Vincent Latombe
>            Priority: Major
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> When running a org.apache.sshd.server.command.Command, if it happens to close the OutputStream instance it is using, then later when the ssh session closes, it attempts to flush the output stream before closing it.
> This causes theĀ  following warning to be printed on server side
> {code:java}
> WARNING o.a.s.s.channel.ChannelSession#lambda$prepareCommand$0: onExit(ChannelSession[id=0, recipient=0]-ServerSessionImpl[admin@/0:0:0:0:0:0:0:1:49944]) code=0 message='' SshChannelClosedException closing shell: flush(ChannelOutputStream[ChannelSession[id=0, recipient=0]-ServerSessionImpl[admin@/0:0:0:0:0:0:0:1:49944]] SSH_MSG_CHANNEL_DATA) length=0 - stream is already closed
> {code}
> and EOF is never sent to client.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@mina.apache.org
For additional commands, e-mail: dev-help@mina.apache.org