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/08/31 20:56:35 UTC

[GitHub] [mina-sshd] knalli opened a new pull request, #241: [SSHD-1293] Fix unbinding port forwarding for auto-alloc port

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

   This fixes de-allocating / unbinding a local port forwarding binding when using a dynamic auto-allocated port.
   
   The information "localAddress" is controlled by the user and may contain still a port `0` which means auto-allocating a local port; the actual local port is available in 'boundAddress". However, "DefaultForwarder" tracks
   the actual port mappings only.
   
   I have run the tests locally with a Java 8 without issues.
   
   Related issue https://issues.apache.org/jira/browse/SSHD-1293
   
   I also added an additional commit modifying the test covering the missing signal. If you are fine with this, I'd squash them. Or maybe as an additional test?


-- 
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] knalli commented on pull request #241: [SSHD-1293] Fix unbinding port forwarding for auto-alloc port

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

   Note: The existing test `testLocalForwardingNative` isn't covering this (anymore) because the semaphore `tearDownSignal` is checked in the events (like `tornDownExplicitTunnel`) only -- and these events aren't called anymore! This is maybe a bigger issue actually and the root cause is the combined try-with-resources like
   
   ```
           try (ClientSession session = createNativeSession(listener);
                ExplicitPortForwardingTracker tracker = session.createLocalPortForwardingTracker(new SshdSocketAddress("", 0),
                        new SshdSocketAddress(TEST_LOCALHOST, echoPort))) {
   ```
   
   Closing the session will "destroy" everything, but there is no check if the destroy has happen after closing the tracker only.


-- 
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 #241: [SSHD-1293] Fix unbinding port forwarding for auto-alloc port

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

   > Oops.. I missed your comment. Squash & rebase done.
   
   Guess you didn't notice that I had already done so. I just hadn't merged yet.


-- 
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] knalli commented on pull request #241: [SSHD-1293] Fix unbinding port forwarding for auto-alloc port

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

   Oops.. I missed your comment. Squash & rebase 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 commented on pull request #241: [SSHD-1293] Fix unbinding port forwarding for auto-alloc port

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

   > I've seen there are some changes in the forwarding topic in the meanwhile. Is it worth to check if there are other leaking situations maybe there? Or at least checking the tests cover the actual invocations (as noted in my 2nd comment here)?
   
   Sure. There were some strange failures still in port forwarding in the Github CI builds (not caused by your change). I cannot reproduce yet locally, but it seems there are still a few problems with port forwarding. The [failures I saw](https://github.com/apache/mina-sshd/actions/runs/3078358458/jobs/4973967007) are probably timing-related; the Github builds are much slower than on my local machine.
   
   There's also [this sporadic failure](https://github.com/apache/mina-sshd/actions/runs/3078358458/jobs/4973882256), which relates to SSHD-1256. That failure appears to reoccur only with the MINA transport; don't know yet why unbinding doesn't work or is slow sometimes.
   
   Any help in tracking down the causes of these failures would be greatly appreciated!


-- 
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 #241: [SSHD-1293] Fix unbinding port forwarding for auto-alloc port

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

   Looks good. Please rebase and squash the commits, then we can merge this.


-- 
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] knalli commented on pull request #241: [SSHD-1293] Fix unbinding port forwarding for auto-alloc port

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

   Oh, alright 🫠 
   
   I've seen there are some changes in the forwarding topic in the meanwhile. Is it worth to check if there are other leaking situations maybe there? Or at least checking the tests cover the actual invocations (as noted in my 2nd comment here)?


-- 
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 #241: [SSHD-1293] Fix unbinding port forwarding for auto-alloc port

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


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