Qpid
  1. Qpid
  2. QPID-3903

Session#close() should not wait forever if broker fails to respond to channel close (0-8..0-9-1 protocols)

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.6, 0.8, 0.10, 0.12, 0.14, 0.16
    • Fix Version/s: 0.17
    • Component/s: Java Client
    • Labels:
      None

      Description

      For the 0-8..0-9-1 protocols, if the broker fails to respond to a channel close command (for whatever reason), the client thread hangs forever. This is because AMQSession#close() uses a timeout value of -1, which is interpreted by BlockingWaiter as a indefinite wait.

      Users of the 0-10 protocol are unaffected by this defect.

              - parking to wait for <1f004f3> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
              at java.util.concurrent.locks.LockSupport.park(LockSupport.java:158)
              at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:1925)
              at org.apache.qpid.client.util.BlockingWaiter.block(BlockingWaiter.java:168)
              at org.apache.qpid.client.protocol.BlockingMethodFrameListener.blockForFrame(BlockingMethodFrameListener.java:127)
              at org.apache.qpid.client.protocol.AMQProtocolHandler.writeCommandFrameAndWaitForReply(AMQProtocolHandler.java:686)
              at org.apache.qpid.client.protocol.AMQProtocolHandler.syncWrite(AMQProtocolHandler.java:707)
              at org.apache.qpid.client.AMQSession_0_8.sendClose(AMQSession_0_8.java:162)
              at org.apache.qpid.client.AMQSession.close(AMQSession.java:723)
      

        Activity

        Keith Wall created issue -
        Keith Wall made changes -
        Field Original Value New Value
        Assignee Keith Wall [ k-wall ]
        Fix Version/s 0.17 [ 12320179 ]
        Description For the 0-8..0-9-1 protocols, if the broker fails to respond to a channel close command (for whatever reason), the client thread hangs forever. This is because AMQSession#close() uses a timeout value of -1, which is interpreted by BlockingWaiter as a indefinite wait.

        Uses of the 0-10 protocol are unaffected by this defect.


        {code}
                - parking to wait for <1f004f3> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
                at java.util.concurrent.locks.LockSupport.park(LockSupport.java:158)
                at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:1925)
                at org.apache.qpid.client.util.BlockingWaiter.block(BlockingWaiter.java:168)
                at org.apache.qpid.client.protocol.BlockingMethodFrameListener.blockForFrame(BlockingMethodFrameListener.java:127)
                at org.apache.qpid.client.protocol.AMQProtocolHandler.writeCommandFrameAndWaitForReply(AMQProtocolHandler.java:686)
                at org.apache.qpid.client.protocol.AMQProtocolHandler.syncWrite(AMQProtocolHandler.java:707)
                at org.apache.qpid.client.AMQSession_0_8.sendClose(AMQSession_0_8.java:162)
                at org.apache.qpid.client.AMQSession.close(AMQSession.java:723)
        {code}
        For the 0-8..0-9-1 protocols, if the broker fails to respond to a channel close command (for whatever reason), the client thread hangs forever. This is because AMQSession#close() uses a timeout value of -1, which is interpreted by BlockingWaiter as a indefinite wait.

        Users of the 0-10 protocol are unaffected by this defect.


        {code}
                - parking to wait for <1f004f3> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
                at java.util.concurrent.locks.LockSupport.park(LockSupport.java:158)
                at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:1925)
                at org.apache.qpid.client.util.BlockingWaiter.block(BlockingWaiter.java:168)
                at org.apache.qpid.client.protocol.BlockingMethodFrameListener.blockForFrame(BlockingMethodFrameListener.java:127)
                at org.apache.qpid.client.protocol.AMQProtocolHandler.writeCommandFrameAndWaitForReply(AMQProtocolHandler.java:686)
                at org.apache.qpid.client.protocol.AMQProtocolHandler.syncWrite(AMQProtocolHandler.java:707)
                at org.apache.qpid.client.AMQSession_0_8.sendClose(AMQSession_0_8.java:162)
                at org.apache.qpid.client.AMQSession.close(AMQSession.java:723)
        {code}
        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 ] Andrew MacBean [ macbean ]
        Andrew MacBean made changes -
        Status Ready To Review [ 10006 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]

          People

          • Assignee:
            Andrew MacBean
            Reporter:
            Keith Wall
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development