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 Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.15
    • Fix Version/s: 0.15
    • Component/s: Java Broker
    • 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

        Andrew MacBean created issue -
        Andrew MacBean made changes -
        Field Original Value New Value
        Status Open [ 1 ] In Progress [ 3 ]
        Andrew MacBean made changes -
        Andrew MacBean made changes -
        Status In Progress [ 3 ] Ready To Review [ 10006 ]
        Hide
        Andrew MacBean added a comment -

        Could you please review and apply.

        Thanks
        Andrew

        Show
        Andrew MacBean added a comment - Could you please review and apply. Thanks Andrew
        Andrew MacBean made changes -
        Assignee Andrew MacBean [ macbean ] Keith Wall [ k-wall ]
        Hide
        Keith Wall added a comment -

        No comments from me, patch applied.

        Show
        Keith Wall added a comment - No comments from me, patch applied.
        Keith Wall made changes -
        Status Ready To Review [ 10006 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Rob Godfrey made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open In Progress In Progress
        7m 32s 1 Andrew MacBean 09/Feb/12 11:38
        In Progress In Progress Reviewable Reviewable
        17m 31s 1 Andrew MacBean 09/Feb/12 11:56
        Reviewable Reviewable Resolved Resolved
        5h 40m 1 Keith Wall 09/Feb/12 17:36
        Resolved Resolved Closed Closed
        1098d 2h 30m 1 Rob Godfrey 11/Feb/15 20:06

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development