Hi Henning,

Thank you for guidance and suggestion. I did change the PKG size to 32MB and increased SHM to 1GB. But the same issue observed with a lesser time duration.

While looking at the below error, found that something changes in the smsops module which was causing the leak

Apr 29 13:28:53 stgn-haud-vm-ub-kamailio01 /usr/sbin/kamailio[5520]: ERROR: {1 1 MESSAGE 739708-3401@192.168.136.152} smsops [smsops_impl.c:815]: decode_3gpp_sms(): Error allocating 192 bytes!

Below is my analysis:
The initial code was

       if (!rp_data) {
		rp_data = (sms_rp_data_t*)pkg_malloc(sizeof(struct _sms_rp_data));
		if (!rp_data) {
			LM_ERR("Error allocating %lu bytes!\n", sizeof(struct _sms_rp_data));
			return -1;
		}
	} else {
		freeRP_DATA(rp_data);
	}

But it got changed in "smsops: Fix conversion from UCS-2 to UTF-8 and viceversa (#3546)" tag 8 months ago

           if(rp_data) {
		freeRP_DATA(rp_data);
	}
	rp_data = (sms_rp_data_t *)pkg_malloc(sizeof(struct _sms_rp_data));
	if(!rp_data) {
		LM_ERR("Error allocating %lu bytes!\n",
				(unsigned long)sizeof(struct _sms_rp_data));
		return -1;
	} 

Now in the recent code it is not reusing the rp_data pointer, rather it allocates every time a new message reaches.

I will try to clone the tag and fix the code and keep you posted

            if(_smsops_rp_data) {
                    freeRP_DATA(_smsops_rp_data);
            } else {  //Added by Paresh Panda

            _smsops_rp_data =
                            (sms_rp_data_t *)pkg_malloc(sizeof(struct _sms_rp_data));
            }

Is there any plan for new tag ? , I am planning to take the latest kamailio tag to production.

I will update you after testing the fix as above.

Thank you!
Regards
Paresh


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you commented.Message ID: <kamailio/kamailio/issues/3833/2084951519@github.com>