Qpid
  1. Qpid
  2. QPID-3707

Unbind queue causes connection failure when using AMQP 0-9-1

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.12, 0.15
    • Fix Version/s: 0.15
    • Component/s: Java Broker
    • Labels:
      None

      Description

      The broker sends a FIN after receiving an unbind queue command. The stack trace (below) shows a ClassCastException caused by attempting to cast a MethodRegistry_0_91 to a MethodRegistry_0_9. The offending line of code appears to be line 117 in the QueueUnbindHandler (trunk):

      MethodRegistry_0_9 methodRegistry = (MethodRegistry_0_9) session.getMethodRegistry();

      Compare to line 153 in QueueBindHandler (trunk) which reads:

      MethodRegistry methodRegistry = protocolConnection.getMethodRegistry();

      Note: reproduced against version 0.12 and trunk r1221838.

      2011-12-20 15:23:53,157 INFO [pool-3-thread-19] logging.Log4jMessageLogger (Log4jMessageLogger.java:72) - [con:0(guest@/127.0.0.1:51326/test)/ch:2] [vh(/test)/ex(fanout/demo_exchange)/qu(client259647)/rk(broadcastkey)] BND-1002 : Deleted
      2011-12-20 15:23:53,158 ERROR [pool-3-thread-19] protocol.AMQProtocolEngine (AMQProtocolEngine.java:456) - Unexpected exception while processing frame. Closing connection.
      java.lang.ClassCastException: org.apache.qpid.framing.amqp_0_91.MethodRegistry_0_91 cannot be cast to org.apache.qpid.framing.amqp_0_9.MethodRegistry_0_9
      at org.apache.qpid.server.handler.QueueUnbindHandler.methodReceived(QueueUnbindHandler.java:117)
      at org.apache.qpid.server.handler.ServerMethodDispatcherImpl_0_91.dispatchQueueUnbind(ServerMethodDispatcherImpl_0_91.java:165)
      at org.apache.qpid.framing.amqp_0_91.QueueUnbindBodyImpl.execute(QueueUnbindBodyImpl.java:152)
      at org.apache.qpid.server.state.AMQStateManager.methodReceived(AMQStateManager.java:205)
      at org.apache.qpid.server.protocol.AMQProtocolEngine.methodFrameReceived(AMQProtocolEngine.java:390)
      at org.apache.qpid.framing.AMQMethodBodyImpl.handle(AMQMethodBodyImpl.java:93)
      at org.apache.qpid.server.protocol.AMQProtocolEngine.frameReceived(AMQProtocolEngine.java:334)
      at org.apache.qpid.server.protocol.AMQProtocolEngine.dataBlockReceived(AMQProtocolEngine.java:283)
      at org.apache.qpid.server.protocol.AMQProtocolEngine$1.run(AMQProtocolEngine.java:254)
      at org.apache.qpid.pool.Job.processAll(Job.java:110)
      at org.apache.qpid.pool.Job.run(Job.java:149)
      at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
      at java.lang.Thread.run(Thread.java:662)

        Activity

        Frank Salim created issue -
        Frank Salim made changes -
        Field Original Value New Value
        Affects Version/s 0.12 [ 12316848 ]
        Frank Salim made changes -
        Affects Version/s 0.15 [ 12319043 ]
        Description The broker sends a FIN after receiving an unbind queue command. The stack trace (below) shows a ClassCastException caused by attempting to cast a MethodRegistry_0_91 to a MethodRegistry_0_9. The offending line of code appears to be line 117 in the QueueUnbindHandler (trunk):

        MethodRegistry_0_9 methodRegistry = (MethodRegistry_0_9) session.getMethodRegistry();

        Compare to line 153 in QueueBindHandler (trunk) which reads:

        MethodRegistry methodRegistry = protocolConnection.getMethodRegistry();




        2011-12-20 15:23:53,157 INFO [pool-3-thread-19] logging.Log4jMessageLogger (Log4jMessageLogger.java:72) - [con:0(guest@/127.0.0.1:51326/test)/ch:2] [vh(/test)/ex(fanout/demo_exchange)/qu(client259647)/rk(broadcastkey)] BND-1002 : Deleted
        2011-12-20 15:23:53,158 ERROR [pool-3-thread-19] protocol.AMQProtocolEngine (AMQProtocolEngine.java:456) - Unexpected exception while processing frame. Closing connection.
        java.lang.ClassCastException: org.apache.qpid.framing.amqp_0_91.MethodRegistry_0_91 cannot be cast to org.apache.qpid.framing.amqp_0_9.MethodRegistry_0_9
        at org.apache.qpid.server.handler.QueueUnbindHandler.methodReceived(QueueUnbindHandler.java:117)
        at org.apache.qpid.server.handler.ServerMethodDispatcherImpl_0_91.dispatchQueueUnbind(ServerMethodDispatcherImpl_0_91.java:165)
        at org.apache.qpid.framing.amqp_0_91.QueueUnbindBodyImpl.execute(QueueUnbindBodyImpl.java:152)
        at org.apache.qpid.server.state.AMQStateManager.methodReceived(AMQStateManager.java:205)
        at org.apache.qpid.server.protocol.AMQProtocolEngine.methodFrameReceived(AMQProtocolEngine.java:390)
        at org.apache.qpid.framing.AMQMethodBodyImpl.handle(AMQMethodBodyImpl.java:93)
        at org.apache.qpid.server.protocol.AMQProtocolEngine.frameReceived(AMQProtocolEngine.java:334)
        at org.apache.qpid.server.protocol.AMQProtocolEngine.dataBlockReceived(AMQProtocolEngine.java:283)
        at org.apache.qpid.server.protocol.AMQProtocolEngine$1.run(AMQProtocolEngine.java:254)
        at org.apache.qpid.pool.Job.processAll(Job.java:110)
        at org.apache.qpid.pool.Job.run(Job.java:149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
        at java.lang.Thread.run(Thread.java:662)
        The broker sends a FIN after receiving an unbind queue command. The stack trace (below) shows a ClassCastException caused by attempting to cast a MethodRegistry_0_91 to a MethodRegistry_0_9. The offending line of code appears to be line 117 in the QueueUnbindHandler (trunk):

        MethodRegistry_0_9 methodRegistry = (MethodRegistry_0_9) session.getMethodRegistry();

        Compare to line 153 in QueueBindHandler (trunk) which reads:

        MethodRegistry methodRegistry = protocolConnection.getMethodRegistry();

        Note: reproduced against version 0.12 and trunk r1221838.


        2011-12-20 15:23:53,157 INFO [pool-3-thread-19] logging.Log4jMessageLogger (Log4jMessageLogger.java:72) - [con:0(guest@/127.0.0.1:51326/test)/ch:2] [vh(/test)/ex(fanout/demo_exchange)/qu(client259647)/rk(broadcastkey)] BND-1002 : Deleted
        2011-12-20 15:23:53,158 ERROR [pool-3-thread-19] protocol.AMQProtocolEngine (AMQProtocolEngine.java:456) - Unexpected exception while processing frame. Closing connection.
        java.lang.ClassCastException: org.apache.qpid.framing.amqp_0_91.MethodRegistry_0_91 cannot be cast to org.apache.qpid.framing.amqp_0_9.MethodRegistry_0_9
        at org.apache.qpid.server.handler.QueueUnbindHandler.methodReceived(QueueUnbindHandler.java:117)
        at org.apache.qpid.server.handler.ServerMethodDispatcherImpl_0_91.dispatchQueueUnbind(ServerMethodDispatcherImpl_0_91.java:165)
        at org.apache.qpid.framing.amqp_0_91.QueueUnbindBodyImpl.execute(QueueUnbindBodyImpl.java:152)
        at org.apache.qpid.server.state.AMQStateManager.methodReceived(AMQStateManager.java:205)
        at org.apache.qpid.server.protocol.AMQProtocolEngine.methodFrameReceived(AMQProtocolEngine.java:390)
        at org.apache.qpid.framing.AMQMethodBodyImpl.handle(AMQMethodBodyImpl.java:93)
        at org.apache.qpid.server.protocol.AMQProtocolEngine.frameReceived(AMQProtocolEngine.java:334)
        at org.apache.qpid.server.protocol.AMQProtocolEngine.dataBlockReceived(AMQProtocolEngine.java:283)
        at org.apache.qpid.server.protocol.AMQProtocolEngine$1.run(AMQProtocolEngine.java:254)
        at org.apache.qpid.pool.Job.processAll(Job.java:110)
        at org.apache.qpid.pool.Job.run(Job.java:149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
        at java.lang.Thread.run(Thread.java:662)
        Keith Wall made changes -
        Assignee Keith Wall [ k-wall ]
        Keith Wall made changes -
        Status Open [ 1 ] In Progress [ 3 ]
        Keith Wall made changes -
        Status In Progress [ 3 ] Ready To Review [ 10006 ]
        Keith Wall made changes -
        Assignee Keith Wall [ k-wall ] Robbie Gemmell [ gemmellr ]
        Keith Wall made changes -
        Fix Version/s 0.15 [ 12319043 ]
        Robbie Gemmell made changes -
        Status Ready To Review [ 10006 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]

          People

          • Assignee:
            Robbie Gemmell
            Reporter:
            Frank Salim
          • Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development