[Home]

Summary:ASTERISK-02942: app_queue and chan_local maximum usage?
Reporter:drmac (drmac)Labels:
Date Opened:2004-12-08 14:28:31.000-0600Date Closed:2011-06-07 14:05:19
Priority:MajorRegression?No
Status:Closed/CompleteComponents:Applications/app_queue
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) mydiff.txt
Description:My agents have all been to me asking why they can't logoff. They dial 2010 (the AgentCallbackLogin) and it asks for their Agent username. They dial it and press pound and then blank air.

show modules:

chan_agent.so Agent Proxy Channel       1656
chan_local.so Local Proxy Channel       1657

Wow.

show channels:

asterisk*CLI> show channels
       Channel  (Context    Extension    Pri )   State Appl.         Data          
 SIP/3010-57ff  (cytel-internal              1   )      Up Bridged Call  SIP/3091-5cba  
 SIP/3091-5cba  (cytel-internal 3010         1   )      Up Dial          SIP/3010|15|tr
       Zap/8-1  (all-incomming s            1   )      Up Bridged Call  SIP/3076-fe8b  
 SIP/3076-fe8b  (cytel-outgoing 92812304466  8   )      Up Dial          ZAP/g1/2812304466|60|t
       Zap/7-1  (all-incomming s            1   )      Up Bridged Call  SIP/3029-4fe8  
 SIP/3029-4fe8  (cytel-outgoing 98327417647  8   )      Up Dial          ZAP/g1/8327417647|60|t
 SIP/3091-6e6b  (cytel-internal 2010         1   )      Up AgentCallbackLogin  |@cytel-internal
 SIP/3033-b24e  (cytel-internal 2010         1   )      Up AgentCallbackLogin  |@cytel-internal
 SIP/3033-affc  (cytel-internal 2010         1   )      Up AgentCallbackLogin  |@cytel-internal
 SIP/3033-9c27  (cytel-internal 2010         1   )      Up AgentCallbackLogin  |@cytel-internal
 SIP/3033-4c81  (cytel-internal 2010         1   )      Up AgentCallbackLogin  |@cytel-internal
 SIP/3033-8cb4  (cytel-internal 2010         1   )      Up AgentCallbackLogin  |@cytel-internal
 SIP/3033-4b94  (cytel-internal 2010         1   )      Up AgentCallbackLogin  |@cytel-internal
 SIP/3002-5001  (cytel-internal 2010         1   )      Up AgentCallbackLogin  |@cytel-internal
 SIP/3002-eeb7  (cytel-internal 2010         1   )      Up AgentCallbackLogin  |@cytel-internal
 SIP/3002-a1c2  (cytel-internal 2010         1   )      Up AgentCallbackLogin  |@cytel-internal
 SIP/3000-4fa0  (cytel-internal 2010         1   )      Up AgentCallbackLogin  |@cytel-internal
 SIP/3002-441c  (cytel-internal 2010         1   )      Up AgentCallbackLogin  |@cytel-internal
 SIP/3000-9ab4  (cytel-internal 2010         1   )      Up AgentCallbackLogin  |@cytel-internal
 SIP/3000-ee54  (cytel-internal 2010         1   )      Up AgentCallbackLogin  |@cytel-internal
 SIP/3000-27a1  (cytel-internal 2010         1   )      Up AgentCallbackLogin  |@cytel-internal
 SIP/3091-f1be  (cytel-internal 2010         1   )      Up AgentCallbackLogin  |@cytel-internal
 SIP/3091-3984  (cytel-internal 2010         1   )      Up AgentCallbackLogin  |@cytel-internal
 SIP/3091-e8fa  (cytel-internal 2010         1   )      Up AgentCallbackLogin  |@cytel-internal
 SIP/3091-ce9b  (cytel-internal 2010         1   )      Up AgentCallbackLogin  |@cytel-internal
 SIP/3091-75e4  (cytel-internal 2010         1   )      Up AgentCallbackLogin  |@cytel-internal
 SIP/3091-f1ae  (cytel-internal 2010         1   )      Up AgentCallbackLogin  |@cytel-internal
       Zap/6-1  (all-incomming s            1   )      Up Bridged Call  SIP/3044-0eee  
 SIP/3044-0eee  (cytel-outgoing 97132251756  8   )      Up Dial          ZAP/g1/7132251756|60|t
       Zap/3-1  (cytel-billing s            5   )      Up Queue         cytelcs        
       Zap/4-1  (cytel-billing s            5   )      Up Queue         cytelcs        
 SIP/3000-2fb8  (cytel-internal 3099         1   )    Ring Queue         cytelcs        
    Agent/3091  (cytel-internal s            1   )    Down (None)        (None)        
Local/3091@cytel-internal-6752,2  (cytel-internal 3091         1   )    Ring (None)        (None)        
Local/3091@cytel-internal-6752,1  (cytel-internal s            1   )    Down (None)        (None)        
 SIP/3000-cb66  (cytel-internal 3099         1   )    Ring Queue         cytelcs        
       Zap/1-1  (cytel-billing s            5   )      Up Queue         cytelcs        
       Zap/2-1  (cytel-billing s            5   )      Up Queue         cytelcs        
 SIP/3058-2ff4  (cytel-internal              1   )      Up Bridged Call  SIP/3058-2d54<ZOMBIE>
SIP/3058-2d54<ZOMBIE>  (cytel-internal 3058         1   )      Up Dial          SIP/3058|15|tr
40 active channel(s)

This has never happened before so Im lost. I have a feeling this is due to the increasing module usage.

I just restarted asterisk and the problem seems to have gone away.

There was a bug on this constantly increasing module usage number but it got closed.
Comments:By: drmac (drmac) 2004-12-08 14:40:53.000-0600

Before I restarted asterisk, I tried "show agents" and all I got was a new prompt. Every command I tried after that (besides exit) also only gave new prompt.

Exited. Reconnected.

Tried "show queues". Same behavior as "show agents".

By: zoa (zoa) 2004-12-08 15:03:00.000-0600

any idea how to look for this ?

I use app_queue quite a lot, although not with dynamic users and have never seen such a problem...

Did this only happen once ?

By: drmac (drmac) 2004-12-08 15:58:36.000-0600

This has only happened once and only because I haven't restarted asterisk in about 3 weeks.

By: Mark Spencer (markster) 2004-12-08 17:09:51.000-0600

This has nothing to do with the module count but does look like a deadlock of some sort.  Unfortunately the only way to debug a deadlock is to attach gdb to the running process and you have to have matching binaries and code, and running with "make valgrind and "-DDEBUG_THREADS" definitely can make it easier.

By: drmac (drmac) 2004-12-09 08:19:42.000-0600

If my usage count ever gets that high again, I will try and debug it per your instructions. I guess this can be closed then.

By: Mark Spencer (markster) 2004-12-10 23:52:23.000-0600

Fixed the local and agent counts.  If you can make the other occur again I'll be happy to look at it but it will need to be in that stuck state (preferably with -DDEBUG_THREADS and "make valgrind"

By: Russell Bryant (russell) 2004-12-15 14:13:11.000-0600

fixed in 1.0

By: drmac (drmac) 2004-12-27 09:55:16.000-0600

After I applied the patch, I am still getting extremly high local channel usage counts (from not restarting asterisk in several weeks):

chan_local.so             Local Proxy Channel                      1572

Can you give me some exact commands to execute in gdb when I reach this state? I know how to start a program in gdb but I don't think its feasable to run asterisk inside gdb for several weeks.

Just tell me exactly what to type and I will do it. I'm anxious to help.

By: drmac (drmac) 2005-01-04 12:03:12.000-0600

this can be closed. its working now. seems i applied the patch and recompiled but never did make bininstall. *bleh*

By: twisted (twisted) 2005-01-04 12:08:47.000-0600

closed per poster - fixed

By: Digium Subversion (svnbot) 2008-01-15 15:16:16.000-0600

Repository: asterisk
Revision: 4425

U   trunk/channels/chan_agent.c
U   trunk/channels/chan_local.c

------------------------------------------------------------------------
r4425 | markster | 2008-01-15 15:16:16 -0600 (Tue, 15 Jan 2008) | 2 lines

Fix use count for agent/local (bug ASTERISK-2942 et al)

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=4425

By: Digium Subversion (svnbot) 2008-01-15 15:16:45.000-0600

Repository: asterisk
Revision: 4457

U   branches/v1-0/channels/chan_agent.c
U   branches/v1-0/channels/chan_local.c

------------------------------------------------------------------------
r4457 | russell | 2008-01-15 15:16:44 -0600 (Tue, 15 Jan 2008) | 2 lines

Fix use count for agent/local (bug ASTERISK-2942)

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=4457