[jira] [Commented] (SSHD-635) potential hang in AuthFuture.verify(Long.MAX_VALUE) on error
[ https://issues.apache.org/jira/browse/SSHD-635?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15358890#comment-15358890 ] Goldstein Lyor commented on SSHD-635: - No problem - in any case, the code benefited from some extra mechanisms hat are supposed to prevent this issues. > potential hang in AuthFuture.verify(Long.MAX_VALUE) on error > > > Key: SSHD-635 > URL: https://issues.apache.org/jira/browse/SSHD-635 > Project: MINA SSHD > Issue Type: Bug >Reporter: Oliver Stöneberg > Attachments: ssh.log > > > It appears that after the SshClient.connect().verify() call was successful > the ClientSession.auth().verify() call might hang if the connection was > closed in-between those calls. If AuthFuture.verify() is called with a > timeout it correctly times out, but I would expect it to detect that the > connection is closed/closing and throw a proper error even without the > timeout. > The errors I see in the log are these (more completel log attached): > DEBUG [sshd-SshClient[329a1f8d]-nio2-thread-5] (Nio2Session.java:137) Caught > IOException[An established connection was aborted by the software in your > host machine] - calling handler > DEBUG [sshd-SshClient[329a1f8d]-nio2-thread-5] (Nio2Session.java:142) > Exception handler threw IllegalStateException, closing the session: No > session available > It's hard to debug for me since it only happens in a multi-threaded scenario > and I haven't been able to generate separate logs per session (is this even > possible?) -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (SSHD-635) potential hang in AuthFuture.verify(Long.MAX_VALUE) on error
[ https://issues.apache.org/jira/browse/SSHD-635?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15355155#comment-15355155 ] Oliver Stöneberg commented on SSHD-635: --- I am no longer able to reproduce this issue. As a matter of fact I was able to enable all of my the unit tests now and they are running without any issues now. I assume this was a network issue since even when using putty the server was sometimes forcefully close the connection and that also hasn't happen in a while. I reckon the hang is still potentially happening when the connection is somehow terminated by the server or something else in the network. But without any reproducible case I see nothing we can do now. So feel free to close this issue and thanks for looking into this. > potential hang in AuthFuture.verify(Long.MAX_VALUE) on error > > > Key: SSHD-635 > URL: https://issues.apache.org/jira/browse/SSHD-635 > Project: MINA SSHD > Issue Type: Bug >Reporter: Oliver Stöneberg > Attachments: ssh.log > > > It appears that after the SshClient.connect().verify() call was successful > the ClientSession.auth().verify() call might hang if the connection was > closed in-between those calls. If AuthFuture.verify() is called with a > timeout it correctly times out, but I would expect it to detect that the > connection is closed/closing and throw a proper error even without the > timeout. > The errors I see in the log are these (more completel log attached): > DEBUG [sshd-SshClient[329a1f8d]-nio2-thread-5] (Nio2Session.java:137) Caught > IOException[An established connection was aborted by the software in your > host machine] - calling handler > DEBUG [sshd-SshClient[329a1f8d]-nio2-thread-5] (Nio2Session.java:142) > Exception handler threw IllegalStateException, closing the session: No > session available > It's hard to debug for me since it only happens in a multi-threaded scenario > and I haven't been able to generate separate logs per session (is this even > possible?) -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (SSHD-635) potential hang in AuthFuture.verify(Long.MAX_VALUE) on error
[ https://issues.apache.org/jira/browse/SSHD-635?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15132255#comment-15132255 ] Oliver Stöneberg commented on SSHD-635: --- I have some tests I run against a server and if I execute those multi-threaded then the issue occurs very often. That's what I meant with reproducible. Unfortunately this didn't fix it. Some other verify() calls now get another error message but this still isn't working. I will try to debug it and get back to you soon - hopefully with more information. > potential hang in AuthFuture.verify(Long.MAX_VALUE) on error > > > Key: SSHD-635 > URL: https://issues.apache.org/jira/browse/SSHD-635 > Project: MINA SSHD > Issue Type: Bug >Reporter: Oliver Stöneberg > Attachments: ssh.log > > > It appears that after the SshClient.connect().verify() call was successful > the ClientSession.auth().verify() call might hang if the connection was > closed in-between those calls. If AuthFuture.verify() is called with a > timeout it correctly times out, but I would expect it to detect that the > connection is closed/closing and throw a proper error even without the > timeout. > The errors I see in the log are these (more completel log attached): > DEBUG [sshd-SshClient[329a1f8d]-nio2-thread-5] (Nio2Session.java:137) Caught > IOException[An established connection was aborted by the software in your > host machine] - calling handler > DEBUG [sshd-SshClient[329a1f8d]-nio2-thread-5] (Nio2Session.java:142) > Exception handler threw IllegalStateException, closing the session: No > session available > It's hard to debug for me since it only happens in a multi-threaded scenario > and I haven't been able to generate separate logs per session (is this even > possible?) -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (SSHD-635) potential hang in AuthFuture.verify(Long.MAX_VALUE) on error
[ https://issues.apache.org/jira/browse/SSHD-635?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15130432#comment-15130432 ] Oliver Stöneberg commented on SSHD-635: --- Thanks a lot. It's quite easy for me to reproduce this and now knowing which part of the code I have to look at for the error handling I should be able to get more insight in case your change didn't fix it. > potential hang in AuthFuture.verify(Long.MAX_VALUE) on error > > > Key: SSHD-635 > URL: https://issues.apache.org/jira/browse/SSHD-635 > Project: MINA SSHD > Issue Type: Bug >Reporter: Oliver Stöneberg > Attachments: ssh.log > > > It appears that after the SshClient.connect().verify() call was successful > the ClientSession.auth().verify() call might hang if the connection was > closed in-between those calls. If AuthFuture.verify() is called with a > timeout it correctly times out, but I would expect it to detect that the > connection is closed/closing and throw a proper error even without the > timeout. > The errors I see in the log are these (more completel log attached): > DEBUG [sshd-SshClient[329a1f8d]-nio2-thread-5] (Nio2Session.java:137) Caught > IOException[An established connection was aborted by the software in your > host machine] - calling handler > DEBUG [sshd-SshClient[329a1f8d]-nio2-thread-5] (Nio2Session.java:142) > Exception handler threw IllegalStateException, closing the session: No > session available > It's hard to debug for me since it only happens in a multi-threaded scenario > and I haven't been able to generate separate logs per session (is this even > possible?) -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (SSHD-635) potential hang in AuthFuture.verify(Long.MAX_VALUE) on error
[ https://issues.apache.org/jira/browse/SSHD-635?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15130505#comment-15130505 ] Goldstein Lyor commented on SSHD-635: - If you do find out, it would help if you could post some code that reproduces it since as you say {quote}It's quite easy for me to reproduce this{quote} > potential hang in AuthFuture.verify(Long.MAX_VALUE) on error > > > Key: SSHD-635 > URL: https://issues.apache.org/jira/browse/SSHD-635 > Project: MINA SSHD > Issue Type: Bug >Reporter: Oliver Stöneberg > Attachments: ssh.log > > > It appears that after the SshClient.connect().verify() call was successful > the ClientSession.auth().verify() call might hang if the connection was > closed in-between those calls. If AuthFuture.verify() is called with a > timeout it correctly times out, but I would expect it to detect that the > connection is closed/closing and throw a proper error even without the > timeout. > The errors I see in the log are these (more completel log attached): > DEBUG [sshd-SshClient[329a1f8d]-nio2-thread-5] (Nio2Session.java:137) Caught > IOException[An established connection was aborted by the software in your > host machine] - calling handler > DEBUG [sshd-SshClient[329a1f8d]-nio2-thread-5] (Nio2Session.java:142) > Exception handler threw IllegalStateException, closing the session: No > session available > It's hard to debug for me since it only happens in a multi-threaded scenario > and I haven't been able to generate separate logs per session (is this even > possible?) -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (SSHD-635) potential hang in AuthFuture.verify(Long.MAX_VALUE) on error
[ https://issues.apache.org/jira/browse/SSHD-635?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15128021#comment-15128021 ] Oliver Stöneberg commented on SSHD-635: --- Unfortunately it's a different issue and I am using 1.1 (or at least a prior revision very close to it). I am sure since I reported SSHD-600. > potential hang in AuthFuture.verify(Long.MAX_VALUE) on error > > > Key: SSHD-635 > URL: https://issues.apache.org/jira/browse/SSHD-635 > Project: MINA SSHD > Issue Type: Bug >Reporter: Oliver Stöneberg > Attachments: ssh.log > > > It appears that after the SshClient.connect().verify() call was successful > the ClientSession.auth().verify() call might hang if the connection was > closed in-between those calls. If AuthFuture.verify() is called with a > timeout it correctly times out, but I would expect it to detect that the > connection is closed/closing and throw a proper error even without the > timeout. > The errors I see in the log are these (more completel log attached): > DEBUG [sshd-SshClient[329a1f8d]-nio2-thread-5] (Nio2Session.java:137) Caught > IOException[An established connection was aborted by the software in your > host machine] - calling handler > DEBUG [sshd-SshClient[329a1f8d]-nio2-thread-5] (Nio2Session.java:142) > Exception handler threw IllegalStateException, closing the session: No > session available > It's hard to debug for me since it only happens in a multi-threaded scenario > and I haven't been able to generate separate logs per session (is this even > possible?) -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (SSHD-635) potential hang in AuthFuture.verify(Long.MAX_VALUE) on error
[ https://issues.apache.org/jira/browse/SSHD-635?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15129903#comment-15129903 ] Goldstein Lyor commented on SSHD-635: - I have looked into it and tried to create conditions that can lead to such a hang but cannot cause it (perhaps it is very difficult to time the events correctly). I have added a "defensive" check on the _ClientSessionImpl#preClose_ call to be on the safe side. The issue description states that it is a "potential" hang, so in the absence of some way to re-create or pinpoint it, this is the best I can do for now. > potential hang in AuthFuture.verify(Long.MAX_VALUE) on error > > > Key: SSHD-635 > URL: https://issues.apache.org/jira/browse/SSHD-635 > Project: MINA SSHD > Issue Type: Bug >Reporter: Oliver Stöneberg > Attachments: ssh.log > > > It appears that after the SshClient.connect().verify() call was successful > the ClientSession.auth().verify() call might hang if the connection was > closed in-between those calls. If AuthFuture.verify() is called with a > timeout it correctly times out, but I would expect it to detect that the > connection is closed/closing and throw a proper error even without the > timeout. > The errors I see in the log are these (more completel log attached): > DEBUG [sshd-SshClient[329a1f8d]-nio2-thread-5] (Nio2Session.java:137) Caught > IOException[An established connection was aborted by the software in your > host machine] - calling handler > DEBUG [sshd-SshClient[329a1f8d]-nio2-thread-5] (Nio2Session.java:142) > Exception handler threw IllegalStateException, closing the session: No > session available > It's hard to debug for me since it only happens in a multi-threaded scenario > and I haven't been able to generate separate logs per session (is this even > possible?) -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (SSHD-635) potential hang in AuthFuture.verify(Long.MAX_VALUE) on error
[ https://issues.apache.org/jira/browse/SSHD-635?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15128191#comment-15128191 ] Goldstein Lyor commented on SSHD-635: - You are right - I think I can see where something like this could be missed - looks simple enough to fix, but it will take some time to write a unit test that creates the right conditions for testing it. > potential hang in AuthFuture.verify(Long.MAX_VALUE) on error > > > Key: SSHD-635 > URL: https://issues.apache.org/jira/browse/SSHD-635 > Project: MINA SSHD > Issue Type: Bug >Reporter: Oliver Stöneberg > Attachments: ssh.log > > > It appears that after the SshClient.connect().verify() call was successful > the ClientSession.auth().verify() call might hang if the connection was > closed in-between those calls. If AuthFuture.verify() is called with a > timeout it correctly times out, but I would expect it to detect that the > connection is closed/closing and throw a proper error even without the > timeout. > The errors I see in the log are these (more completel log attached): > DEBUG [sshd-SshClient[329a1f8d]-nio2-thread-5] (Nio2Session.java:137) Caught > IOException[An established connection was aborted by the software in your > host machine] - calling handler > DEBUG [sshd-SshClient[329a1f8d]-nio2-thread-5] (Nio2Session.java:142) > Exception handler threw IllegalStateException, closing the session: No > session available > It's hard to debug for me since it only happens in a multi-threaded scenario > and I haven't been able to generate separate logs per session (is this even > possible?) -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (SSHD-635) potential hang in AuthFuture.verify(Long.MAX_VALUE) on error
[ https://issues.apache.org/jira/browse/SSHD-635?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15126101#comment-15126101 ] Goldstein Lyor commented on SSHD-635: - Please check again with version 1.1 or latest code - I remember fixing a bug related to this issue - see SSHD-600 > potential hang in AuthFuture.verify(Long.MAX_VALUE) on error > > > Key: SSHD-635 > URL: https://issues.apache.org/jira/browse/SSHD-635 > Project: MINA SSHD > Issue Type: Bug >Reporter: Oliver Stöneberg > Attachments: ssh.log > > > It appears that after the SshClient.connect().verify() call was successful > the ClientSession.auth().verify() call might hang if the connection was > closed in-between those calls. If AuthFuture.verify() is called with a > timeout it correctly times out, but I would expect it to detect that the > connection is closed/closing and throw a proper error even without the > timeout. > The errors I see in the log are these (more completel log attached): > DEBUG [sshd-SshClient[329a1f8d]-nio2-thread-5] (Nio2Session.java:137) Caught > IOException[An established connection was aborted by the software in your > host machine] - calling handler > DEBUG [sshd-SshClient[329a1f8d]-nio2-thread-5] (Nio2Session.java:142) > Exception handler threw IllegalStateException, closing the session: No > session available > It's hard to debug for me since it only happens in a multi-threaded scenario > and I haven't been able to generate separate logs per session (is this even > possible?) -- This message was sent by Atlassian JIRA (v6.3.4#6332)