[asterisk-bugs] [JIRA] (ASTERISK-22976) app_queue function queue_show() and find_queue_by_name_rt() cause deadlock

Paul Belanger (JIRA) noreply at issues.asterisk.org
Fri Jan 10 15:25:03 CST 2014


    [ https://issues.asterisk.org/jira/browse/ASTERISK-22976?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=213939#comment-213939 ] 

Paul Belanger commented on ASTERISK-22976:
------------------------------------------

Debugging deadlocks: Please select DEBUG_THREADS and DONT_OPTIMIZE in the Compiler Flags section of menuselect. Recompile and install Asterisk (i.e. make install).  This will then give you the console command "core show locks." When the symptoms of the deadlock present themselves again, please provide output of the deadlock via:

# asterisk -rx "core show locks" | tee /tmp/core-show-locks.txt
# gdb -se "asterisk" <pid of asterisk> | tee /tmp/backtrace.txt 
gdb> bt
gdb> bt full
gdb> thread apply all bt

Then attach the core-show-locks.txt and backtrace.txt files to this issue. Thanks!


                
> 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
>            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 is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.asterisk.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira



More information about the asterisk-bugs mailing list