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

ASF subversion and git services commented on PROTON-2483:
---------------------------------------------------------

Commit c6db2b089c6c40c46b5e37a701164bbce3f5ebf9 in qpid-proton's branch 
refs/heads/main from Clifford Jansen
[ https://gitbox.apache.org/repos/asf?p=qpid-proton.git;h=c6db2b0 ]

PROTON-2483: epoll proactor TSAN race - ensure task locks not held when calling 
pni_timer_set()


> TSAN reported potential deadlock in epoll proactor when run via Qpid Dispatch 
> router.
> -------------------------------------------------------------------------------------
>
>                 Key: PROTON-2483
>                 URL: https://issues.apache.org/jira/browse/PROTON-2483
>             Project: Qpid Proton
>          Issue Type: Bug
>          Components: proton-c
>    Affects Versions: proton-c-0.36.0
>         Environment: linux epoll
>            Reporter: Clifford Jansen
>            Assignee: Clifford Jansen
>            Priority: Major
>         Attachments: tsan_out.txt
>
>
> The traces are incomplete but the 4 way thread tangle can be inferred as 
> follows:
>   A: pn_proactor_set_timeout()   (p->task.mutex + tm->task.mutex)
>   B: pni_timer_manager_process() (tm->task.mutex + tm->deletion_mutex)
>   C: pni_connection_timeout()    (tm->deletion_mutex + pc1->task.mutex)
>   D: proactor_remove()           (pc1->task.mutex + p->task.mutex)
> While this particular trace is a false positive (D occurs after all other 
> threads have been joined and there are no competing threads to complete the 
> circle), the lock ordering is clearly asking for eventual trouble.
> The proactor set_timeout and cancel_timeout API calls do not need to hold the 
> proactor task lock while interacting with the timer manager, but do so as a 
> convenience to prevent collisions between simultaneous sets/cancels.  A 
> separate lock can achieve that purpose, stopping A from participating in the 
> potential deadlock.
>  



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

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

Reply via email to