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

ServerSession unblock(AMQQueue) can cause NPE when trying to remove a queue from _blockingQueues Map that is not present

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 0.15
    • Fix Version/s: 0.15
    • Component/s: Broker-J
    • Labels:
      None

      Description

      When running multiple producers and a single consumer on a queue, the unblock code NPEs when trying to remove a queue entry, from the _blockingQueues Map, that is not present. This is due to the Map being given a Boolean keyed by Queue and in the case above the Map.remove() method returns null.

      The data structures used to hold the blocking queues and sessions used in SimpleAMQQueue and the AMQSessionModel implementations (ServerSession & AMQCHannel) should be changed from ConcurrentMaps to Sets - specifically ConcurrentSkipListSet. This will prevent the NPE from being possible.

        Activity

        Hide
        k-wall Keith Wall added a comment -

        No comments from me, patch applied.

        Show
        k-wall Keith Wall added a comment - No comments from me, patch applied.
        Hide
        macbean Andrew MacBean added a comment -

        Could you please review and apply.

        Thanks
        Andrew

        Show
        macbean Andrew MacBean added a comment - Could you please review and apply. Thanks Andrew

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development