You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Carsten Ziegeler (JIRA)" <ji...@apache.org> on 2015/03/12 14:34:38 UTC

[jira] [Created] (SLING-4497) Memory thread might be terminated by already unregistered bundles/services

Carsten Ziegeler created SLING-4497:
---------------------------------------

             Summary: Memory thread might be terminated by already unregistered bundles/services
                 Key: SLING-4497
                 URL: https://issues.apache.org/jira/browse/SLING-4497
             Project: Sling
          Issue Type: Bug
          Components: ResourceResolver
    Affects Versions: Resource Resolver 1.2.0
            Reporter: Carsten Ziegeler
            Assignee: Carsten Ziegeler
             Fix For: Resource Resolver 1.2.2


The memory thread in the common resource resolver factory calls close on the resource context which in turn tries to close all providers and the used type resource resolver. 
If an exception occurs during this, like it might happen on bundle stop (see below), the memory thread dies which in turn might lead to a memory issue.
java.lang.IllegalStateException: Invalid BundleContext.

	at org.apache.felix.framework.BundleContextImpl.checkValidity(BundleContextImpl.java:511)

	at org.apache.felix.framework.BundleContextImpl.ungetService(BundleContextImpl.java:475)

	at org.apache.sling.jcr.resource.internal.helper.jcr.RepositoryHolder.release(RepositoryHolder.java:53)

	at org.apache.sling.jcr.resource.internal.helper.jcr.JcrResourceProvider.close(JcrResourceProvider.java:246)

	at org.apache.sling.resourceresolver.impl.helper.ResourceResolverContext.close(ResourceResolverContext.java:145)

	at org.apache.sling.resourceresolver.impl.CommonResourceResolverFactoryImpl$ResolverWeakReference.close(CommonResourceResolverFactoryImpl.java:403)

	at org.apache.sling.resourceresolver.impl.CommonResourceResolverFactoryImpl$1.run(CommonResourceResolverFactoryImpl.java:94)




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)