[jira] Commented: (FELIX-2437) Deadlock on refrsh Import and refresh

2010-06-29 Thread Richard S. Hall (JIRA)

[ 
https://issues.apache.org/jira/browse/FELIX-2437?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12883590#action_12883590
 ] 

Richard S. Hall commented on FELIX-2437:


Just a note to myself: I think we need to make sure that any invocation paths 
that touch the install locks and the global lock always grab the global lock 
first to avoid such locking cycles.

> Deadlock on refrsh Import and refresh
> -
>
> Key: FELIX-2437
> URL: https://issues.apache.org/jira/browse/FELIX-2437
> Project: Felix
>  Issue Type: Bug
>  Components: Configuration Admin
>Affects Versions: framework-2.0.4, webconsole-3.0.0
> Environment: Felix framework 2.0.4
> Felix webconsole 3.0.0
> Sling 
>Reporter: christian
>Assignee: Richard S. Hall
>Priority: Minor
> Fix For: framework-3.2.0
>
>
> I encountred a Deadlock using Webconsole (s. stacktrace below)
> Stepps to reproduce:
> 1) in webconsole navigate to "bundles"
> 2) select and open the detail view of a bundle that has a lot dependencies (I 
> used sling and as bundle the sling api bundle)
> 3) click "refresh package import"
> 4) click "refresh"
> It the request from 4) is processed while he one from 3) is still running, 
> you get a deadlock. 
> Found one Java-level deadlock:
> =
> "0:0:0:0:0:0:0:1 [1277221470284] GET /system/console/bundles/105 HTTP/1.1":
>   waiting to lock monitor 0x0039de94 (object 0x06448fd0, a 
> org.apache.felix.framework.BundleImpl),
>   which is held by "FelixPackageAdmin"
> "FelixPackageAdmin":
>   waiting to lock monitor 0x0039deb4 (object 0x06235658, a 
> [Ljava.lang.Object;),
>   which is held by "0:0:0:0:0:0:0:1 [1277221470284] GET 
> /system/console/bundles/105 HTTP/1.1"
> Java stack information for the threads listed above:
> ===
> "0:0:0:0:0:0:0:1 [1277221470284] GET /system/console/bundles/105 HTTP/1.1":
> at 
> org.apache.felix.framework.BundleImpl.getModules(BundleImpl.java:1001)
> - waiting to lock <0x06448fd0> (a 
> org.apache.felix.framework.BundleImpl)
> at 
> org.apache.felix.framework.Felix.getExportedPackages(Felix.java:3114)
> at 
> org.apache.felix.framework.Felix.getExportedPackages(Felix.java:3093)
> - locked <0x06235658> (a [Ljava.lang.Object;)
> at 
> org.apache.felix.framework.PackageAdminImpl.getExportedPackages(PackageAdminImpl.java:184)
> at 
> org.apache.felix.webconsole.internal.core.BundlesServlet.listImportExport(BundlesServlet.java:834)
> at 
> org.apache.felix.webconsole.internal.core.BundlesServlet.bundleDetails(BundlesServlet.java:752)
> at 
> org.apache.felix.webconsole.internal.core.BundlesServlet.bundleInfo(BundlesServlet.java:675)
> at 
> org.apache.felix.webconsole.internal.core.BundlesServlet.writeJSON(BundlesServlet.java:570)
> at 
> org.apache.felix.webconsole.internal.core.BundlesServlet.writeJSON(BundlesServlet.java:511)
> at 
> org.apache.felix.webconsole.internal.core.BundlesServlet.renderContent(BundlesServlet.java:485)
> at 
> org.apache.felix.webconsole.AbstractWebConsolePlugin.doGet(AbstractWebConsolePlugin.java:148)
> at 
> org.apache.felix.webconsole.internal.core.BundlesServlet.doGet(BundlesServlet.java:274)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
> at 
> org.apache.felix.webconsole.internal.servlet.OsgiManager.service(OsgiManager.java:367)
> at 
> org.apache.felix.http.base.internal.handler.ServletHandler.doHandle(ServletHandler.java:93)
> at 
> org.apache.felix.http.base.internal.handler.ServletHandler.handle(ServletHandler.java:79)
> at 
> org.apache.felix.http.base.internal.dispatch.ServletPipeline.handle(ServletPipeline.java:42)
> at 
> org.apache.felix.http.base.internal.dispatch.InvocationFilterChain.doFilter(InvocationFilterChain.java:49)
> at 
> org.apache.felix.http.base.internal.dispatch.HttpFilterChain.doFilter(HttpFilterChain.java:33)
> at 
> org.apache.felix.http.base.internal.dispatch.FilterPipeline.dispatch(FilterPipeline.java:48)
> at 
> org.apache.felix.http.base.internal.dispatch.Dispatcher.dispatch(Dispatcher.java:39)
> at 
> org.apache.felix.http.base.internal.DispatcherServlet.service(DispatcherServlet.java:67)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
> at 
> org.apache.felix.http.proxy.ProxyServlet.service(ProxyServlet.java:60)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
> at 
> org.apache.sling.launchpad.base.webapp.SlingServletDelegate.service(SlingServletDelegate.java:275)
> at 
> org.ap

[jira] Commented: (FELIX-2437) Deadlock on refrsh Import and refresh

2010-06-23 Thread Richard S. Hall (JIRA)

[ 
https://issues.apache.org/jira/browse/FELIX-2437?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12881852#action_12881852
 ] 

Richard S. Hall commented on FELIX-2437:


I have reproduced this issue and will look into a fix.

> Deadlock on refrsh Import and refresh
> -
>
> Key: FELIX-2437
> URL: https://issues.apache.org/jira/browse/FELIX-2437
> Project: Felix
>  Issue Type: Bug
>  Components: Configuration Admin
>Affects Versions: framework-2.0.4, webconsole-3.0.0
> Environment: Felix framework 2.0.4
> Felix webconsole 3.0.0
> Sling 
>Reporter: christian
>Priority: Minor
>
> I encountred a Deadlock using Webconsole (s. stacktrace below)
> Stepps to reproduce:
> 1) in webconsole navigate to "bundles"
> 2) select and open the detail view of a bundle that has a lot dependencies (I 
> used sling and as bundle the sling api bundle)
> 3) click "refresh package import"
> 4) click "refresh"
> It the request from 4) is processed while he one from 3) is still running, 
> you get a deadlock. 
> Found one Java-level deadlock:
> =
> "0:0:0:0:0:0:0:1 [1277221470284] GET /system/console/bundles/105 HTTP/1.1":
>   waiting to lock monitor 0x0039de94 (object 0x06448fd0, a 
> org.apache.felix.framework.BundleImpl),
>   which is held by "FelixPackageAdmin"
> "FelixPackageAdmin":
>   waiting to lock monitor 0x0039deb4 (object 0x06235658, a 
> [Ljava.lang.Object;),
>   which is held by "0:0:0:0:0:0:0:1 [1277221470284] GET 
> /system/console/bundles/105 HTTP/1.1"
> Java stack information for the threads listed above:
> ===
> "0:0:0:0:0:0:0:1 [1277221470284] GET /system/console/bundles/105 HTTP/1.1":
> at 
> org.apache.felix.framework.BundleImpl.getModules(BundleImpl.java:1001)
> - waiting to lock <0x06448fd0> (a 
> org.apache.felix.framework.BundleImpl)
> at 
> org.apache.felix.framework.Felix.getExportedPackages(Felix.java:3114)
> at 
> org.apache.felix.framework.Felix.getExportedPackages(Felix.java:3093)
> - locked <0x06235658> (a [Ljava.lang.Object;)
> at 
> org.apache.felix.framework.PackageAdminImpl.getExportedPackages(PackageAdminImpl.java:184)
> at 
> org.apache.felix.webconsole.internal.core.BundlesServlet.listImportExport(BundlesServlet.java:834)
> at 
> org.apache.felix.webconsole.internal.core.BundlesServlet.bundleDetails(BundlesServlet.java:752)
> at 
> org.apache.felix.webconsole.internal.core.BundlesServlet.bundleInfo(BundlesServlet.java:675)
> at 
> org.apache.felix.webconsole.internal.core.BundlesServlet.writeJSON(BundlesServlet.java:570)
> at 
> org.apache.felix.webconsole.internal.core.BundlesServlet.writeJSON(BundlesServlet.java:511)
> at 
> org.apache.felix.webconsole.internal.core.BundlesServlet.renderContent(BundlesServlet.java:485)
> at 
> org.apache.felix.webconsole.AbstractWebConsolePlugin.doGet(AbstractWebConsolePlugin.java:148)
> at 
> org.apache.felix.webconsole.internal.core.BundlesServlet.doGet(BundlesServlet.java:274)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
> at 
> org.apache.felix.webconsole.internal.servlet.OsgiManager.service(OsgiManager.java:367)
> at 
> org.apache.felix.http.base.internal.handler.ServletHandler.doHandle(ServletHandler.java:93)
> at 
> org.apache.felix.http.base.internal.handler.ServletHandler.handle(ServletHandler.java:79)
> at 
> org.apache.felix.http.base.internal.dispatch.ServletPipeline.handle(ServletPipeline.java:42)
> at 
> org.apache.felix.http.base.internal.dispatch.InvocationFilterChain.doFilter(InvocationFilterChain.java:49)
> at 
> org.apache.felix.http.base.internal.dispatch.HttpFilterChain.doFilter(HttpFilterChain.java:33)
> at 
> org.apache.felix.http.base.internal.dispatch.FilterPipeline.dispatch(FilterPipeline.java:48)
> at 
> org.apache.felix.http.base.internal.dispatch.Dispatcher.dispatch(Dispatcher.java:39)
> at 
> org.apache.felix.http.base.internal.DispatcherServlet.service(DispatcherServlet.java:67)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
> at 
> org.apache.felix.http.proxy.ProxyServlet.service(ProxyServlet.java:60)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
> at 
> org.apache.sling.launchpad.base.webapp.SlingServletDelegate.service(SlingServletDelegate.java:275)
> at 
> org.apache.sling.launchpad.webapp.SlingServlet.service(SlingServlet.java:130)
> at 
> com.day.j2ee.servletengine.ServletRuntimeEnvironment.service(ServletRuntimeEnvironment.java:228)
> at 
> com.day.j2ee.serv