[Home]

Summary:ASTERISK-11499: AJAM error when sending commands
Reporter:Lior M (liorm)Labels:
Date Opened:2008-02-24 16:55:17.000-0600Date Closed:2011-06-07 14:03:03
Priority:MajorRegression?No
Status:Closed/CompleteComponents:PBX/General
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) ajam-backtrace.txt
Description:when sending AJAM commands to asterisk manager interface I am getting the following error on CLI:

fd == -1 in astman_append, should not happen
fd == -1 in astman_append, should not happen

Comments:By: snuffy (snuffy) 2008-02-24 18:06:59.000-0600

could you provide more information
AMI command your trying to send etc..

By: Lior M (liorm) 2008-02-25 14:48:27.000-0600

pausequeuemember from ajam

By: Russell Bryant (russell) 2008-02-25 22:30:07.000-0600

Could you perhaps provide something that would help reproduce the error?

By: Lior M (liorm) 2008-03-02 10:26:19.000-0600

well, I have wrote a queue monitoring web page based on AJAM technology, and I get this error when someone generates the command "pausequeuemember" from the web site.
Recently I realized that this AJAM client crashes asterisk when reloading the web page.
Please start checking by using pausequeuemember through AJAM interface.

By: Lior M (liorm) 2008-03-03 16:47:13.000-0600

version: SVN-trunk-r105574M

AJAM command:
http://localhost:93/asterisk/rawman?action=queuepause&interface=sip/343&paused=1&_=

Trace:
command 'status'
[Mar  4 00:47:51] DEBUG[30022]: manager.c:2661 process_message: Manager received command 'queuestatus'
[Mar  4 00:48:00] DEBUG[30022]: manager.c:2661 process_message: Manager received command 'queuepause'
[Mar  4 00:48:00] DEBUG[30022]: manager.c:1515 action_waitevent: Finished waiting for an event!
localhost*CLI>
Disconnected from Asterisk server
Executing last minute cleanups
Asterisk cleanly ending (0).
Asterisk ending (0).
[root@localhost asterisk]# /usr/sbin/safe_asterisk: line 117: 29973 Segmentation fault      (core dumped) nice -n $PRIORITY ${ASTSBINDIR}/asterisk -f ${CLIARGS} ${ASTARGS} >&/dev/${TTY} </dev/${TTY}
Asterisk ended with exit status 139
Asterisk exited on signal 11.
Automatically restarting Asterisk.

The segmentation fault is occuring sending the AJAM command.

The error is reproduceable

By: Lior M (liorm) 2008-03-03 16:56:04.000-0600

command:
http://localhost:93/asterisk/rawman?action=QueueRemove&Interface=sip/343&Queue=queue-tcs-sales&_=

result:
1386)
Verbosity is at least 3
 == HTTP Manager 'pbx' logged on from 127.0.0.1
fd == -1 in astman_append, should not happen
fd == -1 in astman_append, should not happen

this command does not cause the crash like the previous one.

By: Jason Parker (jparker) 2008-03-05 14:57:06.000-0600

We need to see a backtrace here, if it's crashing.

By: Lior M (liorm) 2008-03-06 19:17:37.000-0600

more accurate information to reproduce the crash:

when sending pausequeuemember command and then imediatly unpausequeuemember command:

[Mar  7 02:05:55] DEBUG[29366]: res_config_mysql.c:459 store_mysql: MySQL RealTime: row inserted on table: administration_queuelog, id: 18245
[Mar  7 02:05:55] DEBUG[29366]: manager.c:1516 action_waitevent: Finished waiting for an event!
*** glibc detected *** double free or corruption (!prev): 0x08c6a280 ***

I am not sure that it is related to the error on the console:
"fd == -1 in astman_append, should not happen"



By: Jason Parker (jparker) 2008-04-02 12:27:40

We need an unoptimized backtrace.  The one here provides no information.

See doc/backtrace.txt for details.

By: Jason Parker (jparker) 2008-05-01 15:18:57

I tested this using an endless loop of pause/unpause, and was unable to reproduce.

Please reopen if you are able to provide the unoptimized backtrace that I requested.