whosgonna created an issue (kamailio/kamailio#4626)

### Description

There appears to be a memory leak in Kamailio 6.1.1's TM module (although 
perhaps it originates in the Dispatcher module).  

### Troubleshooting

#### Reproduction

I've created a trivial example of a server using the dispatcher module to send 
`OPTIONS` keep alive messages and nothing else. Given no additional traffic, 
the shared memory used by the TM module will continually decrease.

#### Debugging Data

I've created a docker compose project to reproduce the issue in a trivial 
example as described above.

https://github.com/whosgonna/6.1.1_memleak

`kamcmd mod.mem_stats tm all` can be used to observe the memory steadily 
increasing over time.

#### Log Messages

No accompanying log message

#### SIP Traffic

I'm not sure if this can occur with traffic other than the SIP OPTIONS, but 
from what I observed in our production environment the rate of the leak was 
somewhat slow overnight (when traffic volume was low) and increased during 
business hours, so I'm assuming it's any transactions.

### Possible Solutions

```
version: kamailio 6.1.1 (aarch64/Linux)
flags: USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, USE_RAW_SOCKS, DISABLE_NAGLE, 
USE_MCAST, DNS_IP_HACK, SHM_MMAP, PKG_MALLOC, MEM_JOIN_FREE, Q_MALLOC, 
F_MALLOC, TLSF_MALLOC, DBG_SR_MEMORY, DBG_QM_MALLOC, DBG_F_MALLOC, 
DBG_TLSF_MALLOC, USE_PTHREAD_MUTEX, USE_DNS_CACHE, USE_DNS_FAILOVER, USE_NAPTR, 
USE_DST_BLOCKLIST, HAVE_RESOLV_RES, TLS_PTHREAD_MUTEX_SHARED
MAX_RECV_BUFFER_SIZE 262144, MAX_SEND_BUFFER_SIZE 262144, MAX_URI_SIZE 1024, 
BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB
poll method support: poll.
id: unknown
compiled with gcc 14.2.0
```

### Additional Information

  * **Kamailio Version** - output of `kamailio -v`

```
(paste your output here)
```

* **Operating System**:

Reproduced using the 6.1.1 packages from deb.kamailio.org running on Debian 13 
containers on arm64 hosts - both Amazon linux 2023 and Macintosh (arm64 CPU).  



-- 
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/4626
You are receiving this because you are subscribed to this thread.

Message ID: <kamailio/kamailio/issues/[email protected]>
_______________________________________________
Kamailio - Development Mailing List -- [email protected]
To unsubscribe send an email to [email protected]
Important: keep the mailing list in the recipients, do not reply only to the 
sender!

Reply via email to