Alex Rudyy created QPID-8342:
--------------------------------
Summary: [Broker-J] Concurrent object creation with virtual host
auto-creation policy can fail
Key: QPID-8342
URL: https://issues.apache.org/jira/browse/QPID-8342
Project: Qpid
Issue Type: Bug
Components: Broker-J
Affects Versions: qpid-java-broker-7.1.4, qpid-java-broker-7.1.3,
qpid-java-broker-7.0.8, qpid-java-broker-7.1.2, qpid-java-broker-7.1.1,
qpid-java-broker-7.0.7, qpid-java-broker-7.0.6, qpid-java-broker-7.0.5,
qpid-java-broker-7.0.4, qpid-java-broker-7.1.0, qpid-java-6.1.7,
qpid-java-broker-7.0.1, qpid-java-broker-7.0.0
Reporter: Alex Rudyy
Fix For: qpid-java-broker-7.1.5
When the same non-existing object is requested from multiple connections (for
example, on receiving multiple link attach performatives) and matching
auto-creation policy creates the object, the failures can be reported on some
of the incoming requests due to {{DuplicateNameException}}.
The following stack trace ican bereported into the broker logs for the impacted
connections:
{noformat}
INFO [IO-/0:0:0:0:0:0:0:1:35050] (o.a.q.s.v.AbstractVirtualHost) - Unable to
auto create a node named foo due to exception
org.apache.qpid.server.model.AbstractConfiguredObject$DuplicateNameException:
Child of type StandardQueueImplWithAccessChecking already exists with name of
foo
return node;
at
org.apache.qpid.server.model.AbstractConfiguredObject.registerChild(AbstractConfiguredObject.java:2131)
at
org.apache.qpid.server.model.AbstractConfiguredObject.registerWithParents(AbstractConfiguredObject.java:689)
at
org.apache.qpid.server.model.AbstractConfiguredObject$6.execute(AbstractConfiguredObject.java:882)
at
org.apache.qpid.server.model.AbstractConfiguredObject$6.execute(AbstractConfiguredObject.java:868)
at
org.apache.qpid.server.model.AbstractConfiguredObject$2.execute(AbstractConfiguredObject.java:639)
at
org.apache.qpid.server.model.AbstractConfiguredObject$2.execute(AbstractConfiguredObject.java:632)
at
org.apache.qpid.server.configuration.updater.TaskExecutorImpl$TaskLoggingWrapper.execute(TaskExecutorImpl.java:248)
at
org.apache.qpid.server.configuration.updater.TaskExecutorImpl.submitWrappedTask(TaskExecutorImpl.java:165)
at
org.apache.qpid.server.configuration.updater.TaskExecutorImpl.submit(TaskExecutorImpl.java:153)
at
org.apache.qpid.server.model.AbstractConfiguredObject.doOnConfigThread(AbstractConfiguredObject.java:631)
at
org.apache.qpid.server.model.AbstractConfiguredObject.createAsync(AbstractConfiguredObject.java:867)
at
org.apache.qpid.server.model.AbstractConfiguredObjectTypeFactory.createAsync(AbstractConfiguredObjectTypeFactory.java:75)
at
org.apache.qpid.server.queue.QueueFactory.createAsync(QueueFactory.java:58)
at
org.apache.qpid.server.model.ConfiguredObjectFactoryImpl.createAsync(ConfiguredObjectFactoryImpl.java:145)
at
org.apache.qpid.server.model.AbstractConfiguredObject.addChildAsync(AbstractConfiguredObject.java:2113)
at
org.apache.qpid.server.virtualhost.AbstractVirtualHost.addChildAsync(AbstractVirtualHost.java:864)
at
org.apache.qpid.server.model.AbstractConfiguredObject$17.execute(AbstractConfiguredObject.java:2070)
at
org.apache.qpid.server.model.AbstractConfiguredObject$17.execute(AbstractConfiguredObject.java:2065)
at
org.apache.qpid.server.model.AbstractConfiguredObject$2.execute(AbstractConfiguredObject.java:639)
at
org.apache.qpid.server.model.AbstractConfiguredObject$2.execute(AbstractConfiguredObject.java:632)
at
org.apache.qpid.server.configuration.updater.TaskExecutorImpl$TaskLoggingWrapper.execute(TaskExecutorImpl.java:248)
at
org.apache.qpid.server.configuration.updater.TaskExecutorImpl$CallableWrapper$1.run(TaskExecutorImpl.java:320)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:360)
at
org.apache.qpid.server.configuration.updater.TaskExecutorImpl$CallableWrapper.call(TaskExecutorImpl.java:313)
at
com.google.common.util.concurrent.TrustedListenableFutureTask$TrustedFutureInterruptibleTask.runInterruptibly(TrustedListenableFutureTask.java:125)
at
com.google.common.util.concurrent.InterruptibleTask.run(InterruptibleTask.java:57)
at
com.google.common.util.concurrent.TrustedListenableFutureTask.run(TrustedListenableFutureTask.java:78)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at
org.apache.qpid.server.bytebuffer.QpidByteBufferFactory.lambda$null$0(QpidByteBufferFactory.java:464)
at java.lang.Thread.run(Thread.java:748)
{noformat}
The object creation with auto-creation policy should handle
{{DuplicateNameException}} on attempt to create the same object which has been
already created concurrently.
--
This message was sent by Atlassian JIRA
(v7.6.14#76016)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]