Uploaded image for project: 'Qpid Proton'
  1. Qpid Proton
  2. PROTON-965

[proton-j] freed receiver link may cause a removal from the wrong collection in the session

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: proton-0.9.1
    • Fix Version/s: proton-0.10
    • Component/s: proton-j
    • Labels:
      None

      Description

      The changes for PROTON-853 contained a defect, as it left an old method call in place that should have been removed.

      When a receiver link object is free'd, the parent session is informed and removes the link from a collection. Following PROTON-853 there are two such collections, an existing map of current reciever links and a new list of old stale links, of which the given object may be in one. The intent of the SessionImpl#freeReceiver() method is to remove a receiver from the appropriate list, however the old single-line "_receivers.remove(receiver.getName());" implementation from before PRTON-853 was somehow left in place meaning it is always called before the new implementation follows which understands the dual collections. As a result, a link object may be removed from the map incorrectly in certain cases (if it happened to have the same name, but was a different object, from the freed object).

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: