[SR-Users] sqlops crash after out of memory
Daniel-Constantin Mierla
miconda at gmail.com
Wed Mar 5 12:19:50 CET 2014
I pushed yesterday a fix for this case. It is in all maintained stable
branches. The patch for master is:
-
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=f27df26ca01394250cbe12c5ccf694c6afd3707f
Cheers,
Daniel
On 04/03/14 08:50, Juha Heinanen wrote:
> 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
>
>
>
> _______________________________________________
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
> sr-users at lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
--
Daniel-Constantin Mierla - http://www.asipto.com
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
More information about the sr-users
mailing list