[asterisk-bugs] [JIRA] (ASTERISK-22976) app_queue function queue_show() and find_queue_by_name_rt() cause deadlock
Aaron An (JIRA)
noreply at issues.asterisk.org
Tue Dec 19 02:40:07 CST 2017
[ https://issues.asterisk.org/jira/browse/ASTERISK-22976?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=240789#comment-240789 ]
Aaron An commented on ASTERISK-22976:
-------------------------------------
hi, Joshua Colp, I don't use app_queue any more for past 2 years, so I don't know whether it is resolved or not in recent version. But I guess the dead lock is remain there especially using realtime queue. Realtime have I/O outside so the rate of race condition will larger than static queue.
> app_queue function queue_show() and find_queue_by_name_rt() cause deadlock
> ---------------------------------------------------------------------------
>
> Key: ASTERISK-22976
> URL: https://issues.asterisk.org/jira/browse/ASTERISK-22976
> Project: Asterisk
> Issue Type: Bug
> Security Level: None
> Components: Applications/app_queue
> Affects Versions: 1.8.24.0
> Environment: CentOS5.8 X64 DellR410 Asterisk 1.8 trunk version
> Reporter: Aaron An
> Assignee: Aaron An
> Severity: Critical
>
> I use "queue show xxxx" to monitor queue status, and use realtime queue. concurrency is about 100 calls. deadlock will be occur after 10-30minutes.
> analysis result:
> in find_queue_by_name_rt() first lock single queue "ao2_lock(q);" and then lock global queues "queues_t_unlink(queues, q, "Unused; removing from container");";
> in __queues_show() first lock global queues "ao2_lock(queues);" then lock single queue "ao2_lock(q);"
> so it causes dead lock.
--
This message was sent by Atlassian JIRA
(v6.2#6252)
More information about the asterisk-bugs
mailing list