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

nulling the MessageReference handle on the Message during QueueEntry disposal can result in NPE

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 0.6
    • Fix Version/s: 0.7
    • Component/s: Java Broker
    • Labels:
      None

      Description

      Nulling the MessageReference handle on the Message during QueueEntry disposal can result in NPE in various places throughout the broker, when attempts from seperate areas of the broker to retrieve details that are held only in the Message overlap the reference update and encounter unexpected NPE's. The reference nulling should be removed until this can be accounted for. (It is no longer as necessary as it once was, thanks to more aggressive QueueEntry scavenging in the QueueEntryList)

        Activity

        Hide
        gemmellr Robbie Gemmell added a comment -

        Removed used of the AtomicReferenceUpdater to null/retrieve the entry during release, and replaced with a guarding AtomicBoolean to ensure the continued once-only effect of onRelease() when releasing the MessageReference.

        Show
        gemmellr Robbie Gemmell added a comment - Removed used of the AtomicReferenceUpdater to null/retrieve the entry during release, and replaced with a guarding AtomicBoolean to ensure the continued once-only effect of onRelease() when releasing the MessageReference.
        Hide
        marnie Marnie McCormack added a comment -

        Review ok, but we'd possibly be better to fix the NPE handling in the affected areas. Leaving the message handle seems a little wrong, even if it does get scavenged later.

        Show
        marnie Marnie McCormack added a comment - Review ok, but we'd possibly be better to fix the NPE handling in the affected areas. Leaving the message handle seems a little wrong, even if it does get scavenged later.

          People

          • Assignee:
            gemmellr Robbie Gemmell
            Reporter:
            gemmellr Robbie Gemmell
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development