You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by "ASF subversion and git services (JIRA)" <ji...@apache.org> on 2017/11/28 14:48:00 UTC

[jira] [Commented] (DISPATCH-887) Dispatch reestablishes connection inspite of deleting the connector

    [ https://issues.apache.org/jira/browse/DISPATCH-887?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16268843#comment-16268843 ] 

ASF subversion and git services commented on DISPATCH-887:
----------------------------------------------------------

Commit e2a05e14eaa5740cfcd1d6be528ee548aa000441 in qpid-dispatch's branch refs/heads/master from [~ganeshmurthy]
[ https://git-wip-us.apache.org/repos/asf?p=qpid-dispatch.git;h=e2a05e1 ]

DISPATCH-887 - Fix race condition that led to connection reopen in spite of connector being deleted


> Dispatch reestablishes connection inspite of deleting the connector
> -------------------------------------------------------------------
>
>                 Key: DISPATCH-887
>                 URL: https://issues.apache.org/jira/browse/DISPATCH-887
>             Project: Qpid Dispatch
>          Issue Type: Bug
>          Components: Container
>    Affects Versions: 1.0.0
>            Reporter: Ganesh Murthy
>            Assignee: Ganesh Murthy
>             Fix For: 1.1.0
>
>
> There is a race condition happening when a connector is deleted.
> On connector delete, the following function is called 
> {code}
> 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);
>     }
> }
> {code}
> 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.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org