Re: [VOTE] Release Mina SSHD 2.12.1
Hi Gary, I have Docker 2.25.2 running on my Mac. $ docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES b3cfc446e8f4 testcontainers/ryuk:0.3.3 "/app"23 seconds ago Up 22 seconds 0.0.0.0:60997->8080/tcp testcontainers-ryuk-6366f9f8-f922-41c8-b2b1-3e30dd1e4671 or $ docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 1d69e8b3f633 localhost/testcontainers/tx3g8n6fh63vansg:latest "/usr/sbin/sshd -D -…" 2 seconds agoUp 2 seconds 0.0.0.0:61124->22/tcp quizzical_lederberg b3cfc446e8f4 testcontainers/ryuk:0.3.3 so basically, it works. It sometimes asks me for my KeyChain password. On 10/02/2024 17:42, Gary Gregory wrote: I just updated to DD 4.27.2 (137060), it crashed on the restart and asked me to reset to factory settings, I did, then restarted DD. The UI says "engine running" run 'mvn clean verify" and the 1st reported failure is: [ERROR] Tests run: 6, Failures: 0, Errors: 6, Skipped: 0, Time elapsed: 0.078 s <<< FAILURE! -- in org.apache.sshd.client.auth.pubkey.HostBoundPubKeyAuthTest [ERROR] org.apache.sshd.client.auth.pubkey.HostBoundPubKeyAuthTest.testPubkeyAuth[user01_rsa_sha2_512_2048] -- Time elapsed: 0.075 s <<< ERROR! java.lang.IllegalStateException: Could not find a valid Docker environment. Please see logs and check configuration at org.testcontainers.dockerclient.DockerClientProviderStrategy.lambda$getFirstValidStrategy$4(DockerClientProviderStrategy.java:156) at java.base/java.util.Optional.orElseThrow(Optional.java:408) at org.testcontainers.dockerclient.DockerClientProviderStrategy.getFirstValidStrategy(DockerClientProviderStrategy.java:148) at org.testcontainers.DockerClientFactory.getOrInitializeStrategy(DockerClientFactory.java:146) at org.testcontainers.DockerClientFactory.client(DockerClientFactory.java:188) at org.testcontainers.DockerClientFactory$1.getDockerClient(DockerClientFactory.java:101) at com.github.dockerjava.api.DockerClientDelegate.authConfig(DockerClientDelegate.java:107) at org.testcontainers.containers.GenericContainer.start(GenericContainer.java:316) at org.testcontainers.containers.GenericContainer.starting(GenericContainer.java:1066) at org.testcontainers.containers.FailureDetectingExternalResource$1.evaluate(FailureDetectingExternalResource.java:29) I must be missing some requirements. The 'docker' app is not on my PATH. Is it on yours? Can you say 'docker ps' for example? Gary On Sat, Feb 10, 2024 at 11:32 AM Gary Gregory wrote: Hi Emmanuel: Yes: Docker Desktop 4.27.1 (136059) Gary On Sat, Feb 10, 2024 at 11:25 AM Emmanuel Lécharny wrote: Hi Gary, I had it working on my Mac, have you docker running before launching the test? On 10/02/2024 04:10, Gary Gregory wrote: Testing src zip file. - ASC OK - Eyeballing SHA512 is OK but can't be checked with "shasum --check apache-sshd-2.12.1-src.zip.sha512" - On macOS, with Docker running, the tests can't find it or download an image, if that's what it is trying to do: [ERROR] Errors: [ERROR] org.apache.sshd.client.auth.pubkey.HostBoundPubKeyAuthTest.testPubkeyAuth[user01_ecdsa_256] [ERROR] Run 1: HostBoundPubKeyAuthTest.testPubkeyAuth[user01_ecdsa_256] » IllegalState Previous attempts to find a Docker environment failed. Will not retry. Please see logs and check configuration This is with both Java 17 and 11. Any ideas? Gary On Tue, Feb 6, 2024 at 10:35 AM Guillaume Nodet wrote: I've staged a candidate release for an SSHD bug fix 2.12.1 release at: Official staging repo: https://dist.apache.org/repos/dist/dev/mina/sshd/2.12.1/ Maven staging repo: https://repository.apache.org/content/repositories/orgapachemina-1091 Git tag: https://github.com/apache/mina-sshd/commits/sshd-2.12.1 Changelog: https://github.com/apache/mina-sshd/blob/sshd-2.12.1/docs/changes/2.12.1.md Please review and vote ! -- Guillaume Nodet - To unsubscribe, e-mail: dev-unsubscr...@mina.apache.org For additional commands, e-mail: dev-h...@mina.apache.org - To unsubscribe, e-mail: dev-unsubscr...@mina.apache.org For additional commands, e-mail: dev-h...@mina.apache.org -- *Emmanuel Lécharny* P. +33 (0)6 08 33 32 61 elecha...@apache.org - To unsubscribe, e-mail: dev-unsubscr...@mina.apache.org For additional commands, e-mail: dev-h...@mina.apache.org -- *Emmanuel Lécharny* P. +33 (0)6 08 33 32 61 elecha...@apache.org - To unsubscribe, e-mail: dev-unsubscr...@mina.apache.org For additional commands, e-mail: dev-h...@mina.apache.org
[I] NullPointer in ChannelSession.closeImmediately0() leading to regular warning log spam [mina-sshd]
stephen-day opened a new issue, #465: URL: https://github.com/apache/mina-sshd/issues/465 ### Version 2.11.0 ### Bug description This method regularly produces a NullPointer which it immediately catches and logs as a warning before ignoring it. Hence, this is just warning log spam which makes it more difficult to identify true problems. ### Actual behavior The message of the NullPointerException: > Cannot invoke "org.apache.sshd.common.util.threads.CloseableExecutorService.shutdownNow()" because "this.pumperService" is null Makes it clear that the error is coming from this line of code: https://github.com/apache/mina-sshd/blob/master/sshd-core/src/main/java/org/apache/sshd/client/channel/ChannelSession.java#L174 The exception is immediately caught by the code a few lines down and logged as a warning. ``` if ((pumper != null) && (pumperService != null) && (!pumperService.isShutdown())) { try { if (!pumper.isDone()) { pumper.cancel(true); } ==> pumperService.shutdownNow(); } catch (Exception e) { // we log it as WARN since it is relatively harmless warn("doCloseImmediately({}) failed {} to shutdown stream pumper: {}", this, e.getClass().getSimpleName(), e.getMessage(), e); } ``` ### Expected behavior Avoid generating the NullPointerException (and hence avoid logging this as a warning). - Also suggest it's not ideal to catch `Exception` specifically because it can hide runtime errors like this. If possible, this should only catch exceptions that are expected to be thrown by the close processing (IOException/similar). My thoughts: - The pumperService is becoming null between the start of this method and the "pumperServer.shutdownNow()" line of code. - This NullPointer happens a lot and just gets logged as a warning. - While it could be a race condition with multiple threads in this method at the same time, that seems less likely. - Likely cause is that pumper.cancel() is itself closing the channel by indirectly calling closeImmediately0() which sets the values to null such that the pumperService is null on return to this method and the call to pumperService.shutdownNow() generates a NullPointer. Possible solutions: - Check for pumperService being null before calling shutdownNow() with a comment that pumper.cancel() can indirectly call closeImmediately0(). This is a quick fix, but seems a bit hacky. - At the start of the method, move pumper/pumperService to local variables and set the class members to null. This would prevent the indirect call to closeImmediately0() from pumper.cancel() from finding non-null values. But this approach would not work if any aspect of pumper.cancel() required access to these variables. - Safe approach if previous approach doesn't work: introduce a new class member `isClosingDown`/similar. Ensure this is false in the first `if` statement; set this to true before or at the start of the `try`. This will ensure that the indirect call to closeImmediately0() from pumper.cancel() does nothing (i.e. detects that we're already closing down) and returns to the original closeImmediately0() for the call to `pumperService.shutdownNow()`. ### Relevant log output ```Shell Warning message: doCloseImmediately([id=0, recipient=0]-ClientSessionImpl[...]) failed NullPointerException to shutdown stream pumper: Cannot invoke "org.apache.sshd.common.util.threads.CloseableExecutorService.shutdownNow()" because "this.pumperService" is null Stack trace at org.apache.sshd.common.util.logging.AbstractLoggingBean.warn(AbstractLoggingBean.java:114) at org.apache.sshd.client.channel.ChannelSession.closeImmediately0(ChannelSession.java:170) at org.apache.sshd.common.util.closeable.Builder$1.doClose(Builder.java:47) at org.apache.sshd.common.util.closeable.SimpleCloseable.close(SimpleCloseable.java:63) at org.apache.sshd.common.util.closeable.SequentialCloseable$1.operationComplete(SequentialCloseable.java:56) at org.apache.sshd.common.util.closeable.SequentialCloseable$1.operationComplete(SequentialCloseable.java:45) at org.apache.sshd.common.future.AbstractSshFuture.lambda$notifyListener$3(AbstractSshFuture.java:178) at org.apache.sshd.common.util.threads.ThreadUtils.runAsInternal(ThreadUtils.java:64) at org.apache.sshd.common.future.AbstractSshFuture.notifyListener(AbstractSshFuture.java:177) at org.apache.sshd.common.future.DefaultSshFuture.addListener(DefaultSshFuture.java:214) at org.apache.sshd.common.util.closeable.SequentialCloseable$1.operationComplete(SequentialCloseable.java:57) at org.apache.sshd.common.util.closea
Re: [VOTE] Release Mina SSHD 2.12.1
I just updated to DD 4.27.2 (137060), it crashed on the restart and asked me to reset to factory settings, I did, then restarted DD. The UI says "engine running" run 'mvn clean verify" and the 1st reported failure is: [ERROR] Tests run: 6, Failures: 0, Errors: 6, Skipped: 0, Time elapsed: 0.078 s <<< FAILURE! -- in org.apache.sshd.client.auth.pubkey.HostBoundPubKeyAuthTest [ERROR] org.apache.sshd.client.auth.pubkey.HostBoundPubKeyAuthTest.testPubkeyAuth[user01_rsa_sha2_512_2048] -- Time elapsed: 0.075 s <<< ERROR! java.lang.IllegalStateException: Could not find a valid Docker environment. Please see logs and check configuration at org.testcontainers.dockerclient.DockerClientProviderStrategy.lambda$getFirstValidStrategy$4(DockerClientProviderStrategy.java:156) at java.base/java.util.Optional.orElseThrow(Optional.java:408) at org.testcontainers.dockerclient.DockerClientProviderStrategy.getFirstValidStrategy(DockerClientProviderStrategy.java:148) at org.testcontainers.DockerClientFactory.getOrInitializeStrategy(DockerClientFactory.java:146) at org.testcontainers.DockerClientFactory.client(DockerClientFactory.java:188) at org.testcontainers.DockerClientFactory$1.getDockerClient(DockerClientFactory.java:101) at com.github.dockerjava.api.DockerClientDelegate.authConfig(DockerClientDelegate.java:107) at org.testcontainers.containers.GenericContainer.start(GenericContainer.java:316) at org.testcontainers.containers.GenericContainer.starting(GenericContainer.java:1066) at org.testcontainers.containers.FailureDetectingExternalResource$1.evaluate(FailureDetectingExternalResource.java:29) I must be missing some requirements. The 'docker' app is not on my PATH. Is it on yours? Can you say 'docker ps' for example? Gary On Sat, Feb 10, 2024 at 11:32 AM Gary Gregory wrote: > > Hi Emmanuel: > > Yes: Docker Desktop 4.27.1 (136059) > > Gary > > On Sat, Feb 10, 2024 at 11:25 AM Emmanuel Lécharny > wrote: > > > > Hi Gary, > > > > I had it working on my Mac, have you docker running before launching the > > test? > > > > On 10/02/2024 04:10, Gary Gregory wrote: > > > Testing src zip file. > > > > > > - ASC OK > > > - Eyeballing SHA512 is OK but can't be checked with "shasum --check > > > apache-sshd-2.12.1-src.zip.sha512" > > > - On macOS, with Docker running, the tests can't find it or download > > > an image, if that's what it is trying to do: > > > [ERROR] Errors: > > > [ERROR] > > > org.apache.sshd.client.auth.pubkey.HostBoundPubKeyAuthTest.testPubkeyAuth[user01_ecdsa_256] > > > [ERROR] Run 1: > > > HostBoundPubKeyAuthTest.testPubkeyAuth[user01_ecdsa_256] » > > > IllegalState Previous attempts to find a Docker environment failed. > > > Will not retry. Please see logs and check configuration > > > > > > This is with both Java 17 and 11. > > > > > > Any ideas? > > > > > > Gary > > > > > > > > > On Tue, Feb 6, 2024 at 10:35 AM Guillaume Nodet wrote: > > >> > > >> I've staged a candidate release for an SSHD bug fix 2.12.1 release at: > > >> Official staging repo: > > >>https://dist.apache.org/repos/dist/dev/mina/sshd/2.12.1/ > > >> Maven staging repo: > > >>https://repository.apache.org/content/repositories/orgapachemina-1091 > > >> Git tag: > > >>https://github.com/apache/mina-sshd/commits/sshd-2.12.1 > > >> Changelog: > > >> > > >> https://github.com/apache/mina-sshd/blob/sshd-2.12.1/docs/changes/2.12.1.md > > >> > > >> Please review and vote ! > > >> > > >> -- > > >> > > >> Guillaume Nodet > > >> > > >> - > > >> To unsubscribe, e-mail: dev-unsubscr...@mina.apache.org > > >> For additional commands, e-mail: dev-h...@mina.apache.org > > >> > > > > > > - > > > To unsubscribe, e-mail: dev-unsubscr...@mina.apache.org > > > For additional commands, e-mail: dev-h...@mina.apache.org > > > > > > > -- > > *Emmanuel Lécharny* P. +33 (0)6 08 33 32 61 > > elecha...@apache.org > > > > - > > To unsubscribe, e-mail: dev-unsubscr...@mina.apache.org > > For additional commands, e-mail: dev-h...@mina.apache.org > > - To unsubscribe, e-mail: dev-unsubscr...@mina.apache.org For additional commands, e-mail: dev-h...@mina.apache.org
Re: [VOTE] Release Mina SSHD 2.12.1
Hi Emmanuel: Yes: Docker Desktop 4.27.1 (136059) Gary On Sat, Feb 10, 2024 at 11:25 AM Emmanuel Lécharny wrote: > > Hi Gary, > > I had it working on my Mac, have you docker running before launching the > test? > > On 10/02/2024 04:10, Gary Gregory wrote: > > Testing src zip file. > > > > - ASC OK > > - Eyeballing SHA512 is OK but can't be checked with "shasum --check > > apache-sshd-2.12.1-src.zip.sha512" > > - On macOS, with Docker running, the tests can't find it or download > > an image, if that's what it is trying to do: > > [ERROR] Errors: > > [ERROR] > > org.apache.sshd.client.auth.pubkey.HostBoundPubKeyAuthTest.testPubkeyAuth[user01_ecdsa_256] > > [ERROR] Run 1: > > HostBoundPubKeyAuthTest.testPubkeyAuth[user01_ecdsa_256] » > > IllegalState Previous attempts to find a Docker environment failed. > > Will not retry. Please see logs and check configuration > > > > This is with both Java 17 and 11. > > > > Any ideas? > > > > Gary > > > > > > On Tue, Feb 6, 2024 at 10:35 AM Guillaume Nodet wrote: > >> > >> I've staged a candidate release for an SSHD bug fix 2.12.1 release at: > >> Official staging repo: > >>https://dist.apache.org/repos/dist/dev/mina/sshd/2.12.1/ > >> Maven staging repo: > >>https://repository.apache.org/content/repositories/orgapachemina-1091 > >> Git tag: > >>https://github.com/apache/mina-sshd/commits/sshd-2.12.1 > >> Changelog: > >> > >> https://github.com/apache/mina-sshd/blob/sshd-2.12.1/docs/changes/2.12.1.md > >> > >> Please review and vote ! > >> > >> -- > >> > >> Guillaume Nodet > >> > >> - > >> To unsubscribe, e-mail: dev-unsubscr...@mina.apache.org > >> For additional commands, e-mail: dev-h...@mina.apache.org > >> > > > > - > > To unsubscribe, e-mail: dev-unsubscr...@mina.apache.org > > For additional commands, e-mail: dev-h...@mina.apache.org > > > > -- > *Emmanuel Lécharny* P. +33 (0)6 08 33 32 61 > elecha...@apache.org > > - > To unsubscribe, e-mail: dev-unsubscr...@mina.apache.org > For additional commands, e-mail: dev-h...@mina.apache.org > - To unsubscribe, e-mail: dev-unsubscr...@mina.apache.org For additional commands, e-mail: dev-h...@mina.apache.org
Re: [VOTE] Release Mina SSHD 2.12.1
Hi Gary, I had it working on my Mac, have you docker running before launching the test? On 10/02/2024 04:10, Gary Gregory wrote: Testing src zip file. - ASC OK - Eyeballing SHA512 is OK but can't be checked with "shasum --check apache-sshd-2.12.1-src.zip.sha512" - On macOS, with Docker running, the tests can't find it or download an image, if that's what it is trying to do: [ERROR] Errors: [ERROR] org.apache.sshd.client.auth.pubkey.HostBoundPubKeyAuthTest.testPubkeyAuth[user01_ecdsa_256] [ERROR] Run 1: HostBoundPubKeyAuthTest.testPubkeyAuth[user01_ecdsa_256] » IllegalState Previous attempts to find a Docker environment failed. Will not retry. Please see logs and check configuration This is with both Java 17 and 11. Any ideas? Gary On Tue, Feb 6, 2024 at 10:35 AM Guillaume Nodet wrote: I've staged a candidate release for an SSHD bug fix 2.12.1 release at: Official staging repo: https://dist.apache.org/repos/dist/dev/mina/sshd/2.12.1/ Maven staging repo: https://repository.apache.org/content/repositories/orgapachemina-1091 Git tag: https://github.com/apache/mina-sshd/commits/sshd-2.12.1 Changelog: https://github.com/apache/mina-sshd/blob/sshd-2.12.1/docs/changes/2.12.1.md Please review and vote ! -- Guillaume Nodet - To unsubscribe, e-mail: dev-unsubscr...@mina.apache.org For additional commands, e-mail: dev-h...@mina.apache.org - To unsubscribe, e-mail: dev-unsubscr...@mina.apache.org For additional commands, e-mail: dev-h...@mina.apache.org -- *Emmanuel Lécharny* P. +33 (0)6 08 33 32 61 elecha...@apache.org - To unsubscribe, e-mail: dev-unsubscr...@mina.apache.org For additional commands, e-mail: dev-h...@mina.apache.org
Re: 2.2.X unit tests failing
Most certainly a failure in state-machine, the only place where we use the cglib dependency: [INFO] -< org.apache.mina:mina-statemachine >-- [INFO] Building Apache MINA State Machine 2.2.4-SNAPSHOT [5/12] [INFO] ---[ bundle ]--- [INFO] [INFO] --- maven-dependency-plugin:3.6.0:tree (default-cli) @ mina-statemachine --- [INFO] org.apache.mina:mina-statemachine:bundle:2.2.4-SNAPSHOT [INFO] +- org.apache.mina:mina-core:bundle:2.2.4-SNAPSHOT:compile [INFO] +- com.agical.rmock:rmock:jar:2.0.2:test [INFO] | \- cglib:cglib-nodep:jar:2.1_2:test Looking at it... On 10/02/2024 16:05, Jonathan Valliere wrote: Could not initialize class net.sf.cglib.proxy.Enhancer -- *Emmanuel Lécharny* P. +33 (0)6 08 33 32 61 elecha...@apache.org - To unsubscribe, e-mail: dev-unsubscr...@mina.apache.org For additional commands, e-mail: dev-h...@mina.apache.org
2.2.X unit tests failing
I pulled 2.2.X down on my Mac today and many of the unit tests are failing if I try to run ALL of them. Many are related to this issue: Could not initialize class net.sf.cglib.proxy.Enhancer Any ideas? mina-core does pass all of the tests.