doc/
subfolder, the README file is autogenerated)Setup: uac_req_send() with evroute=2 and tm module enable_uac_fr=1
Noticed following shm errors while intensively testing uac_req_send(), happening quite soon after a fresh restart (e.g. 10 min):
kamailio[5384]: ERROR: <core> [core/mem/q_malloc.c:297]: qm_find_free(): qm_find_free(0x7fe8943bc000, 40632); Free fragment not found!
kamailio[5384]: ERROR: <core> [core/mem/q_malloc.c:430]: qm_malloc(): qm_malloc(0x7fe8943bc000, 40632) called from uac: uac_send.c: uac_send_info_clone(105), module: uac; Free fragment not found!
kamailio[5384]: ERROR: uac [uac_send.c:108]: uac_send_info_clone(): no more shm memory
kamailio[5384]: ERROR: uac [uac_send.c:837]: uac_req_send(): cannot clone the uac structure
I tried monitoring system memory using free
tool and noticed that the "used" memory didn't grow alot. However, I noticed the "buff/cached" memory had a steep growth when 200OK(s) started to come, for my setup.
Noticed that, for my setup, when 200OK come, event_route[uac:reply] is not called, so the tm callback set by UAC module is not called. => the "tp" callback parameter shm allocated by UAC module is not freed.
By analogy, when using uac_req_send() with evroute=1 and timeout happens (e.g. no reply comes), event_route[uac:reply] won't be called and same leak should happen => i didn;t tested that, was just an analogy.
I updated the code to call the callback on TMCB_DESTROY, and make sure tp parameter is freed, one time.
Let me know what you think of this... in my setup/tests I got no kamailio shm logs anymore. Also "buff/cached" memory didn't have that steep growth anymore.
Thank you,
Stefan
https://github.com/kamailio/kamailio/pull/3065
(1 file)
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.