Qpid
  1. Qpid
  2. QPID-2931

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

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Critical 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
        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
        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 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 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:
            Robbie Gemmell
            Reporter:
            Robbie Gemmell
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development