[Serusers] Memory leak?

Andrei Pelinescu-Onciul pelinescu-onciul at fokus.fraunhofer.de
Tue May 27 18:58:00 CEST 2003


On May 27, 2003 at 10:17, Jamin W. Collins <jcollins at asgardsrealm.net> wrote:
> Got the following errors on one of the SER proxies I maintain this
> morning:
>    
>    May 27 09:00:03 hillcrest /usr/sbin/ser[8260]: ERROR:receive_msg: memory allocation failure
>    May 27 09:00:03 hillcrest /usr/sbin/ser[8264]: ERROR: build_req_buf_from_sip_req: out of memory
>    May 27 09:00:03 hillcrest /usr/sbin/ser[8264]: ERROR: print_uac_request: no pkg_mem
>    May 27 09:00:03 hillcrest /usr/sbin/ser[8264]: ERROR: build_res_buf_from_sip_req: out of memory  ; needs 567
>    May 27 09:00:03 hillcrest /usr/sbin/ser[8264]: WARNING: receive_msg: error while trying script
> 
> The server is running 0.8.10 with the following patches:
>    http://www.iptel.org/ser/issues/hash_fix.patch
>    http://iptel.org/~janakj/invroute.patch
>    http://www.iptel.org/ser/security/secalert-002-0_8_10.patch
>    http://www.mobile-ip.de/~andrei/ser/0.8.10/ser-0.8.10-bison-1.75.patch
> 
> Of these, the only one the indicates memory errors is the
> invroute.patch.  Has anyone seen this before?  

No..
Could you stop the proxy and send us the memory status log dumped at the
end, or (if you don't want to stop it) kill -SIGUSR1 and again send the
mem. log.

What happens is ser runs out of local memory. ser uses shared memory
(you can specify the shared mem. size with -m) and "local" memory (per
process). The local memory can be alloc'ed/dealloc'ed much faster (it
does not require any locking). Usually ser runs out of shared mem., since
"local" mem. is used in general only for temporary storage.
ser will use maximum 1 Mb of "local" memory. So far we didn't need more.
As a quick fix you can try to increase the size. You will have to change
the value of PKG_MEM_POOL_SIZE in config.h and recompile.


Andrei




More information about the sr-users mailing list