[Users] Re: postgres and long AVPs values BUG?

Bogdan-Andrei Iancu bogdan at voice-system.ro
Wed Feb 8 16:55:17 CET 2006


Hi,

I tried to reproduce this crash but not success.. I used exactly the 
same string value for the avp, setting the DB size to 1024...
please update from CVS and see if the crash still occurs for you.

regards,
bogdan

JF wrote:

>P.S.:
>
>Here's the backtrace:
>
>(gdb) bt
>#0  0x0021720c in ?? () from
>/usr/local/openser-1.0.0/lib/openser/modules/postgres.so
>#1  0x0021a66e in convert_row_pg (_h=0x9c09860, _res=0x9c1f9c8,
>_r=0x9c209e0, row_buf=0x9c20a10, parent=0x9c209e0 "▒\v▒\t\003") at
>db_res.c:143
>#2  0x0021a9ef in convert_rows (_h=0x9c09860, _r=0x9c1f9c8) at db_res.c:188
>#3  0x0021a7a0 in convert_result (_h=0x9c09860, _r=0x9c1f9c8) at db_res.c:214
>#4  0x00219f62 in get_result (_h=0x9c09860, _r=0xbfe366b8) at dbase.c:753
>#5  0x00219d91 in db_query (_h=0x9c09860, _k=0x14d4f4, _op=0x0,
>_v=0x14d500, _c=0x14d4a8, _n=3, _nc=3, _o=0x0, _r=0xbfe366b8) at
>dbase.c:713
>#6  0x00140f29 in db_load_avp (uuid=0x0, username=0xbfe36730,
>domain=0xbfe36740, attr=0x811b4c8 "record_route", table=0x0,
>scheme=0x0) at avpops_db.c:270
>#7  0x0014219e in ops_dbload_avps (msg=0x8122950, sp=0x811b328,
>dbp=0x811b340, use_domain=1) at avpops_impl.c:342
>#8  0x00140747 in w_dbload_avps (msg=0x8122950, source=0x811b328 "",
>param=0x811b340 "") at avpops.c:1101
>#9  0x08050503 in do_action (a=0x811b5d0, msg=0x8122950) at action.c:677
>#10 0x08050c67 in run_action_list (a=0x811b410, msg=0x8122950) at action.c:773
>#11 0x08050230 in do_action (a=0x811bf08, msg=0x8122950) at action.c:618
>#12 0x08050c67 in run_action_list (a=0x811bf08, msg=0x8122950) at action.c:773
>#13 0x08050230 in do_action (a=0x811bf30, msg=0x8122950) at action.c:618
>#14 0x08050c67 in run_action_list (a=0x8116d90, msg=0x8122950) at action.c:773
>#15 0x08050230 in do_action (a=0x811bf58, msg=0x8122950) at action.c:618
>#16 0x08050c67 in run_action_list (a=0x81113f0, msg=0x8122950) at action.c:773
>#17 0x08050d8e in run_actions (a=0x81113f0, msg=0x8122950) at action.c:815
>#18 0x0807126e in receive_msg (
>(...)
>
>On 1/27/06, JF <jfkavaka at gmail.com> wrote:
>  
>
>>Hi,
>>
>>I increased the length of the value column in the usr_preferences
>>table from 128 to 1024, but I got a core dump after these logs:
>> 0(24138) val2str(): converting record_route, 12
>> 0(24138) PG[224] str2valp got string
>><sip:10.112.64.59;ftag=605ff764c617d3cd28dbbdd72be8f9a2;lr=on>,<sip:10.112.64.12;ftag=605ff764c617d3cd28dbbdd72be8f9a2;lr=on>,<sip:10.112.64.12;ftag=605ff764c617d3cd28dbbdd72be8f9a2;lr=on>,<sip:10.112.64.59;ftag=605ff764c617d3cd28dbbdd72be8f9a2;lr=on>
>>Segmentation fault (core dumped)
>>
>>This was caused by an avp_db_load() call from the script. I'm using
>>OpenSER 1.0.0.
>>I found the following comment on modules/postgres/db_res.c that might
>>have something to do with it:
>>        /* I'm not sure about this */
>>        /* PQfsize() gives us the native length in the database, so */
>>        /* an int would be 4, not the strlen of the value */
>>        /* however, strlen of the value would be easy to strlen() */
>>
>>Also, in modules/postgres/db_val.c, there is a FIXME in val2str()
>>function that seems to be related.
>>
>>Can anyone help solve this problem? It seems like a bug.
>>
>>Thanks,
>>JF
>>
>>    
>>
>>------------------------------------------------------------------------
>>
>>_______________________________________________
>>Users mailing list
>>Users at openser.org
>>http://openser.org/cgi-bin/mailman/listinfo/users
>>    
>>





More information about the Users mailing list