logo       

RE: Memory Leak Problems in v1.0.1 w/selectPath(): msg#00035

text.xml.xmlbeans.user

Subject: RE: Memory Leak Problems in v1.0.1 w/selectPath()

Hello,

Howdy. I'd appreciate if one of you could look into
this and confirm so that we can patch xmlbeans and
proceed with our release.

I'd request one of you to respond.

Thanks,
Venkat

--- Jamie Zyskowski <jzyskows@xxxxxxx> wrote:

> Hi,
>
> If anyone else on the dev list can help out with
> this, please speak up.
> I'm not familiar with the v1 store implementation.
>
> Since you have a time constraint to get your app
> deployed, you might
> want to just use your modified version of v1.0.3
> since it seems to have
> fixed your problem, or you could try v2 (it has a
> new cursor/store
> impl). I cannot tell you how destabilizing it could
> be to use your
> modified v1. Also, you might want to try parsing a
> java.net.URL with the
> factory instead of the input stream. Maybe xmlbeans
> will handle it
> better that way? Just a thought.
>
> I recommend that you submit the patch to the dev
> list that you think has
> fixed your problem. However, I'm not sure what kind
> of turnaround time
> you can expect. I am not a committer.
>
> I'll try to find some time to look into this in more
> detail, but I can't
> guarantee a solution :-(.
>
> Good luck,
> Jamie
>
> -----Original Message-----
> From: Venkat Seeth [mailto:svejb@xxxxxxxxx]
> Sent: Wednesday, January 05, 2005 11:33 AM
> To: user@xxxxxxxxxxxxxxxxxxx;
> dev@xxxxxxxxxxxxxxxxxxx
> Cc: user@xxxxxxxxxxxxxxxxxxx; svejb@xxxxxxxxx;
> muvar33@xxxxxxxxx
> Subject: RE: Memory Leak Problems in v1.0.1
> w/selectPath()
>
> Hi Jamie/Jacob,
>
> This is related to Jaxen when executing complex
> XPath
> queries. We did uncover this bug with Jaxen and
> reported to you guys. Hence we are fully aware of
> this
> bug.
>
> But, in our case, we are using simple XPath queries
> that do not use Jaxen.
>
> Cursor is holding on to cache in ThreadLocals which
> is
> not cleared at all. Hence, there are dangling
> references which cannot be collected.
>
> Its very easy to reproduce what we are talking
> about.
>
> Create a ThreadPool. Assign each thread in the pool
> to
> perform the following.
> * Open a cursor,
> * walk thru some selections (iterate)
> * Dispose the cursor
>
> Profile to see that CursorData's ThreadLocal holds
> on
> to Cursor objects and many more related to xmlbeans.
>
> There is no callback to indicate to xmlbeans that
> I'm
> done and please do away with your cache.
>
> Waiting for your input, please advise.
>
> Thanks,
> Venkatesh
>
> --- Jamie Zyskowski <jzyskows@xxxxxxx> wrote:
>
> > There is a bug open against select path in a
> > multi-threaded env causing
> > a JavaLangIllegalStateException:
> > http://issues.apache.org/jira/browse/XMLBEANS-84
> >
> > This could be related to the memory leak issue
> that
> > Murali and Venkatesh
> > have found. Thanx, Jacob for pointing this out to
> > me.
> >
> > Jamie
> >
> > -----Original Message-----
> > From: Jamie Zyskowski
> > Sent: Wednesday, January 05, 2005 9:51 AM
> > To: dev@xxxxxxxxxxxxxxxxxxx
> > Cc: muvar33@xxxxxxxxx; svejb@xxxxxxxxx
> > Subject: FW: Memory Leak Problems in v1.0.1
> > w/selectPath()
> >
> > Hi dev list,
> >
> > Murali and Venkatesh (see user list thread below)
> > are working on a
> > project that uses a compiled schema in a web
> > application. They are
> > finding memory leaks while calling selectPath() in
> a
> > custom ThreadPool
> > (all the threads are pulled out from a custom
> thread
> > pool). They are
> > using v1.0.3. The schema is attached.
> >
> > The main question they have is:
> > > What is the right way to use the "selectPath" in
> > > XmlObjects in a "Thread Pooled" environment (say
> > in
> > > Tomcat server) so that there won't be any
> dangling
> > > references of xmlbeans objects referenced by the
> > > Thread Locals.
> >
> > I'm going to try to put a repro together from the
> > info they have
> > provided, but I am not familiar with the cursor
> > implementation, so I'm
> > unable to answer their question about changes to
> the
> > v1 source code to
> > fix their problem. Can someone take a look and
> help
> > them out?
> >
> > Thanx,
> > Jamie
> >
> >
> >
> > -----Original Message-----
> > From: MV [mailto:muvar33@xxxxxxxxx]
> > Sent: Tuesday, January 04, 2005 11:21 PM
> > To: user@xxxxxxxxxxxxxxxxxxx
> > Subject: Memory Leak Problems
> >
> > Hi Jamie,
> > I have another update.
> >
> > I did couple of changes in the xmlbeans source
> code
> > and the problem has gone. Kindly let me know
> whether
> > the changes might have any side effects.
> >
> > - Modified the t1_CachedCursorData from "private"
> to
> > "public" in CursorData
> > - Added a method in the XmlBeans to reset the
> > "QNameCache".
> > public static void resetQNameCache ( )
> > {
> > _threadLocalLoaderQNameCache.set(new
> > QNameCache(32));
> > }
> >
> > Then i added the following snippet in my control
> > servlet, so that i gets executed before processing
> > the
> > request.
> >
> > ArrayList arrList = (ArrayList)
> > CursorData.tl_CachedCursorData.get();
> > if( arrList != null) arrList.clear();
> > XmlBeans.resetQNameCache();
> >
> > By doing the above changes the threads are
> pristine
> > without any threadlocal data due the earlier
> > "selectpaths" and now those objects are getting
> > garbage collected properly.
> >
> > I will be doing some further testing tomorrow
> > morning.
> >
> > Would this cause any issues ?
> >
> > thanks
> > Murali
> > --- MV <muvar33@xxxxxxxxx> wrote:
> >
> > > Hi Jamie,
> > > Myself and Venkatesh are working on the same
> > > project.
> > > We did some further analysis and here is our
> > update.
>
=== message truncated ===





__________________________________
Do you Yahoo!?
Yahoo! Mail - You care about security. So do we.
http://promotions.yahoo.com/new_mail


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise