mina-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alla Gofman (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (SSHD-931) SftpSubsystem.destroy() will terminate external FixedThreadPool ExecutorService - preventing re-connects
Date Mon, 05 Aug 2019 11:49:00 GMT

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

Alla Gofman commented on SSHD-931:
----------------------------------

What is a purpose of {{NoCloseExecutor}} if after the 1st SFTP session it will be marked
as being shut down and thus not allow another connection?
After all this is equivalent to being shutdown, such executor is useless.

With new fix I will need to inherit from {{NoCloseExecutor}} and override all it's methods?
Am I right?

> SftpSubsystem.destroy() will terminate external FixedThreadPool ExecutorService - preventing
re-connects
> --------------------------------------------------------------------------------------------------------
>
>                 Key: SSHD-931
>                 URL: https://issues.apache.org/jira/browse/SSHD-931
>             Project: MINA SSHD
>          Issue Type: Bug
>    Affects Versions: 2.2.0
>         Environment: Linux RH
>            Reporter: Alla Gofman
>            Assignee: Goldstein Lyor
>            Priority: Major
>             Fix For: 2.3.1
>
>
> Similar bug from the 1.2.0 version
> https://issues.apache.org/jira/browse/SSHD-669
>  
> In SftpSubsystem on performing the destroy logic (on a client disconnect f.e.), the code
will also terminate the current executor service as well.
> [https://github.com/apache/mina-sshd/blob/master/sshd-sftp/src/main/java/org/apache/sshd/server/subsystem/sftp/SftpSubsystem.java#L1001]
>  *** There is no shutdownExecutor parameter in SftpSubsystem.
>  
> 2019-07-14 19:00:14,236 ERROR [sshd-FactoryExecutorService-thread-1] (SftpSubsystem:316)
- run(ServerSessionImpl[user1@DOMAIN/137.72.216.21:50597]) InterruptedException caught in
SFTP subsystem: null
> 2019-07-14 19:00:14,236 DEBUG [sshd-FactoryExecutorService-thread-1] (SftpSubsystem:319)
- run(ServerSessionImpl[user1@il-agofman-w2.adprod.bmc.com/137.72.216.21:50597]) caught exception
details
> java.lang.InterruptedException: null
>  at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.reportInterruptAfterWait(AbstractQueuedSynchronizer.java:2056)
~[?:?]
>  at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2090)
~[?:?]
>  at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:433) ~[?:?]
>  at org.apache.sshd.server.subsystem.sftp.SftpSubsystem.run(SftpSubsystem.java:304) [sshd-sftp-2.2.0.jar!/:2.2.0]
>  at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) [?:?]
>  at java.util.concurrent.FutureTask.run(FutureTask.java:264) [?:?]
>  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
>  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
>  at java.lang.Thread.run(Thread.java:834) [?:?]
> ----------------------------------------------------------------------------------------------------------------------
> Using protectExecutorServiceShutdown wrapper with shutdownOnExit = false will not solve
the problem due to another exception thrown from NoCloseExecutor by
> ValidateUtils.checkState(!isShutdown(), "Executor has been shut down");
> ***The second time !isShutdown() issues it will return true!!!
> [https://github.com/apache/mina-sshd/blob/master/sshd-common/src/main/java/org/apache/sshd/common/util/threads/NoCloseExecutor.java#L66]
> 2019-07-12 22:18:07,097 ERROR [sshd-SshServer[3245efdb](port=1222)-nio2-thread-8] (HubSftpSubsystemWrapper:274)
- Failed (IllegalStateException) to start command: java.lang.IllegalStateException: Executor
has been shut down
> java.lang.IllegalStateException: Executor has been shut down
>  at org.apache.sshd.common.util.ValidateUtils.createFormattedException(ValidateUtils.java:213)
~[sshd-common-2.2.0.jar!/:2.2.0]
>  at org.apache.sshd.common.util.ValidateUtils.throwIllegalStateException(ValidateUtils.java:207)
~[sshd-common-2.2.0.jar!/:2.2.0]
>  at org.apache.sshd.common.util.ValidateUtils.checkState(ValidateUtils.java:184) ~[sshd-common-2.2.0.jar!/:2.2.0]
>  at org.apache.sshd.common.util.threads.NoCloseExecutor.submit(NoCloseExecutor.java:66)
~[sshd-common-2.2.0.jar!/:2.2.0]
>  



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)

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


Mime
View raw message