Summary:ASTERISK-17737: AMI Action: Queuestatus + asterisk -rx "queue show" = no more calls sent to agents
Reporter:Max_cnu (maxochoa)Labels:
Date Opened:2011-04-21 15:45:47Date Closed:2011-08-10 16:16:24
Versions:1.4.40 Frequency of
Environment:Attachments:( 0) full-submit.scrub1
( 1) valgrind-1303416182.txt
( 2) valgrind-1303766700.txt
Description:If an outside application sends AMI Action: Queuestatus and at the same time asterisk -rx "queue show" is run, calls are no longer sent to agents. With loglevel 3, the message

[Apr 21 15:28:58] ERROR[18863] utils.c: write() returned error: Broken pipe

is logged (typically) equal to the number of lines of output that would typically be sent as a result for the AMI Queuestatus.

'agent show online' will show the agents as idle, and 'show channels verbose' shows new incoming calls in Application Queue.


This on a system with 500 agents and 64 queues (testing was done with 4 active agents on one queue and 1 call every 3 minutes) and happens more often on a system under moderate load (system load ~ 1.0) on debian 5.0.4
Comments:By: Paul Belanger (pabelanger) 2011-04-21 22:08:21

We require a complete debug log to help triage the issue.

This document will provide instructions on how to collect debugging logs from an Asterisk machine for the purpose of helping bug marshals troubleshoot an issue:


By: Max_cnu (maxochoa) 2011-04-25 16:47:51

Attached a full log from the event. Removed duplicate lines of ERROR[X] utils.c: write() returned error: Broken pipe  (~236000 lines removed)

By: Paul Belanger (pabelanger) 2011-04-25 21:01:48

utils.c: write() returned error: Broken pipe is usually an issue with your AMI / AGI scripts loosing connection with Asterisk.  You'll need to resolve them first before we can do anything.

By: Max_cnu (maxochoa) 2011-05-03 12:48:32

Testing with less aggressive timeouts and eliminating network between hosts produced the same results. Test scripts used:

while [ $x -lt 5000 ]
       echo $x
       asterisk -rx "queue show" | grep strat | grep default

       sleep 5


echo "open $1 5038"
sleep 1
echo "Action: Login"
echo "UserName: ami_peer"
echo "Secret: tester01"
echo "Action: QueueStatus"
sleep 1000
echo "Action: Logoff"
sleep 1

(run using:)
./ami-holdopen.sh | telnet > test-050311

By: Russell Bryant (russell) 2011-07-15 14:37:52.454-0500

Please try to reproduce this with Asterisk 1.8.  If you can't reproduce it, we'll have to close this out.  If you can reproduce it, please build with DEBUG_THREADS and submit the output of "*CLI> core show locks".

By: Leif Madsen (lmadsen) 2011-08-10 16:16:24.063-0500

Suspended due to lack of feedback.