You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by class acts <cl...@gmail.com> on 2006/11/19 15:53:55 UTC

AnonymousIOService and PooledByteBufferExpirer leak?

I know this has been posted before, I tried to follow the
recommendations for that, but no matter what I try, I'm not able to
get everything cleaned up.

I'm creating SocketConnector's and trying to dispose of them but the
following remain:

TestApp at localhost:3414	
	Thread [main] (Suspended (breakpoint at line 10 in TestApp ))	
		TestApp .main(String...) line: 10	
	Thread [PooledByteBufferExpirer-0] (Running)	
	Thread [Timer-0] (Running)	
	Thread [SocketConnectorIoProcessor-0.0] (Running)	
	Thread [AnonymousIoService-1] (Running)	
	Thread [AnonymousIoService-2] (Running)	
	Thread [AnonymousIoService-3] (Running)	


I can get everything to clean up quite well on the server side by
calling unbindAll(), but getting these pesky things cleaned up im not
sure...

I tried disposing of the ThreadPoolExecutor but that still didn't help.

Thanks

Re: AnonymousIOService and PooledByteBufferExpirer leak?

Posted by Trustin Lee <tr...@gmail.com>.
Hello,

On 11/20/06, class acts <cl...@gmail.com> wrote:
>
> As an update to the attached, it seems when you call clear() on the
> filterChain() it didn't actually cause the ThreadPool to to be garbage
> collected, i tried removing the specific instance and now everything
> is being cleaned up except for the Thread [PooledByteBufferExpirer-0]
> (Running)....  I will confirm if it's an issue, could just be because
> it's late and i've been coding for 12 hours nonstop.


AnonymousIoService threads are the threads that is created when you start a
service with default thread model.  They are created as daemon threads, and
therefore they will disappear when the VM shuts down.  If you don't like
this behavior, you have to specify a new thread model and manage the thread
pool executor by yourself.

MINA 0.9.x managed the life cycle of threads automatically, but it brought
performance degradation and deadlock, so we changed the management manual.

HTH,
Trustin
-- 
what we call human nature is actually human habit
--
http://gleamynode.net/
--
PGP key fingerprints:
* E167 E6AF E73A CBCE EE41  4A29 544D DE48 FE95 4E7E
* B693 628E 6047 4F8F CFA4  455E 1C62 A7DC 0255 ECA6

Re: AnonymousIOService and PooledByteBufferExpirer leak?

Posted by class acts <cl...@gmail.com>.
As an update to the attached, it seems when you call clear() on the
filterChain() it didn't actually cause the ThreadPool to to be garbage
collected, i tried removing the specific instance and now everything
is being cleaned up except for the Thread [PooledByteBufferExpirer-0]
(Running)....  I will confirm if it's an issue, could just be because
it's late and i've been coding for 12 hours nonstop.

thanks

On 11/20/06, class acts <cl...@gmail.com> wrote:
> Hi all,  I've been working on this since... I managed to get the
> Processor to go away, but the AnonymousIoServices I still can't seem
> to get rid of.  Sorry for the lack of info im my previous post, but im
> using Mina 1.0.0.  Any help is appreciated.. thanks
>
>
>
> On 11/19/06, class acts <cl...@gmail.com> wrote:
> > I know this has been posted before, I tried to follow the
> > recommendations for that, but no matter what I try, I'm not able to
> > get everything cleaned up.
> >
> > I'm creating SocketConnector's and trying to dispose of them but the
> > following remain:
> >
> > TestApp at localhost:3414
> >         Thread [main] (Suspended (breakpoint at line 10 in TestApp ))
> >                 TestApp .main(String...) line: 10
> >         Thread [PooledByteBufferExpirer-0] (Running)
> >         Thread [Timer-0] (Running)
> >         Thread [SocketConnectorIoProcessor-0.0] (Running)
> >         Thread [AnonymousIoService-1] (Running)
> >         Thread [AnonymousIoService-2] (Running)
> >         Thread [AnonymousIoService-3] (Running)
> >
> >
> > I can get everything to clean up quite well on the server side by
> > calling unbindAll(), but getting these pesky things cleaned up im not
> > sure...
> >
> > I tried disposing of the ThreadPoolExecutor but that still didn't help.
> >
> > Thanks
> >
>

Re: AnonymousIOService and PooledByteBufferExpirer leak?

Posted by class acts <cl...@gmail.com>.
Hi all,  I've been working on this since... I managed to get the
Processor to go away, but the AnonymousIoServices I still can't seem
to get rid of.  Sorry for the lack of info im my previous post, but im
using Mina 1.0.0.  Any help is appreciated.. thanks



On 11/19/06, class acts <cl...@gmail.com> wrote:
> I know this has been posted before, I tried to follow the
> recommendations for that, but no matter what I try, I'm not able to
> get everything cleaned up.
>
> I'm creating SocketConnector's and trying to dispose of them but the
> following remain:
>
> TestApp at localhost:3414
>         Thread [main] (Suspended (breakpoint at line 10 in TestApp ))
>                 TestApp .main(String...) line: 10
>         Thread [PooledByteBufferExpirer-0] (Running)
>         Thread [Timer-0] (Running)
>         Thread [SocketConnectorIoProcessor-0.0] (Running)
>         Thread [AnonymousIoService-1] (Running)
>         Thread [AnonymousIoService-2] (Running)
>         Thread [AnonymousIoService-3] (Running)
>
>
> I can get everything to clean up quite well on the server side by
> calling unbindAll(), but getting these pesky things cleaned up im not
> sure...
>
> I tried disposing of the ThreadPoolExecutor but that still didn't help.
>
> Thanks
>