Uploaded image for project: 'Infinispan'
  1. Infinispan
  2. ISPN-12273

Potential race condition during wiring of EncoderCache

    XMLWordPrintable

Details

    Description

      Since the upgrade to 11.0.x, we have encountered intermittent cache startup failures in WildFly that look to be due to a race condition in the wiring of the EncoderCache. Unfortunately, I have been unable to reproduce the issue locally. Here is a sample stack trace demonstrating the issue taken from the CI:

       [31m08:41:33,153 ERROR [org.jboss.msc.service.fail] (ServerService Thread Pool -- 18) MSC000001: Failed to start service org.wildfly.clustering.infinispan.cache.web.default-server: org.jboss.msc.service.StartException in service org.wildfly.clustering.infinispan.cache.web.default-server: org.infinispan.commons.CacheConfigurationException: Component org.infinispan.factories.EncoderRegistryFactory is missing a strong reference: waiting to become INSTANTIATED but it has not been instantiated yet
      	at org.wildfly.clustering.service.FunctionalService.start(FunctionalService.java:66)
      	at org.wildfly.clustering.service.AsyncServiceConfigurator$AsyncService.lambda$start$0(AsyncServiceConfigurator.java:117)
      	at org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
      	at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1990)
      	at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1486)
      	at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1377)
      	at java.lang.Thread.run(Thread.java:748)
      	at org.jboss.threads.JBossThread.run(JBossThread.java:513)
      Caused by: org.infinispan.commons.CacheConfigurationException: Component org.infinispan.factories.EncoderRegistryFactory is missing a strong reference: waiting to become INSTANTIATED but it has not been instantiated yet
      	at org.infinispan.factories.impl.BasicComponentRegistryImpl.awaitWrapperState(BasicComponentRegistryImpl.java:692)
      	at org.infinispan.factories.impl.BasicComponentRegistryImpl.getComponent0(BasicComponentRegistryImpl.java:150)
      	at org.infinispan.factories.impl.BasicComponentRegistryImpl.getComponent(BasicComponentRegistryImpl.java:65)
      	at org.infinispan.factories.impl.BasicComponentRegistryImpl.findFactory(BasicComponentRegistryImpl.java:257)
      	at org.infinispan.factories.impl.BasicComponentRegistryImpl.getComponent0(BasicComponentRegistryImpl.java:132)
      	at org.infinispan.factories.impl.BasicComponentRegistryImpl.getComponent(BasicComponentRegistryImpl.java:65)
      	at org.infinispan.factories.impl.BasicComponentRegistryImpl.getComponent0(BasicComponentRegistryImpl.java:125)
      	at org.infinispan.factories.impl.WireContext.get(WireContext.java:20)
      	at org.infinispan.encoding.impl.CorePackageImpl$1.wire(CorePackageImpl.java:30)
      	at org.infinispan.encoding.impl.CorePackageImpl$1.wire(CorePackageImpl.java:27)
      	at org.infinispan.factories.impl.BasicComponentRegistryImpl.invokeInjection(BasicComponentRegistryImpl.java:339)
      	at org.infinispan.factories.impl.BasicComponentRegistryImpl.doWireWrapper(BasicComponentRegistryImpl.java:236)
      	at org.infinispan.factories.impl.BasicComponentRegistryImpl.wireWrapper(BasicComponentRegistryImpl.java:217)
      	at org.infinispan.factories.impl.BasicComponentRegistryImpl.getComponent0(BasicComponentRegistryImpl.java:152)
      	at org.infinispan.factories.impl.WireContext.get(WireContext.java:20)
      	at org.infinispan.encoding.CorePackageImpl$1.wire(CorePackageImpl.java:30)
      	at org.infinispan.encoding.CorePackageImpl$1.wire(CorePackageImpl.java:27)
      	at org.infinispan.factories.impl.BasicComponentRegistryImpl.invokeInjection(BasicComponentRegistryImpl.java:339)
      	at org.infinispan.factories.impl.BasicComponentRegistryImpl.wireDependencies(BasicComponentRegistryImpl.java:247)
      	at org.infinispan.cache.impl.EncoderCache.wireRealCache(EncoderCache.java:120)
      	at org.infinispan.cache.impl.CorePackageImpl$4.wire(CorePackageImpl.java:92)
      	at org.infinispan.cache.impl.CorePackageImpl$4.wire(CorePackageImpl.java:88)
      	at org.infinispan.factories.impl.BasicComponentRegistryImpl.invokeInjection(BasicComponentRegistryImpl.java:339)
      	at org.infinispan.factories.impl.BasicComponentRegistryImpl.doWireWrapper(BasicComponentRegistryImpl.java:236)
      	at org.infinispan.factories.impl.BasicComponentRegistryImpl.wireWrapper(BasicComponentRegistryImpl.java:217)
      	at org.infinispan.factories.impl.BasicComponentRegistryImpl.registerComponent(BasicComponentRegistryImpl.java:376)
      	at org.infinispan.factories.InternalCacheFactory.bootstrap(InternalCacheFactory.java:170)
      	at org.infinispan.factories.InternalCacheFactory.createAndWire(InternalCacheFactory.java:116)
      	at org.infinispan.factories.InternalCacheFactory.createCache(InternalCacheFactory.java:84)
      	at org.infinispan.manager.DefaultCacheManager.wireAndStartCache(DefaultCacheManager.java:687)
      	at org.infinispan.manager.DefaultCacheManager.createCache(DefaultCacheManager.java:643)
      	at org.infinispan.manager.DefaultCacheManager.internalGetCache(DefaultCacheManager.java:532)
      	at org.infinispan.manager.DefaultCacheManager.getCache(DefaultCacheManager.java:510)
      	at org.jboss.as.clustering.infinispan.DefaultCacheContainer.getCache(DefaultCacheContainer.java:92)
      	at org.wildfly.clustering.infinispan.spi.service.CacheServiceConfigurator.get(CacheServiceConfigurator.java:77)
      	at org.wildfly.clustering.infinispan.spi.service.CacheServiceConfigurator.get(CacheServiceConfigurator.java:55)
      	at org.wildfly.clustering.service.FunctionalService.start(FunctionalService.java:63)
      	... 7 more
      

      Attachments

        Issue Links

          Activity

            People

              dberinde@redhat.com Dan Berindei
              pferraro@redhat.com Paul Ferraro
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: