[asterisk-bugs] [Asterisk 0018634]: PGSQL db update issue

Asterisk Bug Tracker noreply at bugs.digium.com
Fri Jan 21 08:31:01 CST 2011


A NOTE has been added to this issue. 
====================================================================== 
https://issues.asterisk.org/view.php?id=18634 
====================================================================== 
Reported By:                hydr0gen
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   18634
Category:                   CDR/cdr_pgsql
Reproducibility:            sometimes
Severity:                   crash
Priority:                   normal
Status:                     feedback
Asterisk Version:           1.6.2.16 
JIRA:                        
Regression:                 No 
Reviewboard Link:            
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!):  
Request Review:              
====================================================================== 
Date Submitted:             2011-01-17 09:44 CST
Last Modified:              2011-01-21 08:31 CST
====================================================================== 
Summary:                    PGSQL db update issue
Description: 
I can't reproduce error. It happend sometimes. Asterisk is trying to insert
wrong SQL code.

from Postgresql debug:
Jan 17 15:27:58 TuX postgres[26769]: [4-1] ERROR:  syntax error at or near
"VALUES" at character 329
Jan 17 15:27:58 TuX postgres[26769]: [4-2] STATEMENT:   VALUES
("calldate"'2011-01-17 15:30:03',"clid",'"759"
<759>',"src",'759',"dst",'1007',"dcontext",'local',"channel",'SIP/759-00000371',"dstchannel",'SIP/1007-00000372',"lastapp",'Dial',"lastdata",'SIP/1007,20,rtT',"duration",82,"billsec",75,"disposition",'ANSWERED',"amaflags",3,"accountcode",'759',"uniqueid",'1295278203.882')
VALUES ("calldate"'2011-01-17 15:30:03',"clid",'"759"
<759>',"src",'759',"dst",'1007',"dcontext",'local',"channel",'SIP/759-00000371',"dstchannel",'SIP/1007-00000372',"lastapp",'Dial',"lastdata",'SIP/1007,20,rtT',"duration",82,"billsec",75,"disposition",'ANSWERED',"amaflags",3,"accountcode",'759',"uniqueid",'1295278203.882')

as you can see asterisk is trying to insert wrong code, the values, witch
goes past "VALUES" consist values name.

The thing is - when it's happen asterisk core dumps. I havn't seen this
issue before i start using:

sip.conf:
limitonpeer=yes
notifyringing=yes
rtcachefriends=yes
rtupdate=yes

I'm using REALTIME SIP/Queues/MOH/VM

Today i updated from 1.6.2.15 (freebsd) to 1.6.2.16. Nothing changed.
Asterisk still sometimes core dumps.
====================================================================== 

---------------------------------------------------------------------- 
 (0130858) lmadsen (administrator) - 2011-01-21 08:31
 https://issues.asterisk.org/view.php?id=18634#c130858 
---------------------------------------------------------------------- 
The errors you're seeing are typically when you are missing columns in the
table you're trying to write to.

It would be ideal to get the backtrace and the debugging output from the
database side to see what Asterisk is trying to send to the database (which
may point out why it is failing to write). 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2011-01-21 08:31 lmadsen        Note Added: 0130858                          
======================================================================




More information about the asterisk-bugs mailing list