You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by "Brad Harvey (JIRA)" <ji...@apache.org> on 2006/07/31 13:26:14 UTC

[jira] Commented: (DIRMINA-231) SocketConnector thread leak

    [ http://issues.apache.org/jira/browse/DIRMINA-231?page=comments#action_12424514 ] 
            
Brad Harvey commented on DIRMINA-231:
-------------------------------------

Warning - running attached ConnectionTest may bring your machine to its knees!

The PooledThreadModel which is used by the default configuration creates a new ThreadPoolFilter which is what is creating these wayward threads. I don't think the destroy method of this filter ever gets called. 

If the PooledThreadModel used a ReferenceCountingIoFilter to wrap the ThreadPoolFilter before adding it to the chain then would destroy be called?



> SocketConnector thread leak
> ---------------------------
>
>                 Key: DIRMINA-231
>                 URL: http://issues.apache.org/jira/browse/DIRMINA-231
>             Project: Directory MINA
>          Issue Type: Bug
>    Affects Versions: 0.9.5
>         Environment: jdk1.5.0_06
>            Reporter: Brad Harvey
>            Priority: Critical
>         Attachments: ConnectionTest.java
>
>
> A few new threads are created for new SocketConnectors when they attempt to connect to a remote host. Two of these (AnonymousIoService-x-y) are not cleaned up which can eventually lead to OutOfMemoryError or other strange behaviour. 
> It can be avoided by reusing SocketConnectors, but I don't think this should be necessary.  

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira