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

Long-lived connections leak sessions and links

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • proton-0.9.1, proton-0.10
    • None
    • proton-c

    Description

      I found this issue while debugging a crash dump of qpidd.

      Long lived connections do not free its sessions/link.

      This only applies when NOT using the event model. The version of qpidd I tested against (0.30) still uses the iterative model. Point to consider, I don't know why this is the case.

      Details: I have a test script that opens a single connection, then continually creates sessions/links over that connection, sending one message before closing and freeing the sessions/links. See attached.

      Over time the qpidd run time consumes all memory on the system and is killed by OOM. To be clear, I'm using drain to remove all sent messages - there is no message build up.

      On debugging this, I'm finding thousands of session objects on the connections free sessions weakref list. Every one of those sessions has a refcount of one.

      Once the connection is finalized, all session objects are freed. But until then, freed sessions continue to accumulate indefinitely.

      Attachments

        1. link-leak.c
          4 kB
          Alan Conway
        2. test-send.py
          5 kB
          Ken Giusti

        Issue Links

          Activity

            People

              aconway Alan Conway
              kgiusti Ken Giusti
              Votes:
              1 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: