You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by "Emmanuel Lecharny (JIRA)" <ji...@apache.org> on 2010/11/06 14:33:41 UTC
[jira] Commented: (DIRMINA-808) infinity loop in
AbstractPollingIoProcessor.Processor.run if connection is closed
[ https://issues.apache.org/jira/browse/DIRMINA-808?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12928967#action_12928967 ]
Emmanuel Lecharny commented on DIRMINA-808:
-------------------------------------------
Thanks for the report. Will have a look at the code this week-end.
If you have a snippet of code that could be use to reproduce the problem, this could save me some time.
> infinity loop in AbstractPollingIoProcessor.Processor.run if connection is closed
> ---------------------------------------------------------------------------------
>
> Key: DIRMINA-808
> URL: https://issues.apache.org/jira/browse/DIRMINA-808
> Project: MINA
> Issue Type: Bug
> Components: Core
> Affects Versions: 2.0.1
> Reporter: Ertong
>
> While making some stress tests of my application, that uses mina on client and server sides, I discovered that sometimes mina leaves some threads to work after session.close(false) and connector.dispose(false).
> ExceptionMonitor says that there is an exception
> java.nio.channels.ClosedSelectorException
> at sun.nio.ch.SelectorImpl.lockAndDoSelect(SelectorImpl.java:66)
> at sun.nio.ch.SelectorImpl.select(SelectorImpl.java:80)
> at org.apache.mina.transport.socket.nio.NioProcessor.select(NioProcessor.java:70)
> at org.apache.mina.core.polling.AbstractPollingIoProcessor$Processor.run(AbstractPollingIoProcessor.java:1067)
> at org.apache.mina.util.NamePreservingRunnable.run(NamePreservingRunnable.java:64)
> at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
> at java.lang.Thread.run(Thread.java:662)
> Then I tried to dig deeper. And I've found the loop in AbstractPollingIoProcessor.Processor.run
> for (;;) {
> try {
> int selected = select(SELECT_TIMEOUT);
> //...
> } catch (Throwable t) {
> ExceptionMonitor.getInstance().exceptionCaught(t);
> //...
> }
> }
> This loop is definitely infinite, if select throws ClosedSelectorException.
> So, ClosedSelectorException have to be processed with another way.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.