W3C home > Mailing lists > Public > xproc-dev@w3.org > April 2012

Fwd: [saxon] Memory Leaks

From: mozer <xmlizer@gmail.com>
Date: Mon, 30 Apr 2012 13:07:43 +0200
Message-ID: <CAKdwC_PgkSZx7XxCWnOZ7mCkrJAkN_ROKwssT6sP2L+7vaNSnw@mail.gmail.com>
To: XProc Dev <xproc-dev@w3.org>
Might be good to consider ThreadLocal in Calabash also ?

Xmlizer

---------- Forwarded message ----------
From: Michael Kay <mike@saxonica.com>
Date: Mon, Apr 30, 2012 at 1:02 PM
Subject: Re: [saxon] Memory Leaks
To: stephenksamuel@gmail.com, Mailing list for the SAXON XSLT and XQuery
processor <saxon-help@lists.sourceforge.net>


 OK, I've been slowly convinced that ThreadLocals are more trouble than
they are worth, so I'll get rid of this one as well.

Michael Kay
Saxonica


On 30/04/2012 11:31, Sam (Stephen Samuel) wrote:

Great on 1481.

 The issue with the caching is not about it using up the explicitly cached
resources, its about the ThreadLocals keeping a reference to the web-app
classloader meaning the entire webapp's Class instances cannot be gc'ed
(thus leading to perm gen explosion).

 My profiler reported all three instances of ThreadLocal's being kept
around.

On Mon, Apr 30, 2012 at 11:23, Michael Kay <mike@saxonica.com> wrote:

>  The issue with the converter cache will be fixed in the next maintenance
> release: see
>
> http://dev.saxonica.com/community/issues/1481
>
> I haven't seen evidence that the URI cache causes similar problems. In
> this case the objects held in the cache are simple strings and booleans so
> it shouldn't lock down any significant resources. If you do believe it is
> causing a problem, you can always set the Configuration property
> FeatureKeys.XSD_VERSION to "1.1", in which case the StandardURIChecker will
> not be used (in XSD 1.1, all strings are valid for xs:anyURI).
>
> Michael Kay
> Saxonica
>
>
> On 30/04/2012 10:30, Sam (Stephen Samuel) wrote:
>
>  Hi,
>
>  Saxon 9.4 has a couple of memory leak issues when used in a Tomcat
> container. The issue is the use of the ThreadLocal's in the following
> classes.
>
>  StandardURIChecker
> ConversionRules
>
>  Basically the thread locals are created by the webapp classloader, which
> means that they hold a reference to that classloader, so it cannot be
> released.
>
>  We need someway of clearing these. I couldn't see when a Configuration
> is created / freed.
>
>  --
> -Sam
>
>
>
>  ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
>
>
>
> _______________________________________________
> saxon-help mailing list archived at http://saxon.markmail.org/saxon-help@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/saxon-help
>
>
>
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> saxon-help mailing list archived at http://saxon.markmail.org/
> saxon-help@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/saxon-help
>



 --
-Sam



------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/



_______________________________________________
saxon-help mailing list archived at
http://saxon.markmail.org/saxon-help@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/saxon-help


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
saxon-help mailing list archived at http://saxon.markmail.org/
saxon-help@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/saxon-help
Received on Monday, 30 April 2012 11:08:13 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 30 April 2012 11:08:13 GMT