-
Notifications
You must be signed in to change notification settings - Fork 581
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
[BUG] Memory leak in OpenSIPS 3.4.0 - apparently related to dialog variables #3135
Comments
Hello, I made more investigations about the issue as the crashes are coming fast. I also checked again memory allocation debug and, except dlg_vals, the more memory consuming module is io_wait.c. As i have monitoring using APIs, i wonder if the crashes i experience are not relative to a combination of:
I wonder if both problems might not be linked. Thank you for helping |
Hello, I made two things:
On 3.3.6, the leak is no more there, memory stats are very clean. Below are there respective stats, that's obvious :-)
Thank you |
Hello, @StellaTeam! Thank you for the report! I managed to reproduce the memory leak fairly easily -- I suspect the issue is rooted down in the Let me see what a fix would look like and come back to you. |
There is the same problem.
increasing the P_MEMORY prolongs the life of the process before a crash. |
mem_pkg_dump :
|
sorry for the dump without info.
used memory was grown (example from 15 m) |
The issue was found, @liviuchircu is actively working on a fix here. |
Just as a workarround in the cfg file, using the function
instead of using the pseudo var:
avoids de pkg leak |
Confirmed. No memory leak now. |
Hello
Since we upgraded from 3.1.3 to 3.4.0 we experience memory leaks.
Details follows.
Please let me know how I can help diagnosing the problem.
Thank you!
OpenSIPS version you are running
Describe the bug
Since upgrade from 3.1.3 to 3.4.0, there is a memory leak on some threads.
To Reproduce
As it is a leak, there is only to wait for memory usage to increase and free memory to decrease
Expected behavior
No memory leak
Relevant System Logs
Once memory is saturated we get all kinds of errors we can imagine before crashing.
Messages follows
OS/environment information
DEBIAN buster 4.19.0-17 or DEBIAN bullseye 5.10.0-8
Additional context
The problem occurs on several machines.
The leak wasn't there on OpenSIPS 3.1.3.
Config is identical (except syslog parameters naming changes)
It occurs with default memory allocator (F_MALLOC if i'm right) but also with Q_MALLOC_DBG.
Not all threads seems to be affected by the leak the same way as, on 25 threads, 2 have greater leaks than the others.
I don't know why but, on both servers, the most affected threads are 12 and 16.
recently crashed server - values are lower but difference is already visible, and difference between 12/16 and the other threads is clear
According to memory dumps (attached to this issue), it seems the memory is lost in
mem2.txt
mem1.txt
The text was updated successfully, but these errors were encountered: