[asterisk-bugs] [JIRA] (ASTERISK-22854) [patch] - Deadlock between cel_pgsql unload and core_event_dispatcher taskprocessor thread
Matt Jordan (JIRA)
noreply at issues.asterisk.org
Thu Feb 6 17:01:18 CST 2014
[ https://issues.asterisk.org/jira/browse/ASTERISK-22854?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Matt Jordan updated ASTERISK-22854:
-----------------------------------
Target Release Version/s: 11.8.0
> [patch] - Deadlock between cel_pgsql unload and core_event_dispatcher taskprocessor thread
> ------------------------------------------------------------------------------------------
>
> Key: ASTERISK-22854
> URL: https://issues.asterisk.org/jira/browse/ASTERISK-22854
> Project: Asterisk
> Issue Type: Bug
> Security Level: None
> Components: CEL/cel_pgsql
> Affects Versions: 11.6.0
> Reporter: Etienne Lessard
> Assignee: Kevin Harwell
> Target Release: 1.8.26.0, 11.8.0
>
> Attachments: cel_pgsql_fix_deadlock_event.patch
>
>
> A deadlock can happens between a thread unloading or reloading the cel_pgsql module and the core_event_dispatcher taskprocessor thread.
> When the core_event_dispatcher taskprocessor thread is deadlocked, bad things follow, like:
> * queue member status are not updated
> * BLF on SIP phones are not updated
> * etc, i.e. everything that use the event system...
> Observed and reproducible on asterisk 11.6.0.
> Description of what is happening:
> Thread 1 (for example, a netconsole thread):
> # a "module reload cel_pgsql" is launched
> # the thread enter the "my_unload_module" function (cel_pgsql.c)
> # the thread acquire the write lock on psql_columns
> # the thread enter the "ast_event_unsubscribe" function (event.c)
> # the thread try to acquire the write lock on ast_event_subs[sub->type]
> Thread 2 (core_event_dispatcher taskprocessor thread):
> # the taskprocessor pop a CEL event
> # the thread enter the "handle_event" function (event.c)
> # the thread acquire the read lock on ast_event_subs[sub->type]
> # the thread callback the "pgsql_log" function (cel_pgsql.c), since it's a subscriber of CEL events
> # the thread try to acquire a read lock on psql_columns
> To reproduce the problem, I use sipp to generate calls on asterisk, and at the same time, I do a 'while sleep 0.1; do echo "$(date) Reloading..."; asterisk -rx "module reload cel_pgsql.so"; done'
--
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