[OpenSIPS-Users] pv_get_avp buffer length error

Bogdan-Andrei Iancu bogdan at opensips.org
Wed Mar 28 12:46:15 EDT 2018


Right! Still, if you want to change it, see this define 
https://github.com/OpenSIPS/opensips/blob/master/pvar.c#L124 . Of 
course, you will have to recompile.

Regards,

Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
   http://www.opensips-solutions.com
OpenSIPS Summit 2018
   http://www.opensips.org/events/Summit-2018Amsterdam

On 03/14/2018 05:33 PM, Ben Newlin wrote:
>
> Please disregard this. I was incorrect about the source of the error 
> message. It is coming from a log statement we have where we are 
> attempting to print the contents of an AVP as a list. In this case the 
> list is quite long and is causing the buffer exhaustion.
>
> Thanks,
>
> Ben Newlin
>
> *From: *Ben Newlin <Ben.Newlin at genesys.com>
> *Date: *Tuesday, March 13, 2018 at 10:30 AM
> *To: *OpenSIPS users mailling list <users at lists.opensips.org>
> *Subject: *pv_get_avp buffer length error
>
> Hi,
>
> We have been seeing the following errors in our logs for some time:
>
> ERROR:core:pv_get_avp: local buffer length exceeded!
>
> This error prints from multiple places in the code and we were not 
> able to isolate the source until now. I have been able to consistently 
> reproduce the error by calling avp_insert. It seems to happen every 
> time I call it in a particular place, but I cannot identify the cause 
> of the buffer issue.
>
> Logs from an occurrence are here: https://pastebin.com/HvmrXqii
>
> The relevant section of my config script is here: 
> https://pastebin.com/301U1yY2
>
> I am currently running 1.11.11, which I know is unsupported. But I am 
> trying to determine whether it is an OpenSIPS issue or whether I am 
> using this function in a way that is not intended.
>
> I am trying to use it to push values onto the end of an AVP stack. 
> According to the docs [1]:
>
> “If the index is greater than the count of values the value will be 
> inserted at the end.”
>
> So I have selected an index that is known to always be greater than 
> the number of elements (32) and am performing the insert at that 
> index. I must do this because there does not seem to be any way in 
> OpenSIPS to determine the number of values in an AVP except to 
> traverse the entire list. I attempted to keep track of the number of 
> items in the destination list using another variable, but avp_insert 
> will not accept a variable as the index argument, only a number.
>
> I also tried reading from the source AVP backwards, as opposed to 
> putting them in the destination AVP backwards as I do now, but there 
> is no way to indicate the last index of an AVP. The common method of 
> using -1 as the index does not work with AVPs.
>
> Any help would be appreciated.
>
> [1]: 
> http://www.opensips.org/html/docs/modules/1.11.x/avpops.html#idp5675600
>
> Thanks,
>
> Ben Newlin
>
>
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20180328/d02396a0/attachment-0001.html>


More information about the Users mailing list