Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
scr-2.1.20
-
None
Description
Got the following NPE. Not sure on the scenario that causes it. It does appear that org.apache.felix.scr.impl.manager.ServiceFactoryComponentManager.deleteComponent(int) will clear the org.apache.felix.scr.impl.manager.ServiceFactoryComponentManager.serviceContexts set outside of a lock and that the implementation of ServiceFactoryComponentManager.ungetService does not account for this.
FrameworkEvent ERROR org.osgi.framework.ServiceException: Exception in org.apache.felix.scr.impl.manager.ServiceFactoryComponentManager.ungetService()
at org.eclipse.osgi.internal.serviceregistry.ServiceFactoryUse.factoryUngetService(ServiceFactoryUse.java:275)
at org.eclipse.osgi.internal.serviceregistry.ServiceFactoryUse.ungetService(ServiceFactoryUse.java:163)
at org.eclipse.osgi.internal.serviceregistry.ServiceConsumer$2.ungetService(ServiceConsumer.java:53)
at org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.ungetService(ServiceRegistrationImpl.java:615)
at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.ungetService(ServiceRegistry.java:573)
at org.eclipse.osgi.internal.framework.BundleContextImpl.ungetService(BundleContextImpl.java:728)
at org.apache.felix.scr.impl.manager.SingleRefPair.safeUngetService(SingleRefPair.java:109)
at org.apache.felix.scr.impl.manager.SingleRefPair.ungetServiceObjects(SingleRefPair.java:74)
at org.apache.felix.scr.impl.manager.DependencyManager$AbstractCustomizer.ungetService(DependencyManager.java:224)
at org.apache.felix.scr.impl.manager.DependencyManager$SingleStaticCustomizer.close(DependencyManager.java:1233)
at org.apache.felix.scr.impl.manager.DependencyManager.deactivate(DependencyManager.java:1375)
at org.apache.felix.scr.impl.manager.AbstractComponentManager.deactivateDependencyManagers(AbstractComponentManager.java:1241)
at org.apache.felix.scr.impl.manager.AbstractComponentManager.doDeactivate(AbstractComponentManager.java:833)
at org.apache.felix.scr.impl.manager.AbstractComponentManager.deactivateInternal(AbstractComponentManager.java:806)
at org.apache.felix.scr.impl.manager.AbstractComponentManager.dispose(AbstractComponentManager.java:585)
at org.apache.felix.scr.impl.manager.ConfigurableComponentHolder.disposeComponents(ConfigurableComponentHolder.java:717)
at org.apache.felix.scr.impl.BundleComponentActivator.dispose(BundleComponentActivator.java:532)
at org.apache.felix.scr.impl.Activator.disposeComponents(Activator.java:609)
at org.apache.felix.scr.impl.Activator.access$300(Activator.java:69)
at org.apache.felix.scr.impl.Activator$ScrExtension.destroy(Activator.java:452)
at org.apache.felix.scr.impl.AbstractExtender$1.run(AbstractExtender.java:216)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at org.apache.felix.scr.impl.AbstractExtender.destroyExtension(AbstractExtender.java:238)
at org.apache.felix.scr.impl.AbstractExtender.bundleChanged(AbstractExtender.java:132)
at org.apache.felix.scr.impl.Activator.bundleChanged(Activator.java:215)
at org.eclipse.osgi.internal.framework.BundleContextImpl.dispatchEvent(BundleContextImpl.java:973)
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:234)
at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:151)
at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEventPrivileged(EquinoxEventPublisher.java:235)
at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEvent(EquinoxEventPublisher.java:141)
at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEvent(EquinoxEventPublisher.java:133)
at org.eclipse.osgi.internal.framework.EquinoxContainerAdaptor.publishModuleEvent(EquinoxContainerAdaptor.java:217)
at org.eclipse.osgi.container.Module.publishEvent(Module.java:498)
at org.eclipse.osgi.container.Module.doStop(Module.java:656)
at org.eclipse.osgi.container.Module.stop(Module.java:520)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.decStartLevel(ModuleContainer.java:1885)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1760)
at org.eclipse.osgi.container.SystemModule.stopWorker(SystemModule.java:275)
at org.eclipse.osgi.internal.framework.EquinoxBundle$SystemBundle$EquinoxSystemModule.stopWorker(EquinoxBundle.java:202)
at org.eclipse.osgi.container.Module.doStop(Module.java:658)
at org.eclipse.osgi.container.Module.stop(Module.java:520)
at org.eclipse.osgi.container.SystemModule.stop(SystemModule.java:207)
at org.eclipse.osgi.internal.framework.EquinoxBundle$SystemBundle$EquinoxSystemModule$1.run(EquinoxBundle.java:220)
at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: java.lang.NullPointerException
at org.apache.felix.scr.impl.manager.SingleComponentManager.disposeImplementationObject(SingleComponentManager.java:400)
at org.apache.felix.scr.impl.manager.ServiceFactoryComponentManager.ungetService(ServiceFactoryComponentManager.java:171)
at org.eclipse.osgi.internal.serviceregistry.ServiceFactoryUse$2.run(ServiceFactoryUse.java:265)
at org.eclipse.osgi.internal.serviceregistry.ServiceFactoryUse$2.run(ServiceFactoryUse.java:1)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:678)
at org.eclipse.osgi.internal.serviceregistry.ServiceFactoryUse.factoryUngetService(ServiceFactoryUse.java:262)
... 44 more
Attachments
Issue Links
- links to