You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by GitBox <gi...@apache.org> on 2022/06/12 16:26:17 UTC

[GitHub] [mina-sshd] tomaswolf opened a new pull request, #227: SSHD-1055: Half-close port-forwarded socket on EOF in tunnel

tomaswolf opened a new pull request, #227:
URL: https://github.com/apache/mina-sshd/pull/227

   Propagate an EOF on a tunnel for port forwarding to the socket by
   shutting down its output; otherwise the client connected to that
   socket may hang.
   
   Fix the MINA transport back-end to not close the IoSession on
   half-closure; it may still be needed to transport data the other way.
   
   Enable half-closure in the Netty transport back-end.
   
   Fix the Nio2 transport back-end to not re-try accepting connections
   when the channel is already closing.
   
   Half-closed sockets seem to be badly supported by any of the transport
   back-ends and may lead to (harmless) AsynchronousCloseExceptions or
   ClosedByInterruptExceptions being logged when the connection is finally
   closed completely.
   
   See also SSHD-964 and SSHD-902.


-- 
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


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


[GitHub] [mina-sshd] tomaswolf commented on a diff in pull request #227: SSHD-1055: Half-close port-forwarded socket on EOF in tunnel

Posted by GitBox <gi...@apache.org>.
tomaswolf commented on code in PR #227:
URL: https://github.com/apache/mina-sshd/pull/227#discussion_r895227586


##########
sshd-core/pom.xml:
##########
@@ -110,6 +110,24 @@
             <artifactId>testcontainers</artifactId>
             <scope>test</scope>
         </dependency>
+        <dependency>
+            <groupId>io.grpc</groupId>
+            <artifactId>grpc-netty-shaded</artifactId>
+            <version>1.27.2</version>

Review Comment:
   Done.



-- 
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


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


[GitHub] [mina-sshd] tomaswolf merged pull request #227: SSHD-1055: Half-close port-forwarded socket on EOF in tunnel

Posted by GitBox <gi...@apache.org>.
tomaswolf merged PR #227:
URL: https://github.com/apache/mina-sshd/pull/227


-- 
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


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


[GitHub] [mina-sshd] tomaswolf commented on pull request #227: SSHD-1055: Half-close port-forwarded socket on EOF in tunnel

Posted by GitBox <gi...@apache.org>.
tomaswolf commented on PR #227:
URL: https://github.com/apache/mina-sshd/pull/227#issuecomment-1156165890

   All right. The MINA problems are resolved now. It looks as if this shutdownOutputStream() stuff was never tested with MINA at all; when SSHD-902 was done, the core tests didn't even run in the CI build with MINA.
   
   It now turns out that MINA doesn't like it at all when we fiddle around with the socket directly. My solution for MINA is to just close the session once all pending writes have been written. That's doable via standard MINA API (IoSession.closeOnFlush()), doesn't confuse the MINA select loop, doesn't cause slow-down as observed in the previous versions of this PR, and makes the new Sshd1055Test pass without causing problems for the other tests.
   
   Note that the new Sshd1055Test is disabled in the maven build because it uses testcontainers, and setting up testcontainers doesn't work well with the re-useable test JAR due to classpath problems (test resources are not found).
   
   I have run that new test manually with MINA and Netty, and it passes.
   
   With Nio2, it is run in the CI build.


-- 
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


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


[GitHub] [mina-sshd] tomaswolf commented on pull request #227: SSHD-1055: Half-close port-forwarded socket on EOF in tunnel

Posted by GitBox <gi...@apache.org>.
tomaswolf commented on PR #227:
URL: https://github.com/apache/mina-sshd/pull/227#issuecomment-1153808927

   Looks indeed like something is wrong with MINA now. It's in particular the sftp tests when run with MINA.


-- 
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


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


[GitHub] [mina-sshd] lgoldstein commented on a diff in pull request #227: SSHD-1055: Half-close port-forwarded socket on EOF in tunnel

Posted by GitBox <gi...@apache.org>.
lgoldstein commented on code in PR #227:
URL: https://github.com/apache/mina-sshd/pull/227#discussion_r895205770


##########
sshd-core/pom.xml:
##########
@@ -110,6 +110,24 @@
             <artifactId>testcontainers</artifactId>
             <scope>test</scope>
         </dependency>
+        <dependency>
+            <groupId>io.grpc</groupId>
+            <artifactId>grpc-netty-shaded</artifactId>
+            <version>1.27.2</version>

Review Comment:
   Let's use a property for the grpc version (D.R.Y.)



-- 
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


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


[GitHub] [mina-sshd] tomaswolf commented on pull request #227: SSHD-1055: Half-close port-forwarded socket on EOF in tunnel

Posted by GitBox <gi...@apache.org>.
tomaswolf commented on PR #227:
URL: https://github.com/apache/mina-sshd/pull/227#issuecomment-1153670945

   Some tests appear to run much slower now. In particular the sshd-mina and sshd-sftp tests. I didn't notice any such slowdown when building locally. Perhaps a fluke of the GitHub CI? But surely something that needs to be investigated. 


-- 
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


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