[asterisk-bugs] [Asterisk 0014639]: Asterisk CPU usage 100% (deadlock?) when using Queue() with Local channels
Asterisk Bug Tracker
noreply at bugs.digium.com
Wed Jun 24 15:32:35 CDT 2009
The following issue has been UPDATED.
======================================================================
https://issues.asterisk.org/view.php?id=14639
======================================================================
Reported By: coolmig
Assigned To:
======================================================================
Project: Asterisk
Issue ID: 14639
Category: Channels/chan_local
Reproducibility: always
Severity: minor
Priority: normal
Status: new
Target Version: 1.4.28
Asterisk Version: 1.4.22
Regression: No
SVN Branch (only for SVN checkouts, not tarball releases): N/A
SVN Revision (number only!):
Request Review:
======================================================================
Date Submitted: 2009-03-10 12:26 CDT
Last Modified: 2009-06-24 15:32 CDT
======================================================================
Summary: Asterisk CPU usage 100% (deadlock?) when using
Queue() with Local channels
Description:
I was testing a dialer I'm making, and found this situation: when I dial
more than one call to an agent using Local channels (busy with one call and
one or more in the queue), Asterisk goes 100% CPU all the time until the
queued calls get answered or hangup.
Core show locks shows this:
=======================================================================
=== Currently Held Locks ==============================================
=======================================================================
===
=== <file> <line num> <function> <lock name> <lock addr> (times locked)
===
=== Thread ID: 3077847952 (pbx_thread started at [ 2645] pbx.c
ast_pbx_start())
=== ---> Waiting for Lock https://issues.asterisk.org/view.php?id=0
(chan_agent.c): MUTEX 2252 __login_exec
&p->app_lock 0x93d59d4 (1)
=== --- ---> Locked Here: chan_agent.c line 1080 (agent_new)
=== -------------------------------------------------------------------
===
=== Thread ID: 3073665936 (pbx_thread started at [ 2645] pbx.c
ast_pbx_start())
=== ---> Lock https://issues.asterisk.org/view.php?id=0 (chan_agent.c): MUTEX
1080 agent_new &p->app_lock
0x93d59d4 (1)
=== -------------------------------------------------------------------
===
=== Thread ID: 3075632016 (pbx_thread started at [ 2645] pbx.c
ast_pbx_start())
=== ---> Tried and failed to get Lock https://issues.asterisk.org/view.php?id=0
(chan_local.c): MUTEX 186
local_queue_frame (channel lock) 0x9464470 (0)
=== -------------------------------------------------------------------
===
=======================================================================
If I hangup the initial agent call, if takes a long time for the Queue to
deliver the other call to the agent, while the agent is with no call, core
show locks shows this:
=======================================================================
=== Currently Held Locks ==============================================
=======================================================================
===
=== <file> <line num> <function> <lock name> <lock addr> (times locked)
===
=== Thread ID: 3077847952 (pbx_thread started at [ 2645] pbx.c
ast_pbx_start())
=== ---> Lock https://issues.asterisk.org/view.php?id=0 (chan_agent.c): MUTEX
2252 __login_exec &p->app_lock
0x93d59d4 (1)
=== -------------------------------------------------------------------
===
=== Thread ID: 3076860816 (pbx_thread started at [ 2645] pbx.c
ast_pbx_start())
=== ---> Tried and failed to get Lock https://issues.asterisk.org/view.php?id=0
(chan_local.c): MUTEX 186
local_queue_frame (channel lock) 0x945d820 (0)
=== -------------------------------------------------------------------
===
=======================================================================
When the queued call finally is delivered to the agent, core show locks
shows this, and the 100% usage stops:
=======================================================================
=== Currently Held Locks ==============================================
=======================================================================
===
=== <file> <line num> <function> <lock name> <lock addr> (times locked)
===
=== Thread ID: 3077847952 (pbx_thread started at [ 2645] pbx.c
ast_pbx_start())
=== ---> Waiting for Lock https://issues.asterisk.org/view.php?id=0
(chan_agent.c): MUTEX 2252 __login_exec
&p->app_lock 0x93d59d4 (1)
=== --- ---> Locked Here: chan_agent.c line 1080 (agent_new)
=== -------------------------------------------------------------------
===
=== Thread ID: 3075632016 (pbx_thread started at [ 2645] pbx.c
ast_pbx_start())
=== ---> Lock https://issues.asterisk.org/view.php?id=0 (chan_agent.c): MUTEX
1080 agent_new &p->app_lock
0x93d59d4 (1)
=== -------------------------------------------------------------------
===
=======================================================================
======================================================================
Issue History
Date Modified Username Field Change
======================================================================
2009-06-24 15:32 lmadsen Severity major => minor
======================================================================
More information about the asterisk-bugs
mailing list