Uploaded image for project: 'Qpid Dispatch'
  1. Qpid Dispatch
  2. DISPATCH-1391

Proton link reference not cleared on router link objects during session close

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.8.0
    • Fix Version/s: 1.9.0
    • Component/s: Container
    • Labels:
      None

      Description

      When the following program is run against the router, it  crashes -

      from proton.utils import BlockingConnection
      from time import sleep
      
      ROUTER_ADDRESS = "amqp://127.0.0.1:5672"
      RECEIVER_ADDRESS = "examples-receiver"
      
      c = BlockingConnection(ROUTER_ADDRESS)
      count = 0
      
      while True:
          count += 1
          r = c.create_receiver(RECEIVER_ADDRESS + str(count))
          r.session.close()
          if count == 5:
              break
      
      
      Here is the backtrace
      
      (gdb) bt
      #0  pn_terminus_set_address (terminus=0x0, address=0x7f3dc8039aa0 "examples-receiver2") at /home/gmurthy/opensource/qpid-proton/c/src/core/engine.c:1241
      #1  0x00007f3de2836a2a in qdr_terminus_copy (from=from@entry=0x7f3dc803dd18, to=0x0) at /home/gmurthy/opensource/qpid-dispatch/src/router_core/terminus.c:92
      #2  0x00007f3de283fe1e in CORE_link_second_attach (context=<optimized out>, link=<optimized out>, source=0x7f3dc803dd18, target=0x7f3dc803dc18) at /home/gmurthy/opensource/qpid-dispatch/src/router_node.c:1322
      #3  0x00007f3de28279c1 in qdr_connection_process (conn=0x7f3dc801b198) at /home/gmurthy/opensource/qpid-dispatch/src/router_core/connections.c:253
      #4  0x00007f3de280f0f8 in writable_handler (container=0x171c000, container=0x171c000, conn=0x7f3dc400eb58, qd_conn=0x7f3dc400eb58) at /home/gmurthy/opensource/qpid-dispatch/src/container.c:332
      #5  qd_container_handle_event (container=0x171c000, event=event@entry=0x7f3dc80134e0, conn=conn@entry=0x7f3dc4018b00, qd_conn=qd_conn@entry=0x7f3dc400eb58) at /home/gmurthy/opensource/qpid-dispatch/src/container.c:642
      #6  0x00007f3de2845442 in handle (qd_server=qd_server@entry=0x1699ba0, e=e@entry=0x7f3dc80134e0, pn_conn=pn_conn@entry=0x7f3dc4018b00, ctx=ctx@entry=0x7f3dc400eb58) at /home/gmurthy/opensource/qpid-dispatch/src/server.c:985
      #7  0x00007f3de284607c in thread_run (arg=0x1699ba0) at /home/gmurthy/opensource/qpid-dispatch/src/server.c:1010
      #8  0x00007f3de275d4c0 in start_thread () from /lib64/libpthread.so.0
      #9  0x00007f3de23bb133 in clone () from /lib64/libc.so.6
      (gdb) 
      

      This is happening because the pn_link references are not cleaned up on router link objects (qd_link_t) during session close

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                gmurthy Ganesh Murthy
                Reporter:
                gmurthy Ganesh Murthy
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: