[OpenSIPS-Users] Memory leak fifo process

Federico Edorna fedorna at anura.com.ar
Fri Sep 4 17:18:20 CEST 2015


Hi Team, I've found an issue when I reload regular expresion file for
opensips 1.11.5.

After executing a few "opensipsctl fifo regex_reload", the fifo process
runs out of pkmem. This is a small loop where I do a regex_reload and then
I print the pkmem for MI FIFO processs:

root at toro:~# sudo -u gc /home/gc/local/opensips/sbin/opensipsctl fifo ps |
grep "ID=4 "
Process::  ID=4 PID=11040 Type=MI FIFO
root at toro:~# while [ 1 -eq 1 ] ; do sudo -u gc
/home/gc/local/opensips/sbin/opensipsctl fifo regex_reload; sudo -u gc
/home/gc/local/opensips/sbin/opensipsctl fifo get_statistics pkmem: |grep
"pkmem:4-free_size::"  ; done
pkmem:4-free_size:: 3353184
pkmem:4-free_size:: 3353184
pkmem:4-free_size:: 3353184
pkmem:4-free_size:: 3353184
pkmem:4-free_size:: 3353184
pkmem:4-free_size:: 3353184
pkmem:4-free_size:: 3353184
pkmem:4-free_size:: 3353184
pkmem:4-free_size:: 3353184
pkmem:4-free_size:: 3353184
pkmem:4-free_size:: 3353184
pkmem:4-free_size:: 3353184
pkmem:4-free_size:: 3353184
pkmem:4-free_size:: 3353184
pkmem:4-free_size:: 1466776
pkmem:4-free_size:: 1466776
pkmem:4-free_size:: 1466776
pkmem:4-free_size:: 1466776
pkmem:4-free_size:: 1466776
pkmem:4-free_size:: 1466776
pkmem:4-free_size:: 1466776
pkmem:4-free_size:: 1466776
pkmem:4-free_size:: 1466776
pkmem:4-free_size:: 1466776
pkmem:4-free_size:: 140696
500 Server Internal Error
pkmem:4-free_size:: 140696
500 Server Internal Error
pkmem:4-free_size:: 140696
500 Server Internal Error
pkmem:4-free_size:: 140696
500 Server Internal Error
^C
root at toro:~#

For the following regex_reload commands the error in the syslog file is
this :

2015-09-04T11:56:05.645485-03:00 toro
/home/gc/local/opensips/sbin/opensips[11040]: ERROR:regex:load_pcres: no
more memory for patterns[11]
2015-09-04T11:56:05.645567-03:00 toro
/home/gc/local/opensips/sbin/opensips[11040]: ERROR:regex:mi_pcres_reload:
failed to reload pcres

The only way to recover from this is to restart opensips.

I've pasted the syslog (compiled with DBG_QM_MALLOC option) when the
command is succesfull: http://pastebin.com/VnMZrYrh


I tyied to increase the pkmem for the process, but sooner or later the
error came up

Thanks in advance!
Federico
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20150904/10a179ca/attachment.htm>


More information about the Users mailing list