Uploaded image for project: 'Qpid'
  1. Qpid
  2. QPID-8212

[JMS AMQP 0-x][AMQP 0-8..0-91] Consumer close can block for 60 seconds and endup in time-out exception

    XMLWordPrintableJSON

Details

    Description

      When method MessageConsumer#close() is invoked in one thread and method Connection#close() is invoked in another thread, the incoming BasicCancelOk frame can be ignored due to true being returned from Session#isClosed()  because of Connection#_closed flag being set to true on connection close. As result, the call to MessageConsumer#close() can block for 60 seconds and end up in exception due to not being able to receive BasicCancelOk. Invocation of Connection#close() also gets blocked as message delivery lock being hold on consumer close.

      The defect was introduced as part of changes made against QPID-8185 in commit
      f89f6c2f45d11fc63551d0d61c17eceedd6bd247

      Method AMQProtocolSession#isClosedForInput checks whether session is closed for input by calling AMQSession#isClosed(). The latter returns true when either AMQSession#_closed or AMQConnection#_closed holds true. Only AMQSession#_closed should be checked in AMQProtocolSession#isClosedForInput.

      Attachments

        Activity

          People

            orudyy Alex Rudyy
            orudyy Alex Rudyy
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: