[jboss-jira] [JBoss JIRA] (AS7-6884) NPE during shutdown of standalone-osgi.xml

Ed Roberts (JIRA) jira-events at lists.jboss.org
Wed Jul 10 12:28:21 EDT 2013


    [ https://issues.jboss.org/browse/AS7-6884?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12788918#comment-12788918 ] 

Ed Roberts commented on AS7-6884:
---------------------------------

I also get this exception on shutdown. Windows 8, JDK 1.7.0_u13, JBoss AS 7.2.0.Final, JBoss OSGi 2.1.1.Final
138 bundle deployments.

I investigated what is causing the unlockItems to throw the NPE, and it is basically the logic in UserBundleState.uninstallBundle cannot lock UNINSTALL method in the set 30 seconds.

{code}
2013-07-10 17:06:34,384 ERROR [stderr](MSC service thread 1-16) org.jboss.osgi.framework.spi.LockException: JBOSGI011282: Cannot obtain lock in timely fashion: (UNINSTALL) [FrameworkWiringLock, my-bundle:1.0.0.SNAPSHOT]
2013-07-10 17:06:34,384 ERROR [stderr](MSC service thread 1-16) 	at org.jboss.osgi.framework.internal.LockManagerImpl.lockItems(LockManagerImpl.java:99)
2013-07-10 17:06:34,384 ERROR [stderr](MSC service thread 1-16) 	at org.jboss.osgi.framework.internal.LockManagerImpl.lockItems(LockManagerImpl.java:84)
2013-07-10 17:06:34,385 ERROR [stderr](MSC service thread 1-16) 	at org.jboss.osgi.framework.internal.UserBundleState.uninstallInternal(UserBundleState.java:377)
2013-07-10 17:06:34,385 ERROR [stderr](MSC service thread 1-16) 	at org.jboss.osgi.framework.internal.BundleManagerPlugin.uninstallBundle(BundleManagerPlugin.java:424)
2013-07-10 17:06:34,385 ERROR [stderr](MSC service thread 1-16) 	at org.jboss.osgi.framework.internal.UserBundleInstalledService.stop(UserBundleInstalledService.java:112)
2013-07-10 17:06:34,385 ERROR [stderr](MSC service thread 1-16) 	at org.jboss.osgi.framework.spi.ServiceTracker$SynchronousListenerServiceWrapper.stop(ServiceTracker.java:343)
2013-07-10 17:06:34,385 ERROR [stderr](MSC service thread 1-16) 	at org.jboss.msc.service.ServiceControllerImpl$StopTask.stopService(ServiceControllerImpl.java:2082)
2013-07-10 17:06:34,385 ERROR [stderr](MSC service thread 1-16) 	at org.jboss.msc.service.ServiceControllerImpl$StopTask.run(ServiceControllerImpl.java:2043)
2013-07-10 17:06:34,385 ERROR [stderr](MSC service thread 1-16) 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
2013-07-10 17:06:34,385 ERROR [stderr](MSC service thread 1-16) 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
2013-07-10 17:06:34,385 ERROR [stderr](MSC service thread 1-16) 	at java.lang.Thread.run(Thread.java:722)
2013-07-10 17:06:34,385 ERROR [stderr](MSC service thread 1-16) Caused by: java.util.concurrent.TimeoutException
2013-07-10 17:06:34,386 ERROR [stderr](MSC service thread 1-16) 	... 11 more
2013-07-10 17:06:34,386 WARN  [org.jboss.msc.service.fail](MSC service thread 1-16) MSC000004: Failure during stop of service jbosgi.bundle.my-bundle."1.0.0.SNAPSHOT".bid181.INSTALLED: java.lang.NullPointerException
	at org.jboss.osgi.framework.internal.LockManagerImpl.unlockItems(LockManagerImpl.java:128)
	at org.jboss.osgi.framework.internal.UserBundleState.uninstallInternal(UserBundleState.java:386)
	at org.jboss.osgi.framework.internal.BundleManagerPlugin.uninstallBundle(BundleManagerPlugin.java:424)
	at org.jboss.osgi.framework.internal.UserBundleInstalledService.stop(UserBundleInstalledService.java:112)
	at org.jboss.osgi.framework.spi.ServiceTracker$SynchronousListenerServiceWrapper.stop(ServiceTracker.java:343)
	at org.jboss.msc.service.ServiceControllerImpl$StopTask.stopService(ServiceControllerImpl.java:2082)
	at org.jboss.msc.service.ServiceControllerImpl$StopTask.run(ServiceControllerImpl.java:2043)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
	at java.lang.Thread.run(Thread.java:722)
{code}

with no locked items, the finally block attempts to unlock them and doesn't handle the null at all.

What should be happening in this instance ?
                
> NPE during shutdown of standalone-osgi.xml
> ------------------------------------------
>
>                 Key: AS7-6884
>                 URL: https://issues.jboss.org/browse/AS7-6884
>             Project: Application Server 7
>          Issue Type: Bug
>          Components: OSGi
>    Affects Versions: EAP 6.1.0.Alpha (7.2.0.Final)
>            Reporter: Aaron Whiteside
>            Assignee: Thomas Diesler
>
> {code}
> 13:06:10,003 INFO  [org.jboss.osgi.framework] (MSC service thread 1-3) JBOSGI011005: Bundle uninstalled: org.apache.felix.log:1.0.0
> 13:06:10,002 WARN  [org.jboss.msc.service.fail] (MSC service thread 1-5) MSC00004: Failure during stop of service jbosgi.bundle."org.apache.camel.camel-spring"."2.11.0.SNAPSHOT".bid43.INSTALLED: java.lang.NullPointerException
> 	at org.jboss.osgi.framework.internal.LockManagerImpl.unlockItems(LockManagerImpl.java:128)
> 	at org.jboss.osgi.framework.internal.UserBundleState.uninstallInternal(UserBundleState.java:382)
> 	at org.jboss.osgi.framework.internal.BundleManagerPlugin.uninstallBundle(BundleManagerPlugin.java:424)
> 	at org.jboss.osgi.framework.internal.UserBundleInstalledService.stop(UserBundleInstalledService.java:112)
> 	at org.jboss.osgi.framework.spi.ServiceTracker$SynchronousListenerServiceWrapper.stop(ServiceTracker.java:343)
> 	at org.jboss.msc.service.ServiceControllerImpl$StopTask.stopService(ServiceControllerImpl.java:1911) [jboss-msc-1.0.4.GA.jar:1.0.4.GA]
> 	at org.jboss.msc.service.ServiceControllerImpl$StopTask.run(ServiceControllerImpl.java:1874) [jboss-msc-1.0.4.GA.jar:1.0.4.GA]
> 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_13]
> 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_13]
> 	at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_13]
> 13:06:10,002 WARN  [org.jboss.msc.service.fail] (MSC service thread 1-4) MSC00004: Failure during stop of service jbosgi.bundle."com.mm.camel.component.http.component-spi"."0.3.0".bid62.INSTALLED: java.lang.NullPointerException
> 	at org.jboss.osgi.framework.internal.LockManagerImpl.unlockItems(LockManagerImpl.java:128)
> 	at org.jboss.osgi.framework.internal.UserBundleState.uninstallInternal(UserBundleState.java:382)
> 	at org.jboss.osgi.framework.internal.BundleManagerPlugin.uninstallBundle(BundleManagerPlugin.java:424)
> 	at org.jboss.osgi.framework.internal.UserBundleInstalledService.stop(UserBundleInstalledService.java:112)
> 	at org.jboss.osgi.framework.spi.ServiceTracker$SynchronousListenerServiceWrapper.stop(ServiceTracker.java:343)
> 	at org.jboss.msc.service.ServiceControllerImpl$StopTask.stopService(ServiceControllerImpl.java:1911) [jboss-msc-1.0.4.GA.jar:1.0.4.GA]
> 	at org.jboss.msc.service.ServiceControllerImpl$StopTask.run(ServiceControllerImpl.java:1874) [jboss-msc-1.0.4.GA.jar:1.0.4.GA]
> 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_13]
> 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_13]
> 	at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_13]
> 13:06:10,005 INFO  [org.jboss.as.osgi] (MSC service thread 1-4) JBAS011908: Unregister module: deployment.protostuff-collectionschema-1.0.7.jar:main
> 13:06:10,002 WARN  [org.jboss.msc.service.fail] (MSC service thread 1-1) MSC00004: Failure during stop of service jbosgi.bundle."com.mm.camel.component.smpp.cloudhopper-smpp-component"."1.0.0.SNAPSHOT".bid70.INSTALLED: java.lang.NullPointerException
> 	at org.jboss.osgi.framework.internal.LockManagerImpl.unlockItems(LockManagerImpl.java:128)
> 	at org.jboss.osgi.framework.internal.UserBundleState.uninstallInternal(UserBundleState.java:382)
> 	at org.jboss.osgi.framework.internal.BundleManagerPlugin.uninstallBundle(BundleManagerPlugin.java:424)
> 	at org.jboss.osgi.framework.internal.UserBundleInstalledService.stop(UserBundleInstalledService.java:112)
> 	at org.jboss.osgi.framework.spi.ServiceTracker$SynchronousListenerServiceWrapper.stop(ServiceTracker.java:343)
> 	at org.jboss.msc.service.ServiceControllerImpl$StopTask.stopService(ServiceControllerImpl.java:1911) [jboss-msc-1.0.4.GA.jar:1.0.4.GA]
> 	at org.jboss.msc.service.ServiceControllerImpl$StopTask.run(ServiceControllerImpl.java:1874) [jboss-msc-1.0.4.GA.jar:1.0.4.GA]
> 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_13]
> 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_13]
> 	at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_13]
> 13:06:10,002 WARN  [org.jboss.msc.service.fail] (MSC service thread 1-8) MSC00004: Failure during stop of service jbosgi.bundle."com.verisign.smq.fs"."1.2.0".bid65.INSTALLED: java.lang.NullPointerException
> 	at org.jboss.osgi.framework.internal.LockManagerImpl.unlockItems(LockManagerImpl.java:128)
> 	at org.jboss.osgi.framework.internal.UserBundleState.uninstallInternal(UserBundleState.java:382)
> 	at org.jboss.osgi.framework.internal.BundleManagerPlugin.uninstallBundle(BundleManagerPlugin.java:424)
> 	at org.jboss.osgi.framework.internal.UserBundleInstalledService.stop(UserBundleInstalledService.java:112)
> 	at org.jboss.osgi.framework.spi.ServiceTracker$SynchronousListenerServiceWrapper.stop(ServiceTracker.java:343)
> 	at org.jboss.msc.service.ServiceControllerImpl$StopTask.stopService(ServiceControllerImpl.java:1911) [jboss-msc-1.0.4.GA.jar:1.0.4.GA]
> 	at org.jboss.msc.service.ServiceControllerImpl$StopTask.run(ServiceControllerImpl.java:1874) [jboss-msc-1.0.4.GA.jar:1.0.4.GA]
> 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_13]
> 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_13]
> 	at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_13]
> 13:06:10,004 INFO  [org.jboss.osgi.framework] (MSC service thread 1-3) JBOSGI011005: Bundle uninstalled: com.verisign.smq.spi:1.2.0
> 13:06:10,002 WARN  [org.jboss.msc.service.fail] (MSC service thread 1-6) MSC00004: Failure during stop of service jbosgi.bundle."org.apache.felix.configadmin"."1.2.8".bid15.INSTALLED: java.lang.NullPointerException
> 	at org.jboss.osgi.framework.internal.LockManagerImpl.unlockItems(LockManagerImpl.java:128)
> 	at org.jboss.osgi.framework.internal.UserBundleState.uninstallInternal(UserBundleState.java:382)
> 	at org.jboss.osgi.framework.internal.BundleManagerPlugin.uninstallBundle(BundleManagerPlugin.java:424)
> 	at org.jboss.osgi.framework.internal.UserBundleInstalledService.stop(UserBundleInstalledService.java:112)
> 	at org.jboss.osgi.framework.spi.ServiceTracker$SynchronousListenerServiceWrapper.stop(ServiceTracker.java:343)
> 	at org.jboss.msc.service.ServiceControllerImpl$StopTask.stopService(ServiceControllerImpl.java:1911) [jboss-msc-1.0.4.GA.jar:1.0.4.GA]
> 	at org.jboss.msc.service.ServiceControllerImpl$StopTask.run(ServiceControllerImpl.java:1874) [jboss-msc-1.0.4.GA.jar:1.0.4.GA]
> 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_13]
> 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_13]
> 	at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_13]
> 13:06:10,003 ERROR [org.jboss.as.server.deployment] (MSC service thread 1-7) JBAS015892: Deployment unit processor org.jboss.as.osgi.deployment.ModuleRegisterProcessor at 31a0d2e4 unexpectedly threw an exception during undeploy phase INSTALL of deployment "protobuf-java-2.4.1.jar": java.lang.NullPointerException
> 	at org.jboss.osgi.framework.internal.LockManagerImpl.unlockItems(LockManagerImpl.java:128)
> 	at org.jboss.osgi.framework.internal.EnvironmentImpl.uninstallResources(EnvironmentImpl.java:86)
> 	at org.jboss.as.osgi.service.ModuleRegistrationTracker.unregisterInternal(ModuleRegistrationTracker.java:139)
> 	at org.jboss.as.osgi.service.ModuleRegistrationTracker.unregisterModule(ModuleRegistrationTracker.java:92)
> 	at org.jboss.as.osgi.deployment.ModuleRegisterProcessor.undeploy(ModuleRegisterProcessor.java:80)
> 	at org.jboss.as.server.deployment.DeploymentUnitPhaseService.safeUndeploy(DeploymentUnitPhaseService.java:222) [jboss-as-server-7.2.0.Alpha1-redhat-4.jar:7.2.0.Alpha1-redhat-4]
> 	at org.jboss.as.server.deployment.DeploymentUnitPhaseService.stop(DeploymentUnitPhaseService.java:180) [jboss-as-server-7.2.0.Alpha1-redhat-4.jar:7.2.0.Alpha1-redhat-4]
> 	at org.jboss.msc.service.ServiceControllerImpl$StopTask.stopService(ServiceControllerImpl.java:1911) [jboss-msc-1.0.4.GA.jar:1.0.4.GA]
> 	at org.jboss.msc.service.ServiceControllerImpl$StopTask.run(ServiceControllerImpl.java:1874) [jboss-msc-1.0.4.GA.jar:1.0.4.GA]
> 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_13]
> 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_13]
> 	at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_13]
> 13:06:40,008 WARN  [org.jboss.msc.service.fail] (MSC service thread 1-8) MSC00004: Failure during stop of service jbosgi.bundle."com.mm.camel.component.smq.component"."1.2.0.SNAPSHOT".bid84.INSTALLED: java.lang.NullPointerException
> 	at org.jboss.osgi.framework.internal.LockManagerImpl.unlockItems(LockManagerImpl.java:128)
> 	at org.jboss.osgi.framework.internal.UserBundleState.uninstallInternal(UserBundleState.java:382)
> 	at org.jboss.osgi.framework.internal.BundleManagerPlugin.uninstallBundle(BundleManagerPlugin.java:424)
> 	at org.jboss.osgi.framework.internal.UserBundleInstalledService.stop(UserBundleInstalledService.java:112)
> 	at org.jboss.osgi.framework.spi.ServiceTracker$SynchronousListenerServiceWrapper.stop(ServiceTracker.java:343)
> 	at org.jboss.msc.service.ServiceControllerImpl$StopTask.stopService(ServiceControllerImpl.java:1911) [jboss-msc-1.0.4.GA.jar:1.0.4.GA]
> 	at org.jboss.msc.service.ServiceControllerImpl$StopTask.run(ServiceControllerImpl.java:1874) [jboss-msc-1.0.4.GA.jar:1.0.4.GA]
> 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_13]
> 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_13]
> 	at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_13]
> 13:06:40,008 ERROR [org.jboss.as.server.deployment] (MSC service thread 1-4) JBAS015892: Deployment unit processor org.jboss.as.osgi.deployment.ModuleRegisterProcessor at 31a0d2e4 unexpectedly threw an exception during undeploy phase INSTALL of deployment "protostuff-collectionschema-1.0.7.jar": java.lang.NullPointerException
> 	at org.jboss.osgi.framework.internal.LockManagerImpl.unlockItems(LockManagerImpl.java:128)
> 	at org.jboss.osgi.framework.internal.EnvironmentImpl.uninstallResources(EnvironmentImpl.java:86)
> 	at org.jboss.as.osgi.service.ModuleRegistrationTracker.unregisterInternal(ModuleRegistrationTracker.java:139)
> 	at org.jboss.as.osgi.service.ModuleRegistrationTracker.unregisterModule(ModuleRegistrationTracker.java:92)
> 	at org.jboss.as.osgi.deployment.ModuleRegisterProcessor.undeploy(ModuleRegisterProcessor.java:80)
> 	at org.jboss.as.server.deployment.DeploymentUnitPhaseService.safeUndeploy(DeploymentUnitPhaseService.java:222) [jboss-as-server-7.2.0.Alpha1-redhat-4.jar:7.2.0.Alpha1-redhat-4]
> 	at org.jboss.as.server.deployment.DeploymentUnitPhaseService.stop(DeploymentUnitPhaseService.java:180) [jboss-as-server-7.2.0.Alpha1-redhat-4.jar:7.2.0.Alpha1-redhat-4]
> 	at org.jboss.msc.service.ServiceControllerImpl$StopTask.stopService(ServiceControllerImpl.java:1911) [jboss-msc-1.0.4.GA.jar:1.0.4.GA]
> 	at org.jboss.msc.service.ServiceControllerImpl$StopTask.run(ServiceControllerImpl.java:1874) [jboss-msc-1.0.4.GA.jar:1.0.4.GA]
> 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_13]
> 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_13]
> 	at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_13]
> 13:06:40,008 WARN  [org.jboss.msc.service.fail] (MSC service thread 1-2) MSC00004: Failure during stop of service jbosgi.bundle."org.apache.camel.camel-sjms"."2.11.0.SNAPSHOT".bid72.INSTALLED: java.lang.NullPointerException
> 	at org.jboss.osgi.framework.internal.LockManagerImpl.unlockItems(LockManagerImpl.java:128)
> 	at org.jboss.osgi.framework.internal.UserBundleState.uninstallInternal(UserBundleState.java:382)
> 	at org.jboss.osgi.framework.internal.BundleManagerPlugin.uninstallBundle(BundleManagerPlugin.java:424)
> 	at org.jboss.osgi.framework.internal.UserBundleInstalledService.stop(UserBundleInstalledService.java:112)
> 	at org.jboss.osgi.framework.spi.ServiceTracker$SynchronousListenerServiceWrapper.stop(ServiceTracker.java:343)
> 	at org.jboss.msc.service.ServiceControllerImpl$StopTask.stopService(ServiceControllerImpl.java:1911) [jboss-msc-1.0.4.GA.jar:1.0.4.GA]
> 	at org.jboss.msc.service.ServiceControllerImpl$StopTask.run(ServiceControllerImpl.java:1874) [jboss-msc-1.0.4.GA.jar:1.0.4.GA]
> 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_13]
> 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_13]
> 	at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_13]
> 13:06:40,010 INFO  [org.jboss.as.osgi] (MSC service thread 1-6) JBAS011908: Unregister module: deployment.protostuff-core-1.0.7.jar:main
> 13:06:40,008 WARN  [org.jboss.msc.service.fail] (MSC service thread 1-1) MSC00004: Failure during stop of service jbosgi.bundle."com.verisign.smq.common-codecs"."1.2.0".bid93.INSTALLED: java.lang.NullPointerException
> 	at org.jboss.osgi.framework.internal.LockManagerImpl.unlockItems(LockManagerImpl.java:128)
> 	at org.jboss.osgi.framework.internal.UserBundleState.uninstallInternal(UserBundleState.java:382)
> 	at org.jboss.osgi.framework.internal.BundleManagerPlugin.uninstallBundle(BundleManagerPlugin.java:424)
> 	at org.jboss.osgi.framework.internal.UserBundleInstalledService.stop(UserBundleInstalledService.java:112)
> 	at org.jboss.osgi.framework.spi.ServiceTracker$SynchronousListenerServiceWrapper.stop(ServiceTracker.java:343)
> 	at org.jboss.msc.service.ServiceControllerImpl$StopTask.stopService(ServiceControllerImpl.java:1911) [jboss-msc-1.0.4.GA.jar:1.0.4.GA]
> 	at org.jboss.msc.service.ServiceControllerImpl$StopTask.run(ServiceControllerImpl.java:1874) [jboss-msc-1.0.4.GA.jar:1.0.4.GA]
> 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_13]
> 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_13]
> 	at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_13]
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the jboss-jira mailing list