[SR-Users] sqlops crash after out of memory
Juha Heinanen
jh at tutpro.com
Tue Mar 4 08:50:08 CET 2014
pkg memory run out here:
Mar 4 09:00:20 localhost /usr/sbin/sip-proxy[31923]: ERROR: sqlops [sql_api.c:318]: sql_do_query(): no more memory
then sip proxy crashed here:
(gdb) where
#0 0xb5fce89b in sql_reset_result (res=0xb6ce3438) at sql_api.c:233
#1 0xb5fd18db in sql_do_query (con=0xb6cd1e28, query=0xbfecd248, res=0xb6ce3438) at sql_api.c:410
#2 0xb5fd630d in sql_query (msg=0xb6ce8788, dbl=0xb6cd1e28 "\230\035Ͷ\t", query=0xb70436a8 "\310Y\004\267P", res=0xb6ce3438 "\245\246=|\r3ζ\006") at sqlops.c:209
...
goto error was executed when if(res->vals[i]==NULL) was true and at
error sql_reset_result was called. there the crash happened here:
if(res->vals)
{
for(i=0; i<res->nrows; i++)
{
for(j=0; j<res->ncols; j++)
{
if(res->vals[i][j].flags&PV_VAL_STR
&& res->vals[i][j].value.s.len>0) /* here */
looks to me that it should be tested if res->vals[i] is not null before
executing the if statement.
-- juha
ps. it there any chance to find out from the core dump, why memory run
out, i.e., how was most of it used? amount of pkg memory in this host
was defined to be 8 MB.
-- juha
More information about the sr-users
mailing list