jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andreas Veithen <andreas.veit...@gmail.com>
Subject Re: ThreadLocal errors logged in Tomcat 6.0.24
Date Fri, 19 Feb 2010 11:09:40 GMT
We recently upgraded to Jackrabbit 2.0, and in our case there seems to
be a thread of type
org.apache.jackrabbit.util.TransientFileFactory$ReaperThread that is
not stopped correctly. This prevents the application class loader from
being garbage collected after a stop or restart of Jackrabbit and
causes a memory leak.

Andreas

On Mon, Feb 15, 2010 at 13:11, Torgeir Veimo <torgeir@netenviron.com> wrote:
> On 15 February 2010 21:14, Rakesh Vidyadharan <rakesh@sptci.com> wrote:
>> On 15 Feb 2010, at 02:42, Thomas Müller wrote:
>>
>>> Hi,
>>>
>>> It looks like the Jackrabbit repository is not closed when the web
>>> application is stopped. Could you verify this?
>>>
>>> Regards,
>>> Thomas
>>
>> I am using TransientRepository, and I verified that there are not .lock or .lck files
under repository root before I shutdown the container.  It appears to be primarily Derby
and Lucene that have these issues, so it may not be a JackRabbit issue per se.
>
> There's at least one jackrabbit timer that doesn't shut down. Here's
> what I see in the tomcat log, redeploying an app that uses
> TransientRepository;
>
> Feb 15, 2010 10:07:58 PM org.apache.catalina.loader.WebappClassLoader
> clearReferencesThreads
> SEVERE: A web application appears to have started a thread named
> [Timer-2] but has failed to stop it. This is very likely to create a
> memory leak.
> Feb 15, 2010 10:07:58 PM org.apache.catalina.loader.WebappClassLoader
> clearReferencesThreads
> WARNING: Failed to terminate thread named [Timer-2]
> java.lang.NoSuchFieldException: target
>        at java.lang.Class.getDeclaredField(Class.java:1882)
>        at org.apache.catalina.loader.WebappClassLoader.clearReferencesThreads(WebappClassLoader.java:1958)
>        at org.apache.catalina.loader.WebappClassLoader.clearReferences(WebappClassLoader.java:1707)
>        at org.apache.catalina.loader.WebappClassLoader.stop(WebappClassLoader.java:1622)
>        at org.apache.catalina.loader.WebappLoader.stop(WebappLoader.java:710)
>        at org.apache.catalina.core.StandardContext.stop(StandardContext.java:4649)
>        at org.apache.catalina.core.ContainerBase.removeChild(ContainerBase.java:924)
>        at org.apache.catalina.startup.HostConfig.checkResources(HostConfig.java:1121)
>        at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1342)
>        at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:303)
>        at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
>        at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1337)
>        at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1601)
>        at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1610)
>        at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1590)
>        at java.lang.Thread.run(Thread.java:637)
> Feb 15, 2010 10:07:58 PM org.apache.catalina.loader.WebappClassLoader
> clearThreadLocalMap
> SEVERE: A web application created a ThreadLocal with key of type
> [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@4fc0b204]) and a
> value of type [org.apache.jackrabbit.core.query.lucene.PerQueryCache]
> (value [org.apache.jackrabbit.core.query.lucene.PerQueryCache@73e74d83])
> but failed to remove it when the web application was stopped. To
> prevent a memory leak, the ThreadLocal has been forcibly removed.
> Feb 15, 2010 10:07:58 PM org.apache.catalina.loader.WebappClassLoader
> clearThreadLocalMap
> SEVERE: A web application created a ThreadLocal with key of type
> [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@56920ee7]) and a
> value of type [org.apache.derby.iapi.services.context.ContextManager]
> (value [org.apache.derby.iapi.services.context.ContextManager@246972f1])
> but failed to remove it when the web application was stopped. To
> prevent a memory leak, the ThreadLocal has been forcibly removed.
> Feb 15, 2010 10:07:58 PM org.apache.catalina.loader.WebappClassLoader
> clearThreadLocalMap
> SEVERE: A web application created a ThreadLocal with key of type
> [org.apache.derby.iapi.sql.dictionary.TableDescriptor$1] (value
> [org.apache.derby.iapi.sql.dictionary.TableDescriptor$1@f108c18]) and
> a value of type [java.util.WeakHashMap] (value [{={1}, ={1, 2}, =null,
> ={1}, =null, ={1}, ={1}, =null, ={1}, =null, ={2, 3, 4}, ={1}, =null,
> ={1}, ={1}, ={1, 2}, =null, =null, =null, =null, =null, ={2, 3, 4},
> ={1}, =null, =null, =null}]) but failed to remove it when the web
> application was stopped. To prevent a memory leak, the ThreadLocal has
> been forcibly removed.
>
> --
> -Tor
>

Mime
View raw message