[OpenSER-Devel] Memory Leak?

Andrew O. Zhukov gnugk at telegroup.com.ua
Fri Jul 18 16:03:27 CEST 2008


Daniel-Constantin Mierla пишет:
> 
> 
> On 07/18/08 16:05, Andrew O. Zhukov wrote:
>> Daniel-Constantin Mierla пишет:
>>>
>>>
>>> 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
>>>
>> Let me know if you need something else, like a sip_trace table 
>> extractions, openser.ini, etc..
> I need the log from openser compiled with memory debugging on -- see the 
> link I sent. Looks as being some leak there, those logs show from where 
> the chinks are allocate.

This openser compiled exactly as in your link:

What's wrong?

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

DEFS+= $(extra_defs) \
          -DNAME='"$(MAIN_NAME)"' -DVERSION='"$(RELEASE)"' 
-DARCH='"$(ARCH)"' \
          -DOS='"$(OS)"' -DCOMPILER='"$(CC_VER)"' -D__CPU_$(ARCH) 
-D__OS_$(OS) \
          -D__SMP_$(ISSMP) -DCFG_DIR='"$(cfg-target)"'\
          -DPKG_MALLOC \
          -DSHM_MEM  -DSHM_MMAP \
          -DUSE_IPV6 \
          -DUSE_MCAST \
          -DUSE_TCP \
          -DDISABLE_NAGLE \
          -DHAVE_RESOLV_RES \
          -DSTATISTICS \
          -DCHANGEABLE_DEBUG_LEVEL \
          #-DF_MALLOC \
          -DDBG_QM_MALLOC \
          #-DDBG_F_MALLOC \
          #-DNO_DEBUG \
          #-DNO_LOG \
          #-DVQ_MALLOC  \
          #-DDBG_LOCK \
          #-DNOSMP \
          #-DEXTRA_DEBUG \
          #-DUSE_SHM_MEM
--------------------------------------------------------
# ----------- global configuration parameters ------------------------

debug=3            # debug level (cmd line: -dddddddddd)
fork=yes
log_stderror=no    # (cmd line: -E)
log_facility=LOG_LOCAL0
memlog=1

#/* Uncomment these lines to enter debugging mode
#fork=no
#log_stderror=yes
#debug=6
#*/

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


> 
> Daniel
> 
> 




More information about the Devel mailing list