[OpenSIPS-Devel] [ opensips-Bugs-3377861 ] fifo dr_reload memory leak

SourceForge.net noreply at sourceforge.net
Thu Aug 4 13:00:09 CEST 2011


Bugs item #3377861, was opened at 2011-07-26 06:20
Message generated for change (Settings changed) made by bogdan_iancu
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=1086410&aid=3377861&group_id=232389

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: modules
Group: 1.6.x
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Dave May (davemay99)
>Assigned to: Bogdan-Andrei Iancu (bogdan_iancu)
Summary: fifo dr_reload memory leak

Initial Comment:
Using svn8195 of 1.6 branch, a steady memory leak occurs when performing multiple iterations of "opensipsctl fifo dr_reload".  The DR_RULES table is stored in MySQL, and contains just under 32000 entries.  The following script demonstrates the problem, and results in failure after about 519 iterations when OpenSIPS is compiled with 4MB pkg memory.

#!/bin/bash
COUNTER=0
while [ $COUNTER -lt $1 ]; do

        opensipsctl fifo dr_reload
        opensipsctl fifo get_statistics pkmem: | grep pkmem:3-real_used_size

        let COUNTER=COUNTER+1
done

Script output on 519th iteration:
    518: Mon Jul 25 22:54:05 EDT 2011
    
    500 Failed to reload
    pkmem:3-real_used_size = 3876904

output from "opensipsctl fifo get_statistics pkmem: | grep pkmem:3-"
    pkmem:3-total_size = 4194304
    pkmem:3-used_size = 2313144
    pkmem:3-real_used_size = 4182476
    pkmem:3-max_used_size = 4187992
    pkmem:3-free_size = 11828
    pkmem:3-fragments = 74

Failure presents itself with the following in the logs at debug=3

Jul 25 22:54:08 sipdev1 /usr/sbin/opensips[520]: INFO:drouting:dr_reload_cmd: "dr_reload" MI command received!
Jul 25 22:54:08 sipdev1 /usr/sbin/opensips[520]: ERROR:core:db_allocate_rows: no memory left
Jul 25 22:54:08 sipdev1 /usr/sbin/opensips[520]: ERROR:db_mysql:db_mysql_fetch_result: no memory left
Jul 25 22:54:08 sipdev1 /usr/sbin/opensips[520]: ERROR:drouting:dr_load_routing_info: Error fetching rows
Jul 25 22:54:08 sipdev1 /usr/sbin/opensips[520]: CRITICAL:drouting:dr_reload_data: failed to load routing info
Jul 25 22:54:08 sipdev1 /usr/sbin/opensips[520]: CRITICAL:drouting:dr_reload_cmd: failed to load routing data
Jul 25 22:54:08 sipdev1 /usr/sbin/opensips[520]: ERROR:mi_fifo:mi_open_reply_pipe: open error (/tmp/opensips_receiver_17638): No such file or directory
Jul 25 22:54:08 sipdev1 /usr/sbin/opensips[520]: ERROR:mi_fifo:mi_fifo_server: cannot open reply pipe /tmp/opensips_receiver_17638

----------------------------------------------------------------------

>Comment By: Bogdan-Andrei Iancu (bogdan_iancu)
Date: 2011-08-04 14:00

Message:
Hi Dave,

Have you tried to compile the memory debugger
(http://www.opensips.org/Resources/DocsTsMem) ? Please do that and set
memlog=6 and memdump=1 in your cfg (in this order). When the mem issue is
reported on the MI process, do the signal stuff on that process, in order
to get a memdump for that proc. Post here is output.

Thanks and regards,
Bogdan

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=1086410&aid=3377861&group_id=232389



More information about the Devel mailing list