[asterisk-bugs] [Asterisk 0013301]: AMI UpdateConfig -- When creating category, memory allocation failure in config.c

Asterisk Bug Tracker noreply at bugs.digium.com
Thu Aug 14 14:27:29 CDT 2008


A NOTE has been added to this issue. 
====================================================================== 
http://bugs.digium.com/view.php?id=13301 
====================================================================== 
Reported By:                trevo
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   13301
Category:                   Core/General
Reproducibility:            always
Severity:                   crash
Priority:                   normal
Status:                     feedback
Asterisk Version:           1.6.0-beta9 
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!):  
Disclaimer on File?:        N/A 
Request Review:              
====================================================================== 
Date Submitted:             2008-08-14 02:00 CDT
Last Modified:              2008-08-14 14:27 CDT
====================================================================== 
Summary:                    AMI UpdateConfig -- When creating category, memory
allocation failure in config.c
Description: 
Follow this telnet log to reproduce.  When attempting to execute the second
block asterisk crashes and in the logs I see this error:
ERROR[28453]
/builddir/build/BUILD/asterisk-1.6.0-beta9/include/asterisk/utils.h: Memory
Allocation Failure in function ALLOC_COMMENT at line 129 of config.c


Trying 127.0.0.1...
Connected to 127.0.0.1.
Escape character is '^]'.
Asterisk Call Manager/1.1
Action: login
Username: admin
Secret: admin
Events: off

Response: Success
Message: Authentication accepted

Action: UpdateConfig
SrcFilename: iax.conf
DstFilename: iax.tmp.conf
Reload: no
Action-000000: NewCat
Cat-000000: tmpcat

Connection closed by foreign host.
^ At this point asterisk dies
====================================================================== 

---------------------------------------------------------------------- 
 (0091419) trevo (reporter) - 2008-08-14 14:27
 http://bugs.digium.com/view.php?id=13301#c91419 
---------------------------------------------------------------------- 
This seems to be a larger problem or I'm not clear on AMI usage.  I have
tried using the web interface to accomplish this and am running into the
same problem (iax.conf grows at every iteration).

Here's what I'm doing:
http://localhost:8088/asterisk/rawman?action=login&username=foo&secret=bar

and then:
http://localhost:8088/asterisk/rawman?action=updateconfig&reload=no&srcfilename=iax.conf&dstfilename=iax.tmp.conf&Action-000000=newcat&Cat-000000=asdf&Var-000000=&Value-000000=

(following the formula given in the O'Reilly text)

Notice srcfilename is iax.conf and dstfilename is iax.tmp.conf
I attempt to create a new category 'newcat'.  Every time I run this
process iax.conf increases in size by ~ a factor of 2--the contents of
iax.conf are being appended to itself every time. 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2008-08-14 14:27 trevo          Note Added: 0091419                          
======================================================================




More information about the asterisk-bugs mailing list