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/11/10 09:15:23 UTC

[GitHub] [mina-sshd] robober opened a new issue, #268: Heartbeat does not respond to timeout while waiting for a response from the server

robober opened a new issue, #268:
URL: https://github.com/apache/mina-sshd/issues/268

   If heartbeat is waiting for a response from the server and the response did not come within the allotted time, then we must kill the session because the server is not responding, in which case the lack of response to waiting for a response in `ClientConnectionService.sendHeartBeat` looks like wrong behavior.
   
   Should we do something like
   `
   if (!replyReceived.await(toWait, TimeUnit.MILLISECONDS)) {  
     throw new TimeoutException("No response from server");  
   }
   `
   when waiting response on heartbeat request
   
   Am I understanding heartbeat logic correctly?


-- 
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.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] Brikman commented on issue #268: Heartbeat does not respond to timeout while waiting for a response from the server

Posted by GitBox <gi...@apache.org>.
Brikman commented on issue #268:
URL: https://github.com/apache/mina-sshd/issues/268#issuecomment-1311185690

   @tomaswolf can you explain in more detail please?
   
   Did I understand correctly that you are proposing to roll back and generally refuse to wait for a response to a heartbeat?
   
   Are there any disadvantages or fundamental errors in the solution proposed by @robober? Is it correct in principle to wait response to every heartbeat?


-- 
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] Brikman commented on issue #268: Heartbeat does not respond to timeout while waiting for a response from the server

Posted by GitBox <gi...@apache.org>.
Brikman commented on issue #268:
URL: https://github.com/apache/mina-sshd/issues/268#issuecomment-1311330412

   Thank you for explanation.
   
   In this case, we will use our modified heartbeat for a while, waiting for fix in library.


-- 
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 closed issue #268: Heartbeat does not respond to timeout while waiting for a response from the server

Posted by GitBox <gi...@apache.org>.
tomaswolf closed issue #268: Heartbeat does not respond to timeout while waiting for a response from the server
URL: https://github.com/apache/mina-sshd/issues/268


-- 
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 issue #268: Heartbeat does not respond to timeout while waiting for a response from the server

Posted by GitBox <gi...@apache.org>.
tomaswolf commented on issue #268:
URL: https://github.com/apache/mina-sshd/issues/268#issuecomment-1310885955

   Looks like you've found a bug. Indeed we neglect to deal with the return value of the await() call. On second thought, I have the impression [this change in this class](https://github.com/apache/mina-sshd/compare/de2f8fe%5E1..de2f8fe?diff=split#diff-1cfe7fd6a3df291f0d07edc0391630772802689c6e5a0e37f16b4b6443e0fedaL128) should just be rolled back. It has no benefit at all.


-- 
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 issue #268: Heartbeat does not respond to timeout while waiting for a response from the server

Posted by GitBox <gi...@apache.org>.
tomaswolf commented on issue #268:
URL: https://github.com/apache/mina-sshd/issues/268#issuecomment-1311312110

   > proposing to roll back
   
   Yes.
   
   > and generally refuse to wait for a response to a heartbeat?
   
   No. Seems to me that rolling back would use the synchronous `session.request()` method (again), which does wait for the response and which does throw a `SocketTimeoutException` if a timeout occurs. If that is correct, then rolling back would be the preferred solution since it simplifies the code quite a bit.
   
   > Are there any disadvantages or fundamental errors in the solution proposed by @robober?
   
   No. But looking back at this code, I don't see anymore why I even changed it. Using the asynchronous global request but then waiting on the latch is still blocking of course. But heartbeats are sent from separate threads anyway, so this doesn't block an I/O thread.
   
   


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