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

closed links are never deleted

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • proton-c
    • miserable

    Description

      I wrote a reactor-based application that makes a single connection, and then repeatedly makes-and-closes links (receivers) on that connection.

      It makes and closes the links as fast as possible: as soon as it gets the on_receiver_close event, it makes a new one. As soon as it gets the on_receiver_open event – it closes that receiver.

      This application talks to a dispatch router.

      Problem: Both the router and my application grow their memory (RSS) rapidly – and the router's ability to respond to new link creations slows down rapidly. Looking at the router with Valgrind/Callgrind, after about 15,000 links have been created and closed I see that 45% of all CPU time on the router is being consumed by pn_find_link(). Instrumenting that code, I see that the list it is looking at never decreases in size.

      I tried creating my links with the "lifetime_policy" set to DELETE_ON_CLOSE, but that had no effect. Grepping for that symbol, I see that it does not occur in the proton C code except in its definition, and in a printing convenience function.

      Major scalability bug.

      Attachments

        Activity

          People

            cliffjansen Clifford Jansen
            mgoulish Michael Goulish
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: