From cocoon-dev-return-14150-apmail-xml-cocoon-dev-archive=xml.apache.org@xml.apache.org Mon Jun 11 14:01:46 2001 Return-Path: Delivered-To: apmail-xml-cocoon-dev-archive@xml.apache.org Received: (qmail 70162 invoked by uid 500); 11 Jun 2001 14:01:17 -0000 Mailing-List: contact cocoon-dev-help@xml.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Reply-To: cocoon-dev@xml.apache.org Delivered-To: mailing list cocoon-dev@xml.apache.org Received: (qmail 69511 invoked from network); 11 Jun 2001 14:00:54 -0000 Message-ID: <3B24CECF.DE405983@apache.org> Date: Mon, 11 Jun 2001 09:59:43 -0400 From: Berin Loritsch X-Mailer: Mozilla 4.75 [en] (Windows NT 5.0; U) X-Accept-Language: en MIME-Version: 1.0 To: cocoon-dev@xml.apache.org Subject: Re: [OT: Avalon][Patch] Deadlock in Excalibur's DefaultPool References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Spam-Rating: h31.sny.collab.net 1.6.2 0/1000/N 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). > > I do not have Avalon CVS on hand, so here is description of the change > instead of a patch. Avalon CVS is fixed. When Avalon 4.0beta4 is released, we will see it in Cocoon CVS. > > 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