-
Bug
-
Resolution: Done
-
Undefined
-
None
-
None
-
False
-
-
False
-
-
Before reporting an issue
[X] I have searched existing issues
[X] I have reproduced the issue with the latest nightly release
Area
infinispan
Describe the bug
When analyzing a model test run which blocked, there was the following exception.
Possible cause: The configuration is bound to a thread. If Infinispan tries to read the configuration from a JGroups thread, there is no configuration, and the warning occurs as shown below.
```
10:19:27,749 WARN [org.infinispan.CLUSTER] (jgroups-8,node-26) ISPN000071: Caught exception when handling command org.infinispan.manager.impl.ReplicableManagerFunctionCommand@6eda0df4
java.lang.RuntimeException: No org.keycloak.cluster.ManagedCacheManagerProvider found. If running in embedded mode set the [embedded] property to this provider.
at org.keycloak.connections.infinispan.DefaultInfinispanConnectionProviderFactory.lazyInit(DefaultInfinispanConnectionProviderFactory.java:148)
at org.keycloak.connections.infinispan.DefaultInfinispanConnectionProviderFactory.create(DefaultInfinispanConnectionProviderFactory.java:83)
at org.keycloak.connections.infinispan.DefaultInfinispanConnectionProviderFactory.create(DefaultInfinispanConnectionProviderFactory.java:67)
at org.keycloak.services.DefaultKeycloakSession.getProvider(DefaultKeycloakSession.java:177)
at org.keycloak.models.cache.infinispan.InfinispanCacheRealmProviderFactory.lazyInit(InfinispanCacheRealmProviderFactory.java:55)
at org.keycloak.models.cache.infinispan.InfinispanCacheRealmProviderFactory.create(InfinispanCacheRealmProviderFactory.java:47)
at org.keycloak.models.cache.infinispan.InfinispanCacheRealmProviderFactory.create(InfinispanCacheRealmProviderFactory.java:37)
at org.keycloak.services.DefaultKeycloakSession.getProvider(DefaultKeycloakSession.java:177)
at org.keycloak.storage.datastore.LegacyDatastoreProvider.getRealmProvider(LegacyDatastoreProvider.java:154)
at org.keycloak.storage.datastore.LegacyDatastoreProvider.realms(LegacyDatastoreProvider.java:224)
at org.keycloak.services.DefaultKeycloakSession.realms(DefaultKeycloakSession.java:274)
at org.keycloak.models.jpa.session.JpaUserSessionPersisterProvider.toAdapter(JpaUserSessionPersisterProvider.java:491)
at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197)
at java.base/java.util.Iterator.forEachRemaining(Iterator.java:133)
at java.base/java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1845)
at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509)
at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:921)
at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:682)
at org.keycloak.utils.ClosingStream.collect(ClosingStream.java:182)
at org.keycloak.models.jpa.session.JpaUserSessionPersisterProvider.loadUserSessionsWithClientSessions(JpaUserSessionPersisterProvider.java:423)
at org.keycloak.models.jpa.session.JpaUserSessionPersisterProvider.loadUserSessionsStream(JpaUserSessionPersisterProvider.java:382)
at org.keycloak.models.sessions.infinispan.initializer.OfflinePersistentUserSessionLoader.loadSessions(OfflinePersistentUserSessionLoader.java:101)
at org.keycloak.models.sessions.infinispan.initializer.OfflinePersistentUserSessionLoader.loadSessions(OfflinePersistentUserSessionLoader.java:37)
at org.keycloak.models.sessions.infinispan.initializer.SessionInitializerWorker$1.run(SessionInitializerWorker.java:71)
at org.keycloak.models.utils.KeycloakModelUtils.lambda$runJobInTransaction$1(KeycloakModelUtils.java:261)
at org.keycloak.models.utils.KeycloakModelUtils.runJobInTransactionWithResult(KeycloakModelUtils.java:383)
at org.keycloak.models.utils.KeycloakModelUtils.runJobInTransaction(KeycloakModelUtils.java:260)
at org.keycloak.models.sessions.infinispan.initializer.SessionInitializerWorker.apply(SessionInitializerWorker.java:67)
at org.keycloak.models.sessions.infinispan.initializer.SessionInitializerWorker.apply(SessionInitializerWorker.java:34)
at org.infinispan.manager.impl.ReplicableManagerFunctionCommand.invokeAsync(ReplicableManagerFunctionCommand.java:45)
at org.infinispan.remoting.inboundhandler.GlobalInboundInvocationHandler$ReplicableCommandRunner.run(GlobalInboundInvocationHandler.java:256)
at org.infinispan.remoting.inboundhandler.GlobalInboundInvocationHandler.handleReplicableCommand(GlobalInboundInvocationHandler.java:175)
at org.infinispan.remoting.inboundhandler.GlobalInboundInvocationHandler.handleFromCluster(GlobalInboundInvocationHandler.java:114)
at org.infinispan.remoting.transport.jgroups.JGroupsTransport.processRequest(JGroupsTransport.java:1548)
at org.infinispan.remoting.transport.jgroups.JGroupsTransport.processMessage(JGroupsTransport.java:1476)
at org.infinispan.remoting.transport.jgroups.JGroupsTransport$ChannelCallbacks.up(JGroupsTransport.java:1681)
at org.jgroups.JChannel.up(JChannel.java:733)
at org.jgroups.stack.ProtocolStack.up(ProtocolStack.java:936)
at org.jgroups.protocols.FRAG2.up(FRAG2.java:139)
at org.jgroups.protocols.FlowControl.up(FlowControl.java:253)
at org.jgroups.protocols.FlowControl.up(FlowControl.java:261)
at org.jgroups.protocols.pbcast.GMS.up(GMS.java:845)
at org.jgroups.protocols.pbcast.STABLE.up(STABLE.java:226)
at org.jgroups.protocols.UNICAST3.deliverMessage(UNICAST3.java:1083)
at org.jgroups.protocols.UNICAST3.addMessage(UNICAST3.java:822)
at org.jgroups.protocols.UNICAST3.handleDataReceived(UNICAST3.java:804)
at org.jgroups.protocols.UNICAST3.up(UNICAST3.java:453)
at org.jgroups.protocols.pbcast.NAKACK2.up(NAKACK2.java:680)
at org.jgroups.protocols.VERIFY_SUSPECT.up(VERIFY_SUSPECT.java:132)
at org.jgroups.protocols.FailureDetection.up(FailureDetection.java:180)
at org.jgroups.protocols.FD_SOCK2.up(FD_SOCK2.java:188)
at org.jgroups.protocols.MERGE3.up(MERGE3.java:274)
at org.jgroups.protocols.Discovery.up(Discovery.java:294)
at org.jgroups.stack.Protocol.up(Protocol.java:340)
at org.jgroups.protocols.TP.passMessageUp(TP.java:1184)
at org.jgroups.util.SubmitToThreadPool$SingleMessageHandler.run(SubmitToThreadPool.java:107)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
at java.base/java.lang.Thread.run(Thread.java:833)
```
Version
main
Expected behavior
Exception should not be thrown,
Actual behavior
Exception thrown, possible cause of Infinispan locking up later in the test
How to Reproduce?
Seen in logs of this run: https://github.com/keycloak/keycloak/actions/runs/6551101782/job/17792066640
Anything else?
I'll prepare a pull request.
- links to