Dear Support,

 

I am having an “out of memory” problem while using kamailio with SEAS module.

After using Kamailio with the SEAS module for few hours with a high load , I am getting “out of memory” error that I believe is caused from a memory leak.

I would like your help interpreting this error.

 

The output of kamailio –v is :

 

version: kamailio 4.0.4 (i386/linux) cabe58

flags: STATS: Off, USE_IPV6, USE_TCP, USE_TLS, TLS_HOOKS, USE_RAW_SOCKS, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MEM, SHM_MMAP, PKG_MALLOC, USE_FUTEX, FAST_LOCK-ADAPTIVE_WAIT, USE_DNS_CACHE, USE_DNS_FAILOVER, USE_NAPTR, USE_DST_BLACKLIST, HAVE_RESOLV_RES

ADAPTIVE_WAIT_LOOPS=1024, MAX_RECV_BUFFER_SIZE 262144, MAX_LISTEN 16, MAX_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 4MB

poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.

id: cabe58

compiled on 14:23:27 Dec  2 2013 with gcc 4.1.2

 

kamctl ps :

 

Process::  ID=0 PID=31191 Type=attendant

Process::  ID=1 PID=31192 Type=udp receiver child=0 sock=193.100.200.18:5070

Process::  ID=2 PID=31193 Type=udp receiver child=1 sock=193.100.200.18:5070

Process::  ID=3 PID=31194 Type=udp receiver child=2 sock=193.100.200.18:5070

Process::  ID=4 PID=31195 Type=udp receiver child=3 sock=193.100.200.18:5070

Process::  ID=5 PID=31196 Type=slow timer

Process::  ID=6 PID=31197 Type=timer

Process::  ID=7 PID=31198 Type=ctl handler

Process::  ID=8 PID=31199 Type=MI FIFO

Process::  ID=9 PID=31200 Type=SEAS

Process::  ID=10 PID=31201 Type=tcp receiver (generic) child=0

Process::  ID=11 PID=31202 Type=tcp receiver (generic) child=1

Process::  ID=12 PID=31203 Type=tcp receiver (generic) child=2

Process::  ID=13 PID=31204 Type=tcp receiver (generic) child=3

Process::  ID=14 PID=31205 Type=tcp main process

 

 

kamcmd pkg.stats:

{

                entry: 0

                pid: 31191

                rank: 0

                used: 72480

                free: 4091840

                real_used: 102448

}

{

                entry: 1

                pid: 31192

                rank: 1

                used: 80624

                free: 4083696

                real_used: 110592

}

{

                entry: 2

                pid: 31193

                rank: 2

                used: 80624

                free: 4083696

                real_used: 110592

}

{

                entry: 3

                pid: 31194

                rank: 3

                used: 80624

                free: 4083696

                real_used: 110592

}

{

                entry: 4

                pid: 31195

                rank: 4

                used: 80624

                free: 4083696

                real_used: 110592

}

{

                entry: 5

                pid: 31196

                rank: -1

                used: 2276560

                free: 4083744

                real_used: 17770256

}

{

                entry: 6

                pid: 31197

                rank: -1

                used: 1787296

                free: 4083744

                real_used: 17280992

}

{

                entry: 7

                pid: 31198

                rank: -2

                used: 77760

                free: 4086544

                real_used: 107744

}

{

                entry: 8

                pid: 0

                rank: 0

                used: 89920

                free: 4074352

                real_used: 119936

}

{

                entry: 9

                pid: 0

                rank: 0

                used: 0

                free: 0

                real_used: 0

}

{

                entry: 10

                pid: 31201

                rank: 5

                used: 140240

                free: 4023728

                real_used: 170560

}

{

                entry: 11

                pid: 31202

                rank: 6

                used: 140240

                free: 4023712

                real_used: 170576

}

{

                entry: 12

                pid: 31203

                rank: 7

                used: 140240

                free: 4023856

                real_used: 170432

}

{

                entry: 13

                pid: 31204

                rank: 8

                used: 140240

                free: 4023712

                real_used: 170576

}

{

                entry: 14

                pid: 31205

                rank: -4

                used: 3877344

                free: 4030176

                real_used: 19269056

}

 

As you can see above , the output of the SEAS module is not showing (pid 31200)

Moreover , I can see that the real_used value in the kamcmd core.shmmem keep on increasing , and free decrease until I finally get an error “out of memory”

 

When my SEAS client exit the output of kamcmd core.shmmem :

{

                total: 33554432

                free: 16273440

                used: 1787296

                real_used: 17280992

                max_used: 33553520

                fragments: 8098

}

 

The traffic is a simple SIP MESSAGE from a seagull simulator, with a 200OK reply from my SEAS client.

 

I appreciate your support,

Thank you in advance,

Ziad Habchi