Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PKG Memory Leak with RTPEngine Module with WebSocket #3777

Open
vijaykumar-exotel opened this issue Mar 6, 2024 · 5 comments
Open

PKG Memory Leak with RTPEngine Module with WebSocket #3777

vijaykumar-exotel opened this issue Mar 6, 2024 · 5 comments

Comments

@vijaykumar-exotel
Copy link
Contributor

Description

Troubleshooting

  • as checked further we particulartly tcp reciever process was consuming pkg memory , then further we checked from corex pkg_sumary for that process id, and found that rtpengine: rtpengine.c: send_rtpp_command was consuming highest memory.

Reproduction

console rtpengine url with ws endpoint.

this is reproducible, we can configure websocket in rtpengine module and then we can initate calls. and increase the number of calls over the period of time

Debugging Data

Screenshot 2024-03-06 at 4 30 16 PM

kamcmd pkg.stats

entry: 24
pid: 378355
rank: 17
used: 7467640
free: 24348320
real_used: 9206112
total_size: 33554432
total_frags: 66
desc: tcp receiver (generic) child=0

kamcmd corex.pkg_summary pid 378355
Mar 6 16:31:52 coreproxy-4 /usr/local/sbin/kamailio[378355]: ALERT: qm_sums: qm_sums(): count= 8075 size= 4638760 bytes from rtpengine: rtpengine.c: send_rtpp_command(3040)

Additional Information

  • Kamailio Version - output of kamailio -v
(paste your output here)
version: kamailio 5.7.0 (x86_64/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, USE_FUTEX, FAST_LOCK-ADAPTIVE_WAIT, USE_DNS_CACHE, USE_DNS_FAILOVER, USE_NAPTR, USE_DST_BLOCKLIST, HAVE_RESOLV_RES, TLS_PTHREAD_MUTEX_SHARED
ADAPTIVE_WAIT_LOOPS 1024, MAX_RECV_BUFFER_SIZE 262144, MAX_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB
poll method support: poll, epoll_lt, epoll_et, sigio_rt, select.
id: unknown 
compiled on 01:04:28 Jan 25 2024 with gcc 9.4.0
  • Operating System:
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 20.04.6 LTS
Release:	20.04
Codename:	focal

Linux coreproxy-4 5.15.0-1045-oracle #51~20.04.1-Ubuntu SMP Fri Sep 22 14:25:26 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux

@miconda
Copy link
Member

miconda commented Mar 18, 2024

Can you test with latest version of 5.7 branch, there were many fixes since 5.7.0 in that branch and the logs messages do not match anymore the source code. Reproduce with latest 5.7.x and then paste again the relevant logs in order to be able to troubleshoot properly.

@vijaykumar-exotel
Copy link
Contributor Author

Sure, will check with 5.7.x latest and confirm

@vijaykumar-exotel
Copy link
Contributor Author

have verified with 5.7.4 , here also happening the same thing. @miconda

@henningw
Copy link
Contributor

@vijaykumar-exotel Thanks for the confirmation, do you could also paste the updated log messages here?

@vijaykumar-exotel
Copy link
Contributor Author

@miconda @henningw can you please review PR, after adding this fix, pkg memory is now getting available with this fix.
Screenshot 2024-04-13 at 2 28 11 AM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants