[JBoss JIRA] (ISPN-12273) Potential race condition during wiring of EncoderCache
by Dan Berindei (Jira)
[ https://issues.redhat.com/browse/ISPN-12273?page=com.atlassian.jira.plugi... ]
Dan Berindei commented on ISPN-12273:
-------------------------------------
I managed to reproduce the problem reliably by adding some delays in {{findFactory()}} and {{tryAutoInstantiation()}}.
* Thread 1 goes all the way to {{tryAutoInstantiation("org.infinispan.factories.EncoderRegistryFactory")}} and registers a {{ComponentWrapper(EMPTY)}}.
* Thread 2 skips {{tryAutoInstantiation()}} because the component wrapper is not {{null}}, but doesn't wait for thread 1 to change the component state to {{INSTANTIATING}} before calling {{awaitWrapperState(INSTANTIATED)}}.
* {{awaitWrapperState()}} sees the {EMPTY}} state and assumes that it was created by a lazy reference (e.g. a {{ComponentRef<EncoderRegistryFactory>}} field), so it throws an exception.
> Potential race condition during wiring of EncoderCache
> ------------------------------------------------------
>
> Key: ISPN-12273
> URL: https://issues.redhat.com/browse/ISPN-12273
> Project: Infinispan
> Issue Type: Bug
> Components: Core
> Affects Versions: 11.0.3.Final
> Reporter: Paul Ferraro
> Priority: Critical
>
> 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:
> {noformat}
> [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
> {noformat}
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
3 years, 8 months
[JBoss JIRA] (ISPN-12273) Potential race condition during wiring of EncoderCache
by Dan Berindei (Jira)
[ https://issues.redhat.com/browse/ISPN-12273?page=com.atlassian.jira.plugi... ]
Dan Berindei updated ISPN-12273:
--------------------------------
Status: Open (was: New)
> Potential race condition during wiring of EncoderCache
> ------------------------------------------------------
>
> Key: ISPN-12273
> URL: https://issues.redhat.com/browse/ISPN-12273
> Project: Infinispan
> Issue Type: Bug
> Components: Core
> Affects Versions: 11.0.3.Final
> Reporter: Paul Ferraro
> Priority: Critical
>
> 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:
> {noformat}
> [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
> {noformat}
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
3 years, 8 months
[JBoss JIRA] (ISPN-12102) Validate configuration before storing it
by Pedro Ruivo (Jira)
[ https://issues.redhat.com/browse/ISPN-12102?page=com.atlassian.jira.plugi... ]
Work on ISPN-12102 started by Pedro Ruivo.
------------------------------------------
> Validate configuration before storing it
> ----------------------------------------
>
> Key: ISPN-12102
> URL: https://issues.redhat.com/browse/ISPN-12102
> Project: Infinispan
> Issue Type: Bug
> Components: Core
> Affects Versions: 11.0.1.Final
> Reporter: Pedro Ruivo
> Assignee: Pedro Ruivo
> Priority: Major
> Fix For: 12.0.0.Dev03
>
>
> Although {{ConfigurationBuilder}} does some validation, sometimes it needs something more. As an example, the cross-site replication needs a running {{Transport}} to check if xsite is really supported.
> As a side effect, the console is broken when you try to define the following cache without {{RELAY2}} being present in the JGroups stack.
> {code:xml}
> <infinispan>
> <cache-container>
> <distributed-cache name="xsite">
> <backups>
> <backup site="site2"/>
> </backups>
> </distributed-cache>
> </cache-container>
> </infinispan>
> {code}
> This happens because the {{Configuration}} is stored and the {{Cache}} with the exception is stored as well.
> The fix proposed it adds a method to {{ModuleLifecyle}} where the {{Configuration}} can be validated before it is store in the "global state".
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
3 years, 8 months
[JBoss JIRA] (ISPN-12102) Validate configuration before storing it
by Pedro Ruivo (Jira)
[ https://issues.redhat.com/browse/ISPN-12102?page=com.atlassian.jira.plugi... ]
Pedro Ruivo updated ISPN-12102:
-------------------------------
Status: Open (was: Pull Request Sent)
> Validate configuration before storing it
> ----------------------------------------
>
> Key: ISPN-12102
> URL: https://issues.redhat.com/browse/ISPN-12102
> Project: Infinispan
> Issue Type: Bug
> Components: Core
> Affects Versions: 11.0.1.Final
> Reporter: Pedro Ruivo
> Assignee: Pedro Ruivo
> Priority: Major
> Fix For: 12.0.0.Dev03
>
>
> Although {{ConfigurationBuilder}} does some validation, sometimes it needs something more. As an example, the cross-site replication needs a running {{Transport}} to check if xsite is really supported.
> As a side effect, the console is broken when you try to define the following cache without {{RELAY2}} being present in the JGroups stack.
> {code:xml}
> <infinispan>
> <cache-container>
> <distributed-cache name="xsite">
> <backups>
> <backup site="site2"/>
> </backups>
> </distributed-cache>
> </cache-container>
> </infinispan>
> {code}
> This happens because the {{Configuration}} is stored and the {{Cache}} with the exception is stored as well.
> The fix proposed it adds a method to {{ModuleLifecyle}} where the {{Configuration}} can be validated before it is store in the "global state".
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
3 years, 8 months
[JBoss JIRA] (ISPN-12092) Make the welcome visible without login in every case
by Dan Berindei (Jira)
[ https://issues.redhat.com/browse/ISPN-12092?page=com.atlassian.jira.plugi... ]
Dan Berindei updated ISPN-12092:
--------------------------------
Status: Resolved (was: Pull Request Sent)
Resolution: Done
> Make the welcome visible without login in every case
> ----------------------------------------------------
>
> Key: ISPN-12092
> URL: https://issues.redhat.com/browse/ISPN-12092
> Project: Infinispan
> Issue Type: Feature Request
> Components: Console
> Affects Versions: 11.0.1.Final
> Reporter: Katia Aresti
> Assignee: Katia Aresti
> Priority: Minor
> Fix For: 12.0.0.Dev03
>
>
> With keycloak integration, the welcome page detects the login into keycloak.
> * Welcome page visible without login
> * If Keycloak, when clicking the button, we land into keycloak login
> * If Http, we go into the login endpoint
> * If http but no user, pop up explaining you need to create a user
> * If there is no auth or the server down, go to the console
>
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
3 years, 8 months