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

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

Commit 269bfd46f3ac43ef6d1199f8cb271d117fd1ed9a in qpid-dispatch's branch 
refs/heads/main from Charles E. Rolke
[ https://gitbox.apache.org/repos/asf?p=qpid-dispatch.git;h=269bfd4 ]

DISPATCH-2194: Fix CONNECTOR - ENTITY_CACHE lock inversion

The two locks are taken in both orders.

 * entity_cache first, connector second is routinely used by management
   entity updates in a pattern shared by all entities.

 * connector first, entity_cache second is used only when a connector
   creates or deletes an associated connection. The allocation and
   disposal of the connection causes an implicit entity_cache lock.

The fix is to avoid the connector - entity_cache lock order by allocating
the connection before taking the connector lock and by freeing the
connection after releasing the connector lock.

This patch also corrects an improper free call in a failure path.


> Deadlock possible with CONNECTOR-ENTITY_CACHE lock inversion
> ------------------------------------------------------------
>
>                 Key: DISPATCH-2194
>                 URL: https://issues.apache.org/jira/browse/DISPATCH-2194
>             Project: Qpid Dispatch
>          Issue Type: Test
>    Affects Versions: 1.16.1
>            Reporter: Charles E. Rolke
>            Assignee: Charles E. Rolke
>            Priority: Major
>             Fix For: 1.17.0
>
>
> Analysis in DISPATCH-2183 shows that CONNECTOR and ENTITY_CACHE locks are 
> taken in both orders and could cause a deadlock.
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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

Reply via email to