mina-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jonathan Valliere <jon.valli...@emoten.com>
Subject Re: [jira] [Commented] (SSHD-743) Nio2Session sporadically leaks exceptions from nio2 threads
Date Sat, 11 Nov 2017 14:44:46 GMT
If you have an internal bug you still want to keep that bug from negatively
affecting other sessions within the app. That’s why browsers are process
per session.  That’s also a case for overly generic catches in specific
places.

On Sat, Nov 11, 2017 at 9:07 AM Goldstein Lyor (JIRA) <jira@apache.org>
wrote:

>
>     [
> https://issues.apache.org/jira/browse/SSHD-743?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16248536#comment-16248536
> ]
>
> Goldstein Lyor commented on SSHD-743:
> -------------------------------------
>
> I guess what bothers me is that {{catch (Exception e)}} - seems a bit too
> generic - perhaps only {{catch (IOException e)}} would be better. This way,
> if we have some internal bug (e.g., NPE) it won't be suppressed...but then
> we should make sure that only this kind of exceptions are thrown by
> {{startWriting}} if there is a problem with the socket.
>
> > Nio2Session sporadically leaks exceptions from nio2 threads
> > -----------------------------------------------------------
> >
> >                 Key: SSHD-743
> >                 URL: https://issues.apache.org/jira/browse/SSHD-743
> >             Project: MINA SSHD
> >          Issue Type: Bug
> >    Affects Versions: 1.3.0, 1.4.0, 1.6.0
> >            Reporter: masc
> >            Assignee: Goldstein Lyor
> >            Priority: Critical
> >
> > We are using {{sshd-core}} for tcp forwarding/tunnelling.
> > Since updating to {{1.3.0}} we see sporadic process terminations caused
> by exceptions leaking from nio2 threads.
> > I had to downgrade to {{1.2.0}} to stabilise.
> > {code}
> > 2017-04-21 18:56:28,606 1245641365
> sshd-SshServer[4be7acd9]-nio2-thread-3
> org.apache.sshd.server.session.ServerSessionImpl WARN -
> exceptionCaught(ServerSessionImpl[leoz@/185.17.206.254:21464])[state=Opened]
> InterruptedByTimeoutException: null
> > 2017-04-21 18:56:28,606 1245641365
> sshd-SshServer[4be7acd9]-nio2-thread-3 org.deku.leoz.node.Application ERROR
> - Writing not allowed due to timeout or cancellation
> > java.lang.IllegalStateException: Writing not allowed due to timeout or
> cancellation
> >     at sun.nio.ch
> .AsynchronousSocketChannelImpl.write(AsynchronousSocketChannelImpl.java:350)
> >     at sun.nio.ch
> .AsynchronousSocketChannelImpl.write(AsynchronousSocketChannelImpl.java:399)
> >     at org.apache.sshd.common.io
> .nio2.Nio2Session.doWriteCycle(Nio2Session.java:334)
> >     at org.apache.sshd.common.io
> .nio2.Nio2Session.startWriting(Nio2Session.java:318)
> >     at org.apache.sshd.common.io
> .nio2.Nio2Session.finishWrite(Nio2Session.java:393)
> >     at org.apache.sshd.common.io
> .nio2.Nio2Session.handleWriteCycleFailure(Nio2Session.java:387)
> >     at org.apache.sshd.common.io
> .nio2.Nio2Session$2.onFailed(Nio2Session.java:348)
> >     at org.apache.sshd.common.io
> .nio2.Nio2CompletionHandler.lambda$failed$1(Nio2CompletionHandler.java:46)
> >     at java.security.AccessController.doPrivileged(Native Method)
> >     at org.apache.sshd.common.io
> .nio2.Nio2CompletionHandler.failed(Nio2CompletionHandler.java:45)
> >     at sun.nio.ch.Invoker.invokeUnchecked(Invoker.java:128)
> >     at sun.nio.ch.Invoker$2.run(Invoker.java:218)
> >     at sun.nio.ch
> .AsynchronousChannelGroupImpl$1.run(AsynchronousChannelGroupImpl.java:112)
> >     at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
> >     at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
> >     at java.lang.Thread.run(Thread.java:745)
> > {code}
>
>
>
> --
> This message was sent by Atlassian JIRA
> (v6.4.14#64029)
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message