-
Bug
-
Resolution: Done
-
Major
-
4.2.1.FINAL, 5.0.0.ALPHA4
-
None
The HotRod client test suite sometimes sometimes hangs on my machine and the thread dump shows a lot of stack traces like this:
"pool-2-thread-20" prio=10 tid=0x6a63ec00 nid=0x2d71 runnable [0x6943e000]
java.lang.Thread.State: RUNNABLE
at java.util.HashMap.get(HashMap.java:320)
at org.infinispan.factories.ComponentRegistry.isGlobal(ComponentRegistry.java:138)
at org.infinispan.factories.ComponentRegistry.registerComponent(ComponentRegistry.java:130)
at org.infinispan.factories.AbstractComponentRegistry.registerComponent(AbstractComponentRegistry.java:185)
at org.infinispan.factories.AbstractComponentRegistry.getOrCreateComponent(AbstractComponentRegistry.java:326)
at org.infinispan.factories.AbstractComponentRegistry.invokeInjectionMethod(AbstractComponentRegistry.java:254)
at org.infinispan.factories.AbstractComponentRegistry$Component.injectDependencies(AbstractComponentRegistry.java:843)
at org.infinispan.factories.AbstractComponentRegistry.registerComponent(AbstractComponentRegistry.java:228)
at org.infinispan.factories.ComponentRegistry.registerComponent(ComponentRegistry.java:133)
at org.infinispan.factories.AbstractComponentRegistry.registerComponent(AbstractComponentRegistry.java:185)
at org.infinispan.factories.InternalCacheFactory.bootstrap(InternalCacheFactory.java:102)
at org.infinispan.factories.InternalCacheFactory.createAndWire(InternalCacheFactory.java:77)
at org.infinispan.factories.InternalCacheFactory.createCache(InternalCacheFactory.java:61)
at org.infinispan.manager.DefaultCacheManager.createCache(DefaultCacheManager.java:538)
at org.infinispan.manager.DefaultCacheManager.getCache(DefaultCacheManager.java:443)
at org.infinispan.manager.DefaultCacheManager.getCache(DefaultCacheManager.java:412)
at org.infinispan.server.core.AbstractProtocolServer.startDefaultCache(AbstractProtocolServer.scala:108)
at org.infinispan.server.core.AbstractProtocolServer.start(AbstractProtocolServer.scala:69)
at org.infinispan.server.hotrod.HotRodServer.start(HotRodServer.scala:48)
at org.infinispan.server.hotrod.test.HotRodTestingUtil$.startHotRodServer(HotRodTestingUtil.scala:77)
at org.infinispan.server.hotrod.test.HotRodTestingUtil$.startHotRodServer(HotRodTestingUtil.scala:57)
at org.infinispan.server.hotrod.test.HotRodTestingUtil$.startHotRodServer(HotRodTestingUtil.scala:46)
at org.infinispan.server.hotrod.test.HotRodTestingUtil$.startHotRodServer(HotRodTestingUtil.scala:43)
at org.infinispan.server.hotrod.test.HotRodTestingUtil$.startHotRodServer(HotRodTestingUtil.scala:37)
at org.infinispan.server.hotrod.test.HotRodTestingUtil.startHotRodServer(HotRodTestingUtil.scala)
at org.infinispan.client.hotrod.TestHelper.startHotRodServer(TestHelper.java:34)
at org.infinispan.client.hotrod.CacheManagerStoppedTest.createCacheManager(CacheManagerStoppedTest.java:31)
This seems to be caused by the fact that the componentScopesLookup map is not synchronized and multiple threads write to it at the same time, leaving it in an invalid state.