cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Berin Loritsch <blorit...@apache.org>
Subject Re: [OT: Avalon][Patch] Deadlock in Excalibur's DefaultPool
Date Mon, 11 Jun 2001 13:52:54 GMT
Vadim Gritsenko wrote:
> 
> Hello,
> 
> In my effort to eliminate resource leackage in ContentAggregator,
> I found that Excalibur's DefaultPool is deadlock-prone.
> Deadlock situation occur when component which is being returned
> to pool is also want to return component of the same type
> (effectively, to the same pool).

Thanks, I will apply it.
> 
> I do not have Avalon CVS on hand, so here is description of the change
> instead of a patch.
> 
> To fix the problem, part of the put() method which now read:
> ------------------------------------------------------------
>         try
>         {
>             super.m_mutex.lock();
>             if(obj instanceof Recyclable)
>                 ((Recyclable)obj).recycle();
>             super.m_active.remove(super.m_active.indexOf(obj));
>             getLogger().debug("Returning a " + super.m_factory.getCreatedClass().getName()
+ " to the pool");
> ------------------------------------------------------------
> Should be:
> ------------------------------------------------------------
>         try
>         {
>             if(obj instanceof Recyclable)
>                 ((Recyclable)obj).recycle();
>             super.m_mutex.lock();
>             super.m_active.remove(super.m_active.indexOf(obj));
>             getLogger().debug("Returning a " + super.m_factory.getCreatedClass().getName()
+ " to the pool");
> ------------------------------------------------------------
> 
> I think that Berin or any other active Avalon developer should be able
> to fix this.
> 
> PS: This should go actually to Avalon list, but I'm not subscribed...
> 
> Thanks,
> Vadim
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
> For additional commands, email: cocoon-dev-help@xml.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Mime
View raw message