[asterisk-bugs] [JIRA] (ASTERISK-28470) Mutex deadlock in audio_audiohook_write_list
Kevin Harwell (JIRA)
noreply at issues.asterisk.org
Wed Jul 3 10:41:47 CDT 2019
[ https://issues.asterisk.org/jira/browse/ASTERISK-28470?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=247527#comment-247527 ]
Kevin Harwell commented on ASTERISK-28470:
------------------------------------------
There shouldn't be a problem here. From what I can tell the lock is reentrant. Meaning the same thread can acquire the lock multiple times.
How have you become aware you have a deadlock? Please provide a backtrace from the system when the problem manifests. You can use the ast_coredumper script to get a running backtrace (note however getting a running backtrace can interrupt calls). More info here:
https://wiki.asterisk.org/wiki/display/AST/Getting+a+Backtrace
> Mutex deadlock in audio_audiohook_write_list
> --------------------------------------------
>
> Key: ASTERISK-28470
> URL: https://issues.asterisk.org/jira/browse/ASTERISK-28470
> Project: Asterisk
> Issue Type: Bug
> Security Level: None
> Components: General
> Affects Versions: 16.3.0
> Environment: CentOS 6.10
> Reporter: Andre Heber
>
> In main/audiohook.c in the function "audio_audiohook_write_list" is the following code:
> {code:java}
> ast_audiohook_lock(audiohook);
> if (audiohook->status != AST_AUDIOHOOK_STATUS_RUNNING) {
> AST_LIST_REMOVE_CURRENT(list);
> removed = 1;
> ast_audiohook_update_status(audiohook, AST_AUDIOHOOK_STATUS_DONE);
> ast_audiohook_unlock(audiohook);
> {code}
> But "ast_audiohook_update_status" also locks "audiohook" "if (audiohook->status != AST_AUDIOHOOK_STATUS_RUNNING)", which results in a frozen thread.
> This happens 3x in "audio_audiohook_write_list" and 1x in "dtmf_audiohook_write_list".
--
This message was sent by Atlassian JIRA
(v6.2#6252)
More information about the asterisk-bugs
mailing list