[OpenSER-Devel] Memory Leak?

Daniel-Constantin Mierla miconda at gmail.com
Fri Jul 18 14:41:11 CEST 2008



On 07/18/08 15:17, Dan Pascu wrote:
> It's more likely that this is not a memory leak, but a memory 
> fragmentation issue. If you happen to run a fifo command like ul_dump 
> with a lot of active contacts, it'll allocate a lot of small fragments 
> and the memory gets fragmented. Later even after the memory is freed, it 
> will not be able to allocate a 500+ byte memory block because the memory 
> is too fragmented and memory allocation will fail even when 90% of the 
> pkg_memory is free.
>   
Could be fragmentation, but that has to happen due to operations in that 
process. What is done via fifo affects only the memory of fifo listener 
process. In SIP workers process can be due to lot of SIP messages 
processing -- parsing, script variables, db operations,...

Compile with memory debug and see the log dump, that will give more hints:
http://www.openser.org/dokuwiki/doku.php/troubleshooting:memory


Daniel
> On Friday 18 July 2008, Andrew O. Zhukov wrote:
>   
>> What should I do to catch?
>>
>> happends 2-d time for the last 2 monthes?
>> After this all INVITE-s crashed with memory allocation errors.
>>
>> switch on
>> define #XL_DEBUG?
>>
>> other suggestions?
>>
>>
>> Jul 17 15:13:18 ipshka openser[26649]: Request leaving server -
>> M=INVITE RURI=sip:8103737783XXXXX at asterisk.ipshka.com:5060
>> F=sip:100772 at ipshka.com T=sip:8103737783XXXXX at ipshka.com
>> IP=XX.XX.XXX.XXX ID=b1d48e0e-0ffc-1810-8ba9-ab87b583468e
>> Jul 17 15:13:18 ipshka openser[26649]:
>> ERROR:core:build_req_buf_from_sip_req: out of pkg memory
>> Jul 17 15:13:18 ipshka openser[26649]: ERROR:tm:print_uac_request: no
>> more pkg_mem
>> Jul 17 15:13:18 ipshka openser[26649]: ERROR:tm:t_forward_nonack:
>> failure to add branches
>> Jul 17 15:13:18 ipshka openser[26649]: ACC: transaction answered:
>> timestamp=1216296798;method=INVITE;from_tag=b1d48e0e0ffc18109017ab87b58
>> 3468e;to_tag=;call_id=b1d48e0e-0ffc-1810-8ba9-ab87b583468e;code=500;reas
>> on=Server Internal Error
>> ....
>> Jul 17 15:13:19 ipshka openser[26649]: ERROR:core:parse_headers: pkg
>> memory allocation failed
>> Jul 17 15:13:19 ipshka openser[26649]: ERROR:rr:find_first_route:
>> failed to parse headers
>> Jul 17 15:13:19 ipshka openser[26649]: Request leaving server - M=ACK
>> RURI=sip:8103737783XXXX at ipshka.com F=sip:100772 at ipshka.com
>> T=sip:8103737783XXXX at ipshka.com IP=193.28.184.13
>> ID=b1d48e0e-0ffc-1810-8ba9-ab87b583468e
>> Jul 17 15:13:19 ipshka openser[26649]: ERROR:core:parse_headers: pkg
>> memory allocation failed
>> Jul 17 15:13:19 ipshka openser[26649]: ERROR:tm:t_newtran:
>> parse_headers failed
>> ul 17 15:13:39 ipshka openser[26649]:
>> ERROR:core:build_res_buf_from_sip_req: out of pkg memory  ; needs 496
>> Jul 17 15:13:39 ipshka openser[26649]: ERROR:sl:sl_send_reply_helper:
>> response building failed
>> Jul 17 15:13:39 ipshka openser[26649]: ERROR:auth:challenge: failed to
>> send the response
>>
>> _______________________________________________
>> Devel mailing list
>> Devel at lists.openser.org
>> http://lists.openser.org/cgi-bin/mailman/listinfo/devel
>>     
>
>
>
>   

-- 
Daniel-Constantin Mierla
http://www.asipto.com




More information about the Devel mailing list