tomaswolf opened a new issue, #409: URL: https://github.com/apache/mina-sshd/issues/409
### Version 2.10.0 ### Bug description From the [mailing list](https://www.mail-archive.com/users@mina.apache.org/msg07002.html): Attached code causes circa 50 exceptions: ``` public static void main(String[] args) throws Exception { for (int i = 0; i < 100; i++) { SshServer sshd = SshServer.setUpDefaultServer(); SimpleGeneratorHostKeyProvider hostKeyProvider = new SimpleGeneratorHostKeyProvider( Paths.get(".", "cert")); hostKeyProvider.setAlgorithm(KeyUtils.RSA_ALGORITHM); sshd.setKeyPairProvider(hostKeyProvider); sshd.start(); sshd.stop(false); } } ``` ### Actual behavior Lots of exceptions about an already shut down ExecutorService are logged. This occurs on Windows only; it's not reproducible on Linux. ### Expected behavior No exceptions are logged; the server shuts down cleanly. ### Relevant log output ```Shell Exception in thread "Thread-3" Exception in thread "Thread-2" java.lang.IllegalStateException: Executor has been shut down at org.apache.sshd.common.util.ValidateUtils.createFormattedException(ValidateUtils.java:213) at org.apache.sshd.common.util.ValidateUtils.throwIllegalStateException(ValidateUtils.java:207) at org.apache.sshd.common.util.ValidateUtils.checkState(ValidateUtils.java:184) at org.apache.sshd.common.util.threads.NoCloseExecutor.execute(NoCloseExecutor.java:100) at java.base/sun.nio.ch.AsynchronousChannelGroupImpl.executeOnPooledThread(AsynchronousChannelGroupImpl.java:190) at java.base/sun.nio.ch.Invoker.invokeIndirectly(Invoker.java:215) at java.base/sun.nio.ch.Invoker.invokeIndirectly(Invoker.java:316) at java.base/sun.nio.ch.WindowsAsynchronousServerSocketChannelImpl$AcceptTask.failed(WindowsAsynchronousServerSocketChannelImpl.java:288) at java.base/sun.nio.ch.Iocp$EventHandlerTask.run(Iocp.java:389) at java.base/java.lang.Thread.run(Thread.java:1589) ``` ### Other information OS: Windows Originally reported using temurin 19.0.2.7 and Apache MINA sshd 2.10.0, but it also occurs with other JVMs/JDKs. -- 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-unsubscr...@mina.apache.org.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@mina.apache.org For additional commands, e-mail: dev-h...@mina.apache.org