Bug 893980 - Timeout waiting for sync on declaring queue/topic with the same identifier
Timeout waiting for sync on declaring queue/topic with the same identifier
Status: CLOSED ERRATA
Product: Red Hat Enterprise MRG
Classification: Red Hat
Component: qpid-java (Show other bugs)
Development
Unspecified Unspecified
medium Severity medium
: 2.3
: ---
Assigned To: Rajith Attapattu
Petr Matousek
: Regression
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-01-10 07:51 EST by Petr Matousek
Modified: 2013-03-06 13:53 EST (History)
4 users (show)

See Also:
Fixed In Version: qpid-java-0.18-7
Doc Type: Bug Fix
Doc Text:
Cause: The underlying root cause was due to the producer trying to delete a non existent subscription queue. This causes a session error, which doesn't get picked up by the client while it's waiting for completion. Eventually the wait timesout. Consequence: The client appears to hang and then timesout. Fix: The producers does not attempt to delete the subscription queue. However the underlying issue with regards to error handling is still there. Result: The client does not timeout anymore.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-03-06 13:53:13 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
qpid-java-*-0.18-6, qpid-cpp-*-0.18-13 transcript (13.53 KB, text/plain)
2013-01-10 07:55 EST, Petr Matousek
no flags Details
qpid-java-*-0.18-2.el5, qpid-cpp-*-0.14-22.el5 transcript (9.21 KB, text/plain)
2013-01-10 07:56 EST, Petr Matousek
no flags Details


External Trackers
Tracker ID Priority Status Summary Last Updated
Apache JIRA QPID-4540 None None None Never

  None (edit)
Description Petr Matousek 2013-01-10 07:51:25 EST
Description of problem:

Declare a queue and after that declare an exchange with the same identifier.
However both queue and exchange is created, following exception is thrown: 

AMQException: timed out waiting for sync: not-found: Delete failed. No such queue

Declaring the ambiguous address in the opposite order (an exchange first, then a queue) seems to be working fine. But the exception occurs by sending a message to that exchange as well.

Summarizing: The ambiguous address can be created (queue and exchange with the same name), messages seems to be delivered properly to both queue and exchange, but timeout exception shall not appear.

This worked fine on latest release (qpid-java-*-0.18-2.el5, qpid-cpp-*-0.14-22.el5), so marking this issue as regression.

Please see additional info for more information.

Version-Release number of selected component (if applicable):
qpid-java-*-0.18-6
qpid-cpp-*-0.18-13

How reproducible:
100%

Steps to Reproduce:
1. java -cp ${CLASSPATH} org.apache.qpid.example.Spout "q_ex;{ create:sender, node: { type:queue }}"
2. java -cp ${CLASSPATH} org.apache.qpid.example.Spout "q_ex;{ create:sender, node: { type:topic }}"
3. exception
  
Actual results:
Several exceptions on ambiguous address creation / message delivery.

Expected results:
No exceptions on ambiguous address creation / message delivery.
Set of commands in additional info do not produce unexpected exceptions.

Additional info:

Assume following set of commands:

1. java -cp ${CLASSPATH} org.apache.qpid.example.Spout "ex_q;{ create:sender, node: { type:topic }}"
2. java -cp ${CLASSPATH} org.apache.qpid.example.Spout "ex_q;{ create:sender, node: { type:queue }}"
3. java -cp ${CLASSPATH} org.apache.qpid.example.Spout "ex_q"
4. java -cp ${CLASSPATH} org.apache.qpid.example.Spout "ex_q;{node:{type:topic}}"
5. java -cp ${CLASSPATH} org.apache.qpid.example.Spout "ex_q;{node:{type:queue}}"


6. java -cp ${CLASSPATH} org.apache.qpid.example.Spout "q_ex;{ create:sender, node: { type:queue }}"
7. java -cp ${CLASSPATH} org.apache.qpid.example.Spout "q_ex;{ create:sender, node: { type:topic }}"
8. java -cp ${CLASSPATH} org.apache.qpid.example.Spout "q_ex"
9. java -cp ${CLASSPATH} org.apache.qpid.example.Spout "q_ex;{node:{type:queue}}"
10. java -cp ${CLASSPATH} org.apache.qpid.example.Spout "q_ex;{node:{type:topic}}"

All the addresses are created (queue and exchange named 'ex_q', queue and exchange named 'q_ex'), messages are delivered correctly (2 messages to each address). 

But exceptions are raised in step 4, 7, 10, these exceptions shall not appear. An exception is also raised in step 3. and 8. which is correct (user has to specify ambiguous address type).

Please see the attached transcripts for more details.
Comment 1 Petr Matousek 2013-01-10 07:55:45 EST
Created attachment 676298 [details]
qpid-java-*-0.18-6, qpid-cpp-*-0.18-13 transcript
Comment 2 Petr Matousek 2013-01-10 07:56:35 EST
Created attachment 676299 [details]
qpid-java-*-0.18-2.el5, qpid-cpp-*-0.14-22.el5 transcript
Comment 4 Justin Ross 2013-01-10 10:46:00 EST
Rajith, please assess.
Comment 5 Rajith Attapattu 2013-01-16 20:15:32 EST
I have made a fix upstream at http://svn.apache.org/viewvc?rev=1434492&view=rev
The issue is tracked via QPID-4540

The underlying root cause was due to the producer trying to delete a non existing subscription queue. The delicate situation in the error handling compounded the problem by manifesting it as a timeout.

I have tested all the cases as outlined in the BZ as verification in addition to enhancing an existing system test to verify the root cause.
Comment 8 Petr Matousek 2013-01-24 10:38:31 EST
This issue has been fixed.

Verified on rhel5.9 and rhel6.4 Beta (x86_64, i386)

packages used for testing:
qpid-java-*-0.18-7

-> VERIFIED
Comment 11 errata-xmlrpc 2013-03-06 13:53:13 EST
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHSA-2013-0561.html

Note You need to log in before you can comment on or make changes to this bug.