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

Dispatch reestablishes connection inspite of deleting the connector

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.0.0
    • 1.0.1
    • Container
    • None

    Description

      There is a race condition happening when a connector is deleted.

      On connector delete, the following function is called

      void qd_connection_manager_delete_connector(qd_dispatch_t *qd, void *impl)
      {
          qd_connector_t *ct = (qd_connector_t*) impl;
          if (ct) {
              sys_mutex_lock(ct->lock);
              if (ct->ctx && ct->ctx->pn_conn) {
                  qd_connection_invoke_deferred(ct->ctx, deferred_close, ct->ctx->pn_conn);
              }
              sys_mutex_unlock(ct->lock);
              DEQ_REMOVE(qd->connection_manager->connectors, ct);
              qd_connector_decref(ct);
          }
      }
      

      The deferred_close() is invoked before qd_connector_decref() is invoked hence the connection's connector is still in place and the connector is re-established.

      Attachments

        Issue Links

          Activity

            People

              gmurthy Ganesh Murthy
              gmurthy Ganesh Murthy
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: