[infinispan-issues] [JBoss JIRA] (ISPN-10330) BasicComponentRegistryImpl.findFactory() concurrency issue
Dan Berindei (Jira)
issues at jboss.org
Thu Jun 20 03:54:00 EDT 2019
Dan Berindei created ISPN-10330:
-----------------------------------
Summary: BasicComponentRegistryImpl.findFactory() concurrency issue
Key: ISPN-10330
URL: https://issues.jboss.org/browse/ISPN-10330
Project: Infinispan
Issue Type: Bug
Components: Core
Affects Versions: 9.4.15.Final, 10.0.0.Beta3
Reporter: Dan Berindei
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}
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
More information about the infinispan-issues
mailing list