[ 
https://issues.apache.org/jira/browse/DIRMINA-1076?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16360487#comment-16360487
 ] 

Christoph John commented on DIRMINA-1076:
-----------------------------------------

Hi Jonathan,

many thanks for the quick turnaround. Much appreciated!

I have tested your changes and it is looking very good so far. I have only a 
few more questions:
In the {{AbstractIoServiceTest}} calling {{dispose(true)}} not from 
IoFutureListener works as expected (i.e. all threads are cleaned up). Calling 
{{dispose(true)}} from an IoFutureListener leads to more and more threads being 
created (as you noticed). The question is if there is some way to prevent 
programmatically that {{dispose(true)}} is called from an IoFutureListener? The 
way it is now might lead to subtle problems (although in very unlikely 
scenarios). And from my own experience people tend to not read the JavaDocs. ;)

Is this problem (that you fixed) more likely to happen when a session gets 
closed unexpectedly? Because in our (QuickFIX/J) test suite the problem often 
seemed to manifest itself right after there was a 
{{WriteToClosedSessionException}}.

Is this issue going to be fixed in MINA 2.0.17? Is there any ETA for MINA 
2.0.17?
(There also is DIRMINA-1057 which fixes another problem in QuickFIX/J)

Many thanks again for your help on this.

Cheers,
Chris.

> Leaking NioProcessors/NioSocketConnectors hanging in call to dispose
> --------------------------------------------------------------------
>
>                 Key: DIRMINA-1076
>                 URL: https://issues.apache.org/jira/browse/DIRMINA-1076
>             Project: MINA
>          Issue Type: Bug
>    Affects Versions: 2.0.16
>            Reporter: Christoph John
>            Priority: Major
>         Attachments: mina-dispose-hang.txt, mina-test-log.txt, 
> mina-test-patch.txt
>
>
> Follow-up to mailing list discussion.
> I was now able to reproduce the problem with a MINA test. Or let's say I did 
> the brute-force approach by re-running one test in an endless loop.
> I have attached a patch of AbstractIoServiceTest (against 
> [https://github.com/apache/mina/tree/2.0]) and a stack trace. After a few 
> loops the test is stuck. You can see a lot of threads hanging in dispose() 
> and the test is stuck when it tries to dispose the acceptor.
>  
> What is a little strange is that the javadoc says that 
> connector.dispose(TRUE) should not be called from an IoFutureListener, but in 
> the test it is done anyway. However, changing the parameter to FALSE does not 
> help either.
>  
>  Is there anything that can be done to prevent this hang?



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to