]
Will Burns updated ISPN-10330:
------------------------------
Status: Resolved (was: Pull Request Sent)
Resolution: Done
BasicComponentRegistryImpl.findFactory() concurrency issue
----------------------------------------------------------
Key: ISPN-10330
URL:
https://issues.jboss.org/browse/ISPN-10330
Project: Infinispan
Issue Type: Bug
Components: Core
Affects Versions: 10.0.0.Beta3, 9.4.15.Final
Reporter: Dan Berindei
Assignee: Dan Berindei
Priority: Major
Fix For: 10.0.0.Beta4, 9.4.16.Final
When 2 threads try to create the same component concurrently and they also end up
creating an {{AutoInstantiableFactory}} concurrently, one of them may get a
{{NullPointerException}}.
{noformat}
org.infinispan.commons.CacheConfigurationException: Failed to construct component
org.infinispan.factories.TestDelayFactory, path org.infinispan.factories.TestDelayFactory
at
org.infinispan.factories.impl.BasicComponentRegistryImpl.doInstantiateWrapper(BasicComponentRegistryImpl.java:169)
~[classes/:?]
at
org.infinispan.factories.impl.BasicComponentRegistryImpl.instantiateWrapper(BasicComponentRegistryImpl.java:156)
~[classes/:?]
at
org.infinispan.factories.impl.BasicComponentRegistryImpl.getComponent0(BasicComponentRegistryImpl.java:126)
~[classes/:?]
at
org.infinispan.factories.impl.BasicComponentRegistryImpl.getComponent(BasicComponentRegistryImpl.java:66)
~[classes/:?]
at
org.infinispan.factories.impl.BasicComponentRegistryImpl.findFactory(BasicComponentRegistryImpl.java:232)
~[classes/:?]
at
org.infinispan.factories.impl.BasicComponentRegistryImpl.getComponent0(BasicComponentRegistryImpl.java:113)
~[classes/:?]
at
org.infinispan.factories.impl.BasicComponentRegistryImpl.getComponent(BasicComponentRegistryImpl.java:66)
~[classes/:?]
at
org.infinispan.factories.impl.BasicComponentRegistryImpl.getComponent0(BasicComponentRegistryImpl.java:106)
~[classes/:?]
at
org.infinispan.factories.impl.BasicComponentRegistryImpl.getComponent(BasicComponentRegistryImpl.java:66)
~[classes/:?]
at
org.infinispan.factories.AbstractComponentRegistry.getComponent(AbstractComponentRegistry.java:232)
~[classes/:?]
at
org.infinispan.factories.AbstractComponentRegistry.getOrCreateComponent(AbstractComponentRegistry.java:162)
~[classes/:?]
at
org.infinispan.factories.ComponentRegistryTest.lambda$testConcurrentLookup$1(ComponentRegistryTest.java:75)
~[test-classes/:?]
at
org.infinispan.test.AbstractInfinispanTest$CallableWrapper.call(AbstractInfinispanTest.java:528)
[test-classes/:?]
at java.util.concurrent.FutureTask.run(FutureTask.java:264) [?:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
[?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
[?:?]
at java.lang.Thread.run(Thread.java:834) [?:?]
Caused by: java.lang.NullPointerException
at
org.infinispan.factories.impl.BasicComponentRegistryImpl.doInstantiateWrapper(BasicComponentRegistryImpl.java:166)
~[classes/:?]
... 16 more
{noformat}