[asterisk-bugs] [JIRA] (ASTERISK-21162) Deadlock in cdr.c: cdr_batch_lock vs cdr_pending_lock

Chase Venters (JIRA) noreply at issues.asterisk.org
Wed Feb 27 16:48:18 CST 2013


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

Chase Venters commented on ASTERISK-21162:
------------------------------------------

As a developer I understand how it's often important to have a full backtrace.

That being said, in this situation, it would be a difficult time consuming affair for me to reproduce this issue with a custom compiled Asterisk as it came from our production environment and we don't have the best instrumentation to push the load we'd need to trip it again.

I was hoping that since I already found the problem in the code, and pointed out the relevant deadlocked threads, it would be a simple matter to confirm that the problem exists and produce a solution.

Any time one thread attempts to lock A->B while another attempts to lock B->A that is a bug that could result in deadlock, as we have here with cdr_batch_lock and cdr_pending_lock.

Do you *really* need more details in this backtrace? In this specific case, it seems irrelevant to me.
                
> Deadlock in cdr.c: cdr_batch_lock vs cdr_pending_lock
> -----------------------------------------------------
>
>                 Key: ASTERISK-21162
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-21162
>             Project: Asterisk
>          Issue Type: Bug
>      Security Level: None
>          Components: CDR/General
>    Affects Versions: 1.8.19.0
>         Environment: CentOS release 6.3 (Final)
> Linux ivr01.XXXXXXXX 2.6.32-279.22.1.el6.i686 #1 SMP Wed Feb 6 00:31:03 UTC 2013 i686 i686 i386 GNU/Linux
> Asterisk 1.8.19.0 from EPEL
>            Reporter: Chase Venters
>            Assignee: Chase Venters
>            Severity: Critical
>         Attachments: deadlock_analysis.txt, gdb-asterisk-deadlock.zip
>
>
> I've run into a deadlock in Asterisk cdr.c. I have hundreds of threads blocked like this:
> [Edit by Rusty Newton - removed in-line trace analysis and attached as deadlock_analysis.txt]
> I think from looking at the 1.8.21.0-rc1 code that this issue still exists there.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira



More information about the asterisk-bugs mailing list