[jira] [Commented] (FELIX-6048) Could not obtain lock
[ https://issues.apache.org/jira/browse/FELIX-6048?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17771768#comment-17771768 ] Marco commented on FELIX-6048: -- We are hitting this issue somehow with org.apache.felix.scr 2.2.2 ``` MESSAGE FrameworkEvent ERROR !STACK 0 org.osgi.framework.ServiceException: Exception in org.apache.felix.scr.impl.manager.SingleComponentManager.getService() at org.eclipse.osgi.internal.serviceregistry.ServiceFactoryUse.factoryGetService(ServiceFactoryUse.java:228) at org.eclipse.osgi.internal.serviceregistry.ServiceFactoryUse.getService(ServiceFactoryUse.java:114) at org.eclipse.osgi.internal.serviceregistry.ServiceConsumer$2.getService(ServiceConsumer.java:48) at org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.getService(ServiceRegistrationImpl.java:568) at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.getService(ServiceRegistry.java:542) at org.eclipse.osgi.internal.framework.BundleContextImpl.getService(BundleContextImpl.java:660) at org.apache.felix.scr.impl.manager.SingleRefPair.getServiceObject(SingleRefPair.java:88) at org.apache.felix.scr.impl.inject.field.FieldHandler$ReferenceMethodImpl.getServiceObject(FieldHandler.java:550) at org.apache.felix.scr.impl.manager.DependencyManager.getServiceObject(DependencyManager.java:2612) at org.apache.felix.scr.impl.manager.DependencyManager$SingleStaticCustomizer.prebind(DependencyManager.java:1401) at org.apache.felix.scr.impl.manager.DependencyManager.prebind(DependencyManager.java:1830) at org.apache.felix.scr.impl.manager.AbstractComponentManager.collectDependencies(AbstractComponentManager.java:1060) at org.apache.felix.scr.impl.manager.SingleComponentManager.getServiceInternal(SingleComponentManager.java:955) at org.apache.felix.scr.impl.manager.AbstractComponentManager.activateInternal(AbstractComponentManager.java:776) at org.apache.felix.scr.impl.manager.DependencyManager$SingleStaticCustomizer.addedService(DependencyManager.java:1274) at org.apache.felix.scr.impl.manager.DependencyManager$SingleStaticCustomizer.addedService(DependencyManager.java:1225) at org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.customizerAdded(ServiceTracker.java:1232) at org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.customizerAdded(ServiceTracker.java:1152) at org.apache.felix.scr.impl.manager.ServiceTracker$AbstractTracked.trackAdding(ServiceTracker.java:959) at org.apache.felix.scr.impl.manager.ServiceTracker$AbstractTracked.track(ServiceTracker.java:895) at org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.serviceChanged(ServiceTracker.java:1184) at org.apache.felix.scr.impl.BundleComponentActivator$ListenerInfo.serviceChanged(BundleComponentActivator.java:116) at org.eclipse.osgi.internal.serviceregistry.FilteredServiceListener.serviceChanged(FilteredServiceListener.java:123) at org.eclipse.osgi.internal.framework.BundleContextImpl.dispatchEvent(BundleContextImpl.java:961) 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.serviceregistry.ServiceRegistry.publishServiceEventPrivileged(ServiceRegistry.java:945) at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEvent(ServiceRegistry.java:882) at org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.register(ServiceRegistrationImpl.java:144) at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.registerService(ServiceRegistry.java:270) at org.eclipse.osgi.internal.framework.BundleContextImpl.registerService(BundleContextImpl.java:500) at org.apache.felix.scr.impl.manager.AbstractComponentManager$3.register(AbstractComponentManager.java:929) at org.apache.felix.scr.impl.manager.AbstractComponentManager$3.register(AbstractComponentManager.java:915) at org.apache.felix.scr.impl.manager.RegistrationManager.changeRegistration(RegistrationManager.java:133) at org.apache.felix.scr.impl.manager.AbstractComponentManager.registerService(AbstractComponentManager.java:984) at org.apache.felix.scr.impl.manager.AbstractComponentManager.activateInternal(AbstractComponentManager.java:752) at org.apache.felix.scr.impl.manager.AbstractComponentManager.enableInternal(AbstractComponentManager.java:674) at org.apache.felix.scr.impl.manager.AbstractComponentManager.enable(AbstractComponentManager.java:437) at org.apache.felix.scr.impl.manager.ConfigurableComponentHolder.enableComponents(ConfigurableComponentHolder.java:671) at org.apache.felix.scr.impl.BundleComponentActivator.initialEnable(BundleComponentActivator.java:310) at org.apache.felix.scr.impl.Activator.loadComponents(Activator.java:593) at org.apache.felix.scr.impl.Activator.access$200(Activator.java:74) at org.apache.felix.scr
[jira] [Commented] (FELIX-6048) Could not obtain lock
[ https://issues.apache.org/jira/browse/FELIX-6048?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16833316#comment-16833316 ] Carsten Ziegeler commented on FELIX-6048: - [~alpic80] Could you please retest with newer SCR versions like 2.1.16 or 2.0.14? > Could not obtain lock > - > > Key: FELIX-6048 > URL: https://issues.apache.org/jira/browse/FELIX-6048 > Project: Felix > Issue Type: Bug > Components: Declarative Services (SCR) >Affects Versions: scr-2.0.10 >Reporter: Alain Picard >Priority: Minor > > I regularly get this exception when starting our app, w/o having ever seen > any impact. > > {code:java} > !ENTRY org.eclipse.equinox.cm 4 0 2019-02-02 14:31:46.715 > !MESSAGE Could not obtain lock > !STACK 0 > java.lang.IllegalStateException: Could not obtain lock > at > org.apache.felix.scr.impl.manager.AbstractComponentManager.obtainLock(AbstractComponentManager.java:231) > at > org.apache.felix.scr.impl.manager.AbstractComponentManager.obtainActivationWriteLock(AbstractComponentManager.java:266) > at > org.apache.felix.scr.impl.manager.SingleComponentManager.reconfigure(SingleComponentManager.java:633) > at > org.apache.felix.scr.impl.manager.SingleComponentManager.reconfigure(SingleComponentManager.java:609) > at > org.apache.felix.scr.impl.manager.ConfigurableComponentHolder.configurationUpdated(ConfigurableComponentHolder.java:426) > at > org.apache.felix.scr.impl.manager.RegionConfigurationSupport.configurationEvent(RegionConfigurationSupport.java:284) > at > org.apache.felix.scr.impl.manager.RegionConfigurationSupport$1.configurationEvent(RegionConfigurationSupport.java:89) > at > org.eclipse.equinox.internal.cm.EventDispatcher$1.run(EventDispatcher.java:89) > at > org.eclipse.equinox.internal.cm.SerializedTaskQueue$1.run(SerializedTaskQueue.java:36) > After reporting on OSGI forum, was suggested to report here.{code} -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (FELIX-6048) Could not obtain lock
[ https://issues.apache.org/jira/browse/FELIX-6048?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16833847#comment-16833847 ] Alain Picard commented on FELIX-6048: - Still the same see attached image !Felix no lock.png! > Could not obtain lock > - > > Key: FELIX-6048 > URL: https://issues.apache.org/jira/browse/FELIX-6048 > Project: Felix > Issue Type: Bug > Components: Declarative Services (SCR) >Affects Versions: scr-2.0.10 >Reporter: Alain Picard >Priority: Minor > Attachments: Felix no lock.png > > > I regularly get this exception when starting our app, w/o having ever seen > any impact. > > {code:java} > !ENTRY org.eclipse.equinox.cm 4 0 2019-02-02 14:31:46.715 > !MESSAGE Could not obtain lock > !STACK 0 > java.lang.IllegalStateException: Could not obtain lock > at > org.apache.felix.scr.impl.manager.AbstractComponentManager.obtainLock(AbstractComponentManager.java:231) > at > org.apache.felix.scr.impl.manager.AbstractComponentManager.obtainActivationWriteLock(AbstractComponentManager.java:266) > at > org.apache.felix.scr.impl.manager.SingleComponentManager.reconfigure(SingleComponentManager.java:633) > at > org.apache.felix.scr.impl.manager.SingleComponentManager.reconfigure(SingleComponentManager.java:609) > at > org.apache.felix.scr.impl.manager.ConfigurableComponentHolder.configurationUpdated(ConfigurableComponentHolder.java:426) > at > org.apache.felix.scr.impl.manager.RegionConfigurationSupport.configurationEvent(RegionConfigurationSupport.java:284) > at > org.apache.felix.scr.impl.manager.RegionConfigurationSupport$1.configurationEvent(RegionConfigurationSupport.java:89) > at > org.eclipse.equinox.internal.cm.EventDispatcher$1.run(EventDispatcher.java:89) > at > org.eclipse.equinox.internal.cm.SerializedTaskQueue$1.run(SerializedTaskQueue.java:36) > After reporting on OSGI forum, was suggested to report here.{code} -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (FELIX-6048) Could not obtain lock
[ https://issues.apache.org/jira/browse/FELIX-6048?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17105424#comment-17105424 ] A. J. David Bosschaert commented on FELIX-6048: --- It would be really good if someone could post a testcase for this, if it's still reproducable... > Could not obtain lock > - > > Key: FELIX-6048 > URL: https://issues.apache.org/jira/browse/FELIX-6048 > Project: Felix > Issue Type: Bug > Components: Declarative Services (SCR) >Affects Versions: scr-2.1.14 >Reporter: Alain Picard >Priority: Minor > Attachments: Felix no lock.png > > > I regularly get this exception when starting our app, w/o having ever seen > any impact. > > {code:java} > !ENTRY org.eclipse.equinox.cm 4 0 2019-02-02 14:31:46.715 > !MESSAGE Could not obtain lock > !STACK 0 > java.lang.IllegalStateException: Could not obtain lock > at > org.apache.felix.scr.impl.manager.AbstractComponentManager.obtainLock(AbstractComponentManager.java:231) > at > org.apache.felix.scr.impl.manager.AbstractComponentManager.obtainActivationWriteLock(AbstractComponentManager.java:266) > at > org.apache.felix.scr.impl.manager.SingleComponentManager.reconfigure(SingleComponentManager.java:633) > at > org.apache.felix.scr.impl.manager.SingleComponentManager.reconfigure(SingleComponentManager.java:609) > at > org.apache.felix.scr.impl.manager.ConfigurableComponentHolder.configurationUpdated(ConfigurableComponentHolder.java:426) > at > org.apache.felix.scr.impl.manager.RegionConfigurationSupport.configurationEvent(RegionConfigurationSupport.java:284) > at > org.apache.felix.scr.impl.manager.RegionConfigurationSupport$1.configurationEvent(RegionConfigurationSupport.java:89) > at > org.eclipse.equinox.internal.cm.EventDispatcher$1.run(EventDispatcher.java:89) > at > org.eclipse.equinox.internal.cm.SerializedTaskQueue$1.run(SerializedTaskQueue.java:36) > After reporting on OSGI forum, was suggested to report here.{code} -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (FELIX-6048) Could not obtain lock
[ https://issues.apache.org/jira/browse/FELIX-6048?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17105429#comment-17105429 ] Alain Picard commented on FELIX-6048: - Not sure what changed at our end, but we are still on Felix 2.1.14.v20190123-1619 and have not seen that issue in a very long time. > Could not obtain lock > - > > Key: FELIX-6048 > URL: https://issues.apache.org/jira/browse/FELIX-6048 > Project: Felix > Issue Type: Bug > Components: Declarative Services (SCR) >Affects Versions: scr-2.1.14 >Reporter: Alain Picard >Priority: Minor > Attachments: Felix no lock.png > > > I regularly get this exception when starting our app, w/o having ever seen > any impact. > > {code:java} > !ENTRY org.eclipse.equinox.cm 4 0 2019-02-02 14:31:46.715 > !MESSAGE Could not obtain lock > !STACK 0 > java.lang.IllegalStateException: Could not obtain lock > at > org.apache.felix.scr.impl.manager.AbstractComponentManager.obtainLock(AbstractComponentManager.java:231) > at > org.apache.felix.scr.impl.manager.AbstractComponentManager.obtainActivationWriteLock(AbstractComponentManager.java:266) > at > org.apache.felix.scr.impl.manager.SingleComponentManager.reconfigure(SingleComponentManager.java:633) > at > org.apache.felix.scr.impl.manager.SingleComponentManager.reconfigure(SingleComponentManager.java:609) > at > org.apache.felix.scr.impl.manager.ConfigurableComponentHolder.configurationUpdated(ConfigurableComponentHolder.java:426) > at > org.apache.felix.scr.impl.manager.RegionConfigurationSupport.configurationEvent(RegionConfigurationSupport.java:284) > at > org.apache.felix.scr.impl.manager.RegionConfigurationSupport$1.configurationEvent(RegionConfigurationSupport.java:89) > at > org.eclipse.equinox.internal.cm.EventDispatcher$1.run(EventDispatcher.java:89) > at > org.eclipse.equinox.internal.cm.SerializedTaskQueue$1.run(SerializedTaskQueue.java:36) > After reporting on OSGI forum, was suggested to report here.{code} -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (FELIX-6048) Could not obtain lock
[ https://issues.apache.org/jira/browse/FELIX-6048?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17166197#comment-17166197 ] Robert Varga commented on FELIX-6048: - I do not have a ready reproducer yet, but we've hit this with 2.1.20: {noformat} Caused by: java.lang.IllegalStateException: Could not obtain lock at org.apache.felix.scr.impl.manager.AbstractComponentManager.obtainLock(AbstractComponentManager.java:241) ~[?:?] at org.apache.felix.scr.impl.manager.AbstractComponentManager.obtainStateLock(AbstractComponentManager.java:288) ~[?:?] at org.apache.felix.scr.impl.manager.SingleComponentManager.getService(SingleComponentManager.java:890) ~[?:?] at org.eclipse.osgi.internal.serviceregistry.ServiceFactoryUse$1.run(ServiceFactoryUse.java:212) ~[?:?] at java.security.AccessController.doPrivileged(Native Method) ~[?:?] at org.eclipse.osgi.internal.serviceregistry.ServiceFactoryUse.factoryGetService(ServiceFactoryUse.java:210) ~[?:?]{noformat} Full log is here: [https://logs.opendaylight.org/releng/vex-yul-odl-jenkins-1/serviceutils-maven-merge-aluminium/170/features/odl-serviceutils-srm/target/SFT/karaf.log.gz] >From what I gather, it seems the component is being accessed via Service >Registry while its activate() method is still executing: {code:java} 2020-07-28T06:08:43,325 | INFO | features-3-thread-1 | OSGiActorSystemProvider | 138 - org.opendaylight.controller.sal-distributed-datastore - 2.0.3 | Actor System provider starting [...] 2020-07-28T06:08:52,435 | ERROR | Blueprint Extender: 1 | ServiceRecipe | 19 - org.apache.aries.blueprint.core - 1.10.2 | Error retrieving service from ServiceRecipe[name='.component-1'] org.osgi.service.blueprint.container.ComponentDefinitionException: Error when instantiating bean configDatastore of class org.opendaylight.controller.cluster.datastore.DistributedDataStoreFactory [...] Caused by: java.lang.IllegalStateException: getService() returned null for {org.opendaylight.controller.cluster.ActorSystemProvider}={service.id=1951, service.bundleid=138, service.scope=bundle, component.name=org.opendaylight.controller.cluster.akka.osgi.impl.OSGiActorSystemProvider, component.id=25} [...] 2020-07-28T06:08:58,971 | INFO | features-3-thread-1 | OSGiActorSystemProvider | 138 - org.opendaylight.controller.sal-distributed-datastore - 2.0.3 | Actor System provider started {code} > Could not obtain lock > - > > Key: FELIX-6048 > URL: https://issues.apache.org/jira/browse/FELIX-6048 > Project: Felix > Issue Type: Bug > Components: Declarative Services (SCR) >Affects Versions: scr-2.1.14 >Reporter: Alain Picard >Priority: Minor > Attachments: Felix no lock.png > > > I regularly get this exception when starting our app, w/o having ever seen > any impact. > > {code:java} > !ENTRY org.eclipse.equinox.cm 4 0 2019-02-02 14:31:46.715 > !MESSAGE Could not obtain lock > !STACK 0 > java.lang.IllegalStateException: Could not obtain lock > at > org.apache.felix.scr.impl.manager.AbstractComponentManager.obtainLock(AbstractComponentManager.java:231) > at > org.apache.felix.scr.impl.manager.AbstractComponentManager.obtainActivationWriteLock(AbstractComponentManager.java:266) > at > org.apache.felix.scr.impl.manager.SingleComponentManager.reconfigure(SingleComponentManager.java:633) > at > org.apache.felix.scr.impl.manager.SingleComponentManager.reconfigure(SingleComponentManager.java:609) > at > org.apache.felix.scr.impl.manager.ConfigurableComponentHolder.configurationUpdated(ConfigurableComponentHolder.java:426) > at > org.apache.felix.scr.impl.manager.RegionConfigurationSupport.configurationEvent(RegionConfigurationSupport.java:284) > at > org.apache.felix.scr.impl.manager.RegionConfigurationSupport$1.configurationEvent(RegionConfigurationSupport.java:89) > at > org.eclipse.equinox.internal.cm.EventDispatcher$1.run(EventDispatcher.java:89) > at > org.eclipse.equinox.internal.cm.SerializedTaskQueue$1.run(SerializedTaskQueue.java:36) > After reporting on OSGI forum, was suggested to report here.{code} -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (FELIX-6048) Could not obtain lock
[ https://issues.apache.org/jira/browse/FELIX-6048?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17166200#comment-17166200 ] Robert Varga commented on FELIX-6048: - This might be related to blueprint and DS being used in the same bundle. > Could not obtain lock > - > > Key: FELIX-6048 > URL: https://issues.apache.org/jira/browse/FELIX-6048 > Project: Felix > Issue Type: Bug > Components: Declarative Services (SCR) >Affects Versions: scr-2.1.14 >Reporter: Alain Picard >Priority: Minor > Attachments: Felix no lock.png > > > I regularly get this exception when starting our app, w/o having ever seen > any impact. > > {code:java} > !ENTRY org.eclipse.equinox.cm 4 0 2019-02-02 14:31:46.715 > !MESSAGE Could not obtain lock > !STACK 0 > java.lang.IllegalStateException: Could not obtain lock > at > org.apache.felix.scr.impl.manager.AbstractComponentManager.obtainLock(AbstractComponentManager.java:231) > at > org.apache.felix.scr.impl.manager.AbstractComponentManager.obtainActivationWriteLock(AbstractComponentManager.java:266) > at > org.apache.felix.scr.impl.manager.SingleComponentManager.reconfigure(SingleComponentManager.java:633) > at > org.apache.felix.scr.impl.manager.SingleComponentManager.reconfigure(SingleComponentManager.java:609) > at > org.apache.felix.scr.impl.manager.ConfigurableComponentHolder.configurationUpdated(ConfigurableComponentHolder.java:426) > at > org.apache.felix.scr.impl.manager.RegionConfigurationSupport.configurationEvent(RegionConfigurationSupport.java:284) > at > org.apache.felix.scr.impl.manager.RegionConfigurationSupport$1.configurationEvent(RegionConfigurationSupport.java:89) > at > org.eclipse.equinox.internal.cm.EventDispatcher$1.run(EventDispatcher.java:89) > at > org.eclipse.equinox.internal.cm.SerializedTaskQueue$1.run(SerializedTaskQueue.java:36) > After reporting on OSGI forum, was suggested to report here.{code} -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (FELIX-6048) Could not obtain lock
[ https://issues.apache.org/jira/browse/FELIX-6048?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17177588#comment-17177588 ] Simon Wimmesberger commented on FELIX-6048: --- We are hitting the same issue from time to time but from a different source: {noformat} java.lang.IllegalStateException: Could not obtain lock at org.apache.felix.scr.impl.manager.AbstractComponentManager.obtainLock(AbstractComponentManager.java:241) at org.apache.felix.scr.impl.manager.AbstractComponentManager.obtainStateLock(AbstractComponentManager.java:288) at org.apache.felix.scr.impl.manager.AbstractComponentManager.doDeactivate(AbstractComponentManager.java:828) at org.apache.felix.scr.impl.manager.AbstractComponentManager.deactivateInternal(AbstractComponentManager.java:806) at org.apache.felix.scr.impl.manager.AbstractComponentManager.disableInternal(AbstractComponentManager.java:852) at org.apache.felix.scr.impl.manager.AbstractComponentManager$2.run(AbstractComponentManager.java:549) at org.apache.felix.scr.impl.ComponentActorThread.run(ComponentActorThread.java:113) at java.lang.Thread.run(Thread.java:748) {noformat} Can't provide a reproducer yet. > Could not obtain lock > - > > Key: FELIX-6048 > URL: https://issues.apache.org/jira/browse/FELIX-6048 > Project: Felix > Issue Type: Bug > Components: Declarative Services (SCR) >Affects Versions: scr-2.1.14 >Reporter: Alain Picard >Priority: Minor > Attachments: Felix no lock.png > > > I regularly get this exception when starting our app, w/o having ever seen > any impact. > > {code:java} > !ENTRY org.eclipse.equinox.cm 4 0 2019-02-02 14:31:46.715 > !MESSAGE Could not obtain lock > !STACK 0 > java.lang.IllegalStateException: Could not obtain lock > at > org.apache.felix.scr.impl.manager.AbstractComponentManager.obtainLock(AbstractComponentManager.java:231) > at > org.apache.felix.scr.impl.manager.AbstractComponentManager.obtainActivationWriteLock(AbstractComponentManager.java:266) > at > org.apache.felix.scr.impl.manager.SingleComponentManager.reconfigure(SingleComponentManager.java:633) > at > org.apache.felix.scr.impl.manager.SingleComponentManager.reconfigure(SingleComponentManager.java:609) > at > org.apache.felix.scr.impl.manager.ConfigurableComponentHolder.configurationUpdated(ConfigurableComponentHolder.java:426) > at > org.apache.felix.scr.impl.manager.RegionConfigurationSupport.configurationEvent(RegionConfigurationSupport.java:284) > at > org.apache.felix.scr.impl.manager.RegionConfigurationSupport$1.configurationEvent(RegionConfigurationSupport.java:89) > at > org.eclipse.equinox.internal.cm.EventDispatcher$1.run(EventDispatcher.java:89) > at > org.eclipse.equinox.internal.cm.SerializedTaskQueue$1.run(SerializedTaskQueue.java:36) > After reporting on OSGI forum, was suggested to report here.{code} -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (FELIX-6048) Could not obtain lock
[ https://issues.apache.org/jira/browse/FELIX-6048?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17238896#comment-17238896 ] Valentin Mayamsin commented on FELIX-6048: -- Also seeing this issue with 2.1.20. Happens rarely, but no workaround except restarting the whole thing. Looks like some sort of race condition. > Could not obtain lock > - > > Key: FELIX-6048 > URL: https://issues.apache.org/jira/browse/FELIX-6048 > Project: Felix > Issue Type: Bug > Components: Declarative Services (SCR) >Affects Versions: scr-2.1.14 >Reporter: Alain Picard >Priority: Minor > Attachments: Felix no lock.png > > > I regularly get this exception when starting our app, w/o having ever seen > any impact. > > {code:java} > !ENTRY org.eclipse.equinox.cm 4 0 2019-02-02 14:31:46.715 > !MESSAGE Could not obtain lock > !STACK 0 > java.lang.IllegalStateException: Could not obtain lock > at > org.apache.felix.scr.impl.manager.AbstractComponentManager.obtainLock(AbstractComponentManager.java:231) > at > org.apache.felix.scr.impl.manager.AbstractComponentManager.obtainActivationWriteLock(AbstractComponentManager.java:266) > at > org.apache.felix.scr.impl.manager.SingleComponentManager.reconfigure(SingleComponentManager.java:633) > at > org.apache.felix.scr.impl.manager.SingleComponentManager.reconfigure(SingleComponentManager.java:609) > at > org.apache.felix.scr.impl.manager.ConfigurableComponentHolder.configurationUpdated(ConfigurableComponentHolder.java:426) > at > org.apache.felix.scr.impl.manager.RegionConfigurationSupport.configurationEvent(RegionConfigurationSupport.java:284) > at > org.apache.felix.scr.impl.manager.RegionConfigurationSupport$1.configurationEvent(RegionConfigurationSupport.java:89) > at > org.eclipse.equinox.internal.cm.EventDispatcher$1.run(EventDispatcher.java:89) > at > org.eclipse.equinox.internal.cm.SerializedTaskQueue$1.run(SerializedTaskQueue.java:36) > After reporting on OSGI forum, was suggested to report here.{code} -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (FELIX-6048) Could not obtain lock
[ https://issues.apache.org/jira/browse/FELIX-6048?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17682682#comment-17682682 ] Róbert Csákány commented on FELIX-6048: --- Hi! I have the very same issue with scr-2.2.4. It cames randomly within httpserivice servlet registration: 2023-01-31T17:43:16,853 | | | | INFO | features-3-thread-1 | FeaturesServiceImpl | 19 - org.apache.karaf.features.core - 4.4.3 | mvn:org.apache.felix/org.apache.felix.scr/2.2.4 {code:java} 2023-01-31T17:43:30,040 | | | | WARN | paxweb-config-4-thread-1 (change controller) | HealthCheckExecutorServlet | 162 - hu.blackbelt.judo.services.judo-services-healthcheck-osgi - 1.1.0.20230131_114116_fd8d5f4f_develop | bundle hu.blackbelt.judo.services.judo-services-healthcheck-osgi:1.1.0.20230131_114116_fd8d5f4f_develop (162)[hu.blackbelt.judo.services.healthcheck.osgi.servlet.HealthCheckExecutorServlet(86)] : Component deactivation threw an exception 2010java.lang.IllegalStateException: Could not obtain lock 2011at org.apache.felix.scr.impl.manager.AbstractComponentManager.obtainLock(AbstractComponentManager.java:242) ~[?:?] 2012at org.apache.felix.scr.impl.manager.AbstractComponentManager.obtainStateLock(AbstractComponentManager.java:289) ~[?:?] 2013at org.apache.felix.scr.impl.manager.AbstractComponentManager.doDeactivate(AbstractComponentManager.java:849) ~[?:?] 2014at org.apache.felix.scr.impl.manager.AbstractComponentManager.deactivateInternal(AbstractComponentManager.java:825) ~[?:?] 2015at org.apache.felix.scr.impl.manager.DependencyManager.deactivateComponentManager(DependencyManager.java:2636) ~[?:?] 2016at org.apache.felix.scr.impl.manager.DependencyManager.access$400(DependencyManager.java:59) ~[?:?] 2017at org.apache.felix.scr.impl.manager.DependencyManager$SingleStaticCustomizer.removedService(DependencyManager.java:1356) ~[?:?] 2018at org.apache.felix.scr.impl.manager.DependencyManager$SingleStaticCustomizer.removedService(DependencyManager.java:1225) ~[?:?] 2019at org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.customizerRemoved(ServiceTracker.java:1258) ~[?:?] 2020at org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.customizerRemoved(ServiceTracker.java:1152) ~[?:?] 2021at org.apache.felix.scr.impl.manager.ServiceTracker$AbstractTracked.untrack(ServiceTracker.java:1012) ~[?:?] 2022at org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.serviceChanged(ServiceTracker.java:1192) ~[?:?] 2023at org.apache.felix.scr.impl.BundleComponentActivator$ListenerInfo.serviceChanged(BundleComponentActivator.java:116) ~[?:?] 2024at org.apache.felix.framework.EventDispatcher.invokeServiceListenerCallback(EventDispatcher.java:990) ~[?:?] 2025at org.apache.felix.framework.EventDispatcher.fireEventImmediately(EventDispatcher.java:838) ~[?:?] 2026at org.apache.felix.framework.EventDispatcher.fireServiceEvent(EventDispatcher.java:545) ~[?:?] 2027at org.apache.felix.framework.Felix.fireServiceEvent(Felix.java:4863) ~[?:?] 2028at org.apache.felix.framework.Felix.access$000(Felix.java:111) ~[?:?] 2029at org.apache.felix.framework.Felix$1.serviceChanged(Felix.java:440) ~[?:?] 2030at org.apache.felix.framework.ServiceRegistry.unregisterService(ServiceRegistry.java:170) ~[?:?] 2031at org.apache.felix.framework.ServiceRegistrationImpl.unregister(ServiceRegistrationImpl.java:146) ~[?:?] 2032at org.ops4j.pax.web.service.internal.Activator.cleanUpHttpServiceRegistrations(Activator.java:637) ~[?:?] 2033at org.ops4j.pax.web.service.internal.Activator.updateController(Activator.java:418) ~[?:?] 2034at org.ops4j.pax.web.service.internal.Activator.lambda$updateServerControllerFactory$1(Activator.java:347) ~[?:?] 2035at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539) ~[?:?] 2036at java.util.concurrent.FutureTask.run(FutureTask.java:264) ~[?:?] 2037at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304) ~[?:?] 2038at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) ~[?:?] 2039at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) ~[?:?] 2040at java.lang.Thread.run(Thread.java:833) ~[?:?] {code} > Could not obtain lock > - > > Key: FELIX-6048 > URL: https://issues.apache.org/jira/browse/FELIX-6048 > Project: Felix > Issue Type: Bug > Components: Declarative Services (SCR) >Affects Versions: scr-2.1.14 >Reporter: Alain Picard >Priority: Minor > Attachments: Felix no lock.png > > > I regularly get this exception when starting our app, w/o having ever seen > any impact. > > {code:java} > !ENTRY org.eclipse.equ
[jira] [Commented] (FELIX-6048) Could not obtain lock
[ https://issues.apache.org/jira/browse/FELIX-6048?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17682701#comment-17682701 ] Tom Watson commented on FELIX-6048: --- Any chance you can try running with debug logging enabled for org.apache.felix.scr? SCR tries to dump the threads when it sees this error and its OSGi Logger has debug enabled. https://github.com/apache/felix-dev/blob/dea1b8cd57f1cdbad8053234218435ec99df7ff3/scr/src/main/java/org/apache/felix/scr/impl/manager/AbstractComponentManager.java#L302-L313 That may give you a clue what other thread has the lock and why. > Could not obtain lock > - > > Key: FELIX-6048 > URL: https://issues.apache.org/jira/browse/FELIX-6048 > Project: Felix > Issue Type: Bug > Components: Declarative Services (SCR) >Affects Versions: scr-2.1.14 >Reporter: Alain Picard >Priority: Minor > Attachments: 17_Run Northwind integration test.txt, Felix no lock.png > > > I regularly get this exception when starting our app, w/o having ever seen > any impact. > > {code:java} > !ENTRY org.eclipse.equinox.cm 4 0 2019-02-02 14:31:46.715 > !MESSAGE Could not obtain lock > !STACK 0 > java.lang.IllegalStateException: Could not obtain lock > at > org.apache.felix.scr.impl.manager.AbstractComponentManager.obtainLock(AbstractComponentManager.java:231) > at > org.apache.felix.scr.impl.manager.AbstractComponentManager.obtainActivationWriteLock(AbstractComponentManager.java:266) > at > org.apache.felix.scr.impl.manager.SingleComponentManager.reconfigure(SingleComponentManager.java:633) > at > org.apache.felix.scr.impl.manager.SingleComponentManager.reconfigure(SingleComponentManager.java:609) > at > org.apache.felix.scr.impl.manager.ConfigurableComponentHolder.configurationUpdated(ConfigurableComponentHolder.java:426) > at > org.apache.felix.scr.impl.manager.RegionConfigurationSupport.configurationEvent(RegionConfigurationSupport.java:284) > at > org.apache.felix.scr.impl.manager.RegionConfigurationSupport$1.configurationEvent(RegionConfigurationSupport.java:89) > at > org.eclipse.equinox.internal.cm.EventDispatcher$1.run(EventDispatcher.java:89) > at > org.eclipse.equinox.internal.cm.SerializedTaskQueue$1.run(SerializedTaskQueue.java:36) > After reporting on OSGI forum, was suggested to report here.{code} -- This message was sent by Atlassian Jira (v8.20.10#820010)